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] 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;