From 04cc0a0480459c19837abb4e0f8f88d01689301f Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Mon, 10 Jan 2022 17:02:15 +0100 Subject: [PATCH 1/2] NEW : Add column "Total HT" to products array on document creation card --- htdocs/core/class/commonobject.class.php | 2 ++ htdocs/core/tpl/originproductline.tpl.php | 1 + 2 files changed, 3 insertions(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index a01e2d7c209..e89990b7b5e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4441,6 +4441,7 @@ abstract class CommonObject print ''.$langs->trans('Unit').''; } print ''.$langs->trans('ReductionShort').''; + print ''.$langs->trans('TotalHT').''; print ''.$form->showCheckAddButtons('checkforselect', 1).''; print ''; $i = 0; @@ -4593,6 +4594,7 @@ abstract class CommonObject if (!empty($line->vat_src_code) && !preg_match('/\(/', $this->tpl['vat_rate'])) $this->tpl['vat_rate'] .= ' ('.$line->vat_src_code.')'; $this->tpl['price'] = price($line->subprice); + $this->tpl['total_ht'] = price($line->total_ht); $this->tpl['multicurrency_price'] = price($line->multicurrency_subprice); $this->tpl['qty'] = (($line->info_bits & 2) != 2) ? $line->qty : ' '; if ($conf->global->PRODUCT_USE_UNITS) $this->tpl['unit'] = $langs->transnoentities($line->getLabelOfUnit('long')); diff --git a/htdocs/core/tpl/originproductline.tpl.php b/htdocs/core/tpl/originproductline.tpl.php index 1b996556253..cc520039af5 100644 --- a/htdocs/core/tpl/originproductline.tpl.php +++ b/htdocs/core/tpl/originproductline.tpl.php @@ -40,6 +40,7 @@ if ($conf->global->PRODUCT_USE_UNITS) print ''.$langs->trans($this->tpl['unit']).''; print ''.$this->tpl['remise_percent'].''; +print ''.$this->tpl['total_ht'].''; $selected = 1; if (!empty($selectedLines) && !in_array($this->tpl['id'], $selectedLines)) $selected = 0; From 75b74a5fd352c94e51f17fc22fafbf0edda04533 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Thu, 7 Apr 2022 10:43:31 +0200 Subject: [PATCH 2/2] FIX : identification new td --- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/tpl/originproductline.tpl.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 59d6ab59f34..62a8038d4d4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4948,7 +4948,7 @@ abstract class CommonObject print ''.$langs->trans('Unit').''; } print ''.$langs->trans('ReductionShort').''; - print ''.$langs->trans('TotalHT').''; + print ''.$langs->trans('TotalHT').''; print ''.$form->showCheckAddButtons('checkforselect', 1).''; print ''; $i = 0; diff --git a/htdocs/core/tpl/originproductline.tpl.php b/htdocs/core/tpl/originproductline.tpl.php index dfbf2ac3ea4..c19ef7bcf59 100644 --- a/htdocs/core/tpl/originproductline.tpl.php +++ b/htdocs/core/tpl/originproductline.tpl.php @@ -41,7 +41,7 @@ if (!empty($conf->global->PRODUCT_USE_UNITS)) { } print ''.$this->tpl['remise_percent'].''; -print ''.$this->tpl['total_ht'].''; +print ''.$this->tpl['total_ht'].''; $selected = 1; if (!empty($selectedLines) && !in_array($this->tpl['id'], $selectedLines)) {