From 81d2618b5984fba80e00de40ae5da3f29646ca03 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 11 Mar 2023 19:38:39 +0100 Subject: [PATCH] Add option to avoid use of input price inc tax (works only for 1st tax) --- htdocs/core/tpl/objectline_create.tpl.php | 2 +- htdocs/core/tpl/objectline_edit.tpl.php | 2 +- htdocs/core/tpl/objectline_title.tpl.php | 2 +- htdocs/core/tpl/objectline_view.tpl.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index cbbb127cf1e..ec61384f5bf 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -410,7 +410,7 @@ if ($nolinesbefore) { diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index fba73125aa5..b2914c455a0 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -223,7 +223,7 @@ $coldisplay++; print ''; } - if ($inputalsopricewithtax) { + if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) { $coldisplay++; print 'fk_prev_id != null) { diff --git a/htdocs/core/tpl/objectline_title.tpl.php b/htdocs/core/tpl/objectline_title.tpl.php index 4640d710705..ed16a8a8286 100644 --- a/htdocs/core/tpl/objectline_title.tpl.php +++ b/htdocs/core/tpl/objectline_title.tpl.php @@ -92,7 +92,7 @@ if (isModEnabled("multicurrency") && $this->multicurrency_code != $conf->currenc print ''.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).''; } -if ($inputalsopricewithtax) { +if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) { print ''.$langs->trans('PriceUTTC').''; } diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 0f7dc25152b..b2213862d62 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -325,7 +325,7 @@ print $tooltiponpriceend; multicurrency_subprice); ?> +if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) { ?> pu_ttc) ? price($sign * $line->pu_ttc) : price($sign * $line->subprice)); ?>