From 827c836e6e0450bd68588f87e4535b0c087b8e76 Mon Sep 17 00:00:00 2001 From: torvista Date: Mon, 21 Jan 2019 16:18:39 +0100 Subject: [PATCH] Whne multicurrency in use, the Add button colspan is incorrect (6 instead of 5) since it is incrementing colspan in addition to a previous incrment in the title bar. This corrects the table. --- htdocs/core/tpl/objectline_create.tpl.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 30ae765618d..06960ebba36 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -57,7 +57,8 @@ if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0; // Define colspan for button Add -$colspan = 3; // Col total ht + col edit + col delete +$colspan = 3; // Columns: total ht + col edit + col delete +if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) $colspan++;//Add column for Total (currency) if required if (in_array($object->element,array('propal','commande','order','facture','facturerec','invoice','supplier_proposal','order_supplier','invoice_supplier'))) $colspan++; // With this, there is a column move button //print $object->element; @@ -113,7 +114,7 @@ if ($nolinesbefore) { trans('VAT'); ?> trans('PriceUHT'); ?> - multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { $colspan++;?> + multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { //steve remove colspan $colspan++; ?> trans('PriceUHTCurrency'); ?> @@ -348,7 +349,7 @@ else { "> - multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { $colspan++;?> + multicurrency->enabled) && $this->multicurrency_code != $conf->currency) {// $colspan++; //steve remove colspan++: already set?> ">