Fix balance of td with subtotal
This commit is contained in:
parent
b9961d2cdb
commit
4a409d7519
2 changed files with 23 additions and 12 deletions
|
|
@ -414,6 +414,7 @@ print $tooltiponpriceend;
|
|||
<td class="linecoluht_currency nowraponall right"><?php $coldisplay++; ?><?php print price($sign * $line->multicurrency_subprice); ?></td>
|
||||
<?php }
|
||||
|
||||
// Multicurrency HT
|
||||
if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) { ?>
|
||||
<td class="linecoluttc nowraponall right"><?php $coldisplay++; ?><?php
|
||||
$upinctax = isset($line->subprice_ttc) ? $line->subprice_ttc : null;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,12 @@
|
|||
@phan-var-force int $num
|
||||
';
|
||||
|
||||
global $inputalsopricewithtax;
|
||||
|
||||
if (empty($inputalsopricewithtax)) {
|
||||
$inputalsopricewithtax = 0;
|
||||
}
|
||||
|
||||
echo "<!-- BEGIN PHP TEMPLATE subtotal_view.tpl.php -->\n";
|
||||
|
||||
$langs->load('subtotals');
|
||||
|
|
@ -99,9 +105,12 @@ if ($line->qty > 0) { ?>
|
|||
print '<td class="linecoluht_currency"></td>';
|
||||
}
|
||||
// Handling colspan if MAIN_NO_INPUT_PRICE_WITH_TAX conf is enabled
|
||||
if (!getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX') && $object->element != 'facturerec') {
|
||||
if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) {
|
||||
print '<td class="linecoluttc"></td>';
|
||||
}
|
||||
if (isModEnabled("multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency && !empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) {
|
||||
print '<td class="linecoluttc_currency"></td>';
|
||||
}
|
||||
|
||||
print '<td class="linecolqty"></td>';
|
||||
|
||||
|
|
@ -166,7 +175,18 @@ if ($line->qty > 0) { ?>
|
|||
<?php } ?>
|
||||
<?php } elseif ($line->qty < 0) {
|
||||
// Base colspan if there is no module activated to display line correctly
|
||||
$colspan = 3;
|
||||
$colspan = 3; // linecoldescription, linecolvat, linecoluht
|
||||
|
||||
if (isModEnabled("multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency) {
|
||||
$colspan++;
|
||||
}
|
||||
// Handling colspan if MAIN_NO_INPUT_PRICE_WITH_TAX conf is enabled
|
||||
if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) {
|
||||
$colspan++;
|
||||
}
|
||||
if (isModEnabled("multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency && !empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) {
|
||||
$colspan++;
|
||||
}
|
||||
|
||||
if (property_exists($this, 'situation_cycle_ref') && isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||
$colspan += 2;
|
||||
|
|
@ -188,16 +208,6 @@ if ($line->qty > 0) { ?>
|
|||
}
|
||||
}
|
||||
|
||||
// Handling colspan if multicurrency module is enabled
|
||||
if (isModEnabled('multicurrency') && $object->multicurrency_code != $conf->currency) {
|
||||
$colspan += 1;
|
||||
}
|
||||
|
||||
// Handling colspan if MAIN_NO_INPUT_PRICE_WITH_TAX conf is enabled
|
||||
if (!getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX') && $object->element != 'facturerec') {
|
||||
$colspan += 1;
|
||||
}
|
||||
|
||||
// Handling colspan if PRODUCT_USE_UNITS conf is enabled
|
||||
if (getDolGlobalString('PRODUCT_USE_UNITS')) {
|
||||
$colspan += 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue