diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php
index 5a6a8b508c7..38b6029ade0 100644
--- a/htdocs/core/tpl/objectline_view.tpl.php
+++ b/htdocs/core/tpl/objectline_view.tpl.php
@@ -414,6 +414,7 @@ print $tooltiponpriceend;
multicurrency_subprice); ?> |
subprice_ttc) ? $line->subprice_ttc : null;
diff --git a/htdocs/core/tpl/subtotal_view.tpl.php b/htdocs/core/tpl/subtotal_view.tpl.php
index ad7b0e22870..90953d1caba 100644
--- a/htdocs/core/tpl/subtotal_view.tpl.php
+++ b/htdocs/core/tpl/subtotal_view.tpl.php
@@ -41,6 +41,12 @@
@phan-var-force int $num
';
+global $inputalsopricewithtax;
+
+if (empty($inputalsopricewithtax)) {
+ $inputalsopricewithtax = 0;
+}
+
echo "\n";
$langs->load('subtotals');
@@ -99,9 +105,12 @@ if ($line->qty > 0) { ?>
print ' | | ';
}
// 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 ' | ';
}
+ if (isModEnabled("multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency && !empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) {
+ print ' | ';
+ }
print ' | ';
@@ -166,7 +175,18 @@ if ($line->qty > 0) { ?>
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;