diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 8b20479a154..454936d2998 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -3966,7 +3966,7 @@ abstract class CommonObject
// Fields for situation invoice
if ($this->situation_cycle_ref) {
print '
global->MAIN_VIEW_LINE_NUMBER)) {
- $coldisplay=2;
+ $coldisplay++;
?>
|
+ }
+ $coldisplay++;
+ ?>
global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
$toolbarname='dolibarr_details';
if (! empty($conf->global->FCKEDITOR_ENABLE_DETAILS_FULL)) $toolbarname='dolibarr_notes';
- $doleditor=new DolEditor('dp_desc', GETPOST('dp_desc'), '', (empty($conf->global->MAIN_DOLEDITOR_HEIGHT)?100:$conf->global->MAIN_DOLEDITOR_HEIGHT), $toolbarname, '', false, true, $enabled, $nbrows, '98%');
+ $doleditor=new DolEditor('dp_desc', GETPOST('dp_desc', 'none'), '', (empty($conf->global->MAIN_DOLEDITOR_HEIGHT)?100:$conf->global->MAIN_DOLEDITOR_HEIGHT), $toolbarname, '', false, true, $enabled, $nbrows, '98%');
$doleditor->Create();
// Show autofill date for recurring invoices
@@ -355,52 +355,71 @@ else {
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
{
?>
+ $coldisplay++;
| "> |
tva_assuj == "0") echo ''.vatrate(0, true);
else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?GETPOST("tva_tx", 'alpha', 2):-1), $seller, $buyer, 0, 0, '', false, 1);
?>
|
-
+
+ |
">
|
- multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?>
+ multicurrency->enabled) && $this->multicurrency_code != $conf->currency) {
+ $coldisplay++;
+ ?>
">
|
-
+
">
|
-
+
">
|
global->PRODUCT_USE_UNITS)
{
+ $coldisplay++;
print '';
print $form->selectUnits($line->fk_unit, "units");
print ' | ';
}
$remise_percent = $buyer->remise_percent;
- if($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') {
+ if($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier')
+ {
$remise_percent = $seller->remise_supplier_percent;
}
+
+ $coldisplay++;
?>
">% |
situation_cycle_ref) {
$coldisplay++;
print '% | ';
+ $coldisplay++;
+ print ' | ';
}
+
if (! empty($usemargins))
{
if (!empty($user->rights->margins->creer)) {
+ $coldisplay++;
?>
@@ -411,7 +430,6 @@ else {
">
|
rights->margins->creer)
@@ -427,12 +445,9 @@ else {
$coldisplay++;
}
}
- else
- {
- if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $coldisplay++;
- if (! empty($conf->global->DISPLAY_MARK_RATES)) $coldisplay++;
- }
}
+
+ $coldisplay+=$colspan;
?>
@@ -441,62 +456,18 @@ else {
showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay+8), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
+ print $objectline->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
}
?>
service->enabled) || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') // We show date field if required
{
- $colspan = 6;
-
- if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
- {
- $colspan++;
- }
- if ($this->situation_cycle_ref) {
- $colspan++;
- }
- // We add 1 if col total ttc
- if (!empty($inputalsopricewithtax)) {
- $colspan++;
- }
- if ($conf->global->PRODUCT_USE_UNITS) {
- $colspan++;
- }
- if (count($object->lines)) {
- //There will be an edit and a delete button
- $colspan += 2;
-
- // With this, there is a column move button ONLY if lines > 1
- if (in_array($object->element, array(
- 'propal',
- 'supplier_proposal',
- 'facture',
- 'facturerec',
- 'invoice',
- 'commande',
- 'order',
- 'order_supplier',
- 'invoice_supplier'
- ))) {
- $colspan++;
- }
- }
-
- if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) $colspan+=2;
-
- if (! empty($usemargins))
- {
- if (!empty($user->rights->margins->creer)) $colspan++; // For the buying price
- if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
- if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
- }
?>
|
>
global->MAIN_VIEW_LINE_NUMBER)) { print ' | '; } ?>
-
+ |
situation_cycle_ref) {
$coldisplay++;
- print ' | % | ';
+ print '% | ';
+ $coldisplay++;
+ print ' | ';
}
if (! empty($usemargins))
{
@@ -270,7 +272,7 @@ if (!empty($extrafieldsline))
global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
- trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; ?>
+ | trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; ?>
global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:'');
print $form->selectDate($line->date_start, 'date_start', $hourmin, $hourmin, $line->date_start?0:1, "updateline", 1, 0);
diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php
index ba52a4a63c5..09bedf2ec53 100644
--- a/htdocs/core/tpl/objectline_view.tpl.php
+++ b/htdocs/core/tpl/objectline_view.tpl.php
@@ -237,17 +237,22 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
| |
global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
+
// Fields for situation invoices
if ($this->situation_cycle_ref)
{
+ include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
$coldisplay++;
print '' . $line->situation_percent . '% | ';
- //print '' . $line->situation_percent . ' | ';
+ $coldisplay++;
+ $locataxes_array = getLocalTaxesFromRate($line->tva.($line->vat_src_code ? ' ('.$line->vat_src_code.')' : ''), 0, ($senderissupplier?$mysoc:$object->thirdparty), ($senderissupplier?$object->thirdparty:$mysoc));
+ $tmp = calcul_price_total($line->qty, $line->pu, $line->remise_percent, $line->txtva, -1, -1, 0, 'HT', $line->info_bits, $line->type, ($senderissupplier?$object->thirdparty:$mysoc), $locataxes_array, 100, $object->multicurrency_tx, $line->multicurrency_subprice);
+ print '' . price($tmp[0]) . ' | ';
}
if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))
{
- $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
?>
rights->margins->creer)) { ?>
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index c739f8d5624..3aec931714b 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -371,6 +371,7 @@ Percentage=Percentage
Total=Total
SubTotal=Subtotal
TotalHTShort=Total (excl.)
+TotalHT100Short=Total 100%% (excl.)
TotalHTShortCurrency=Total (excl. in currency)
TotalTTCShort=Total (inc. tax)
TotalHT=Total (excl. tax)