From c020325587e6e3781ce242a295eb6a0082d0888c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 May 2022 19:54:49 +0200 Subject: [PATCH] Debug v16 --- htdocs/categories/index.php | 3 ++- htdocs/product/class/product.class.php | 28 ++++++++++++++++---------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index f4456ed79bf..4a9e771416c 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -102,7 +102,8 @@ if (empty($nosearch)) { print ''.$langs->trans("Search").''; print ''; print ''; - print $langs->trans("Name").':'; + print $langs->trans("Name").':'; + print ''; print ''; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index a6cac07d7e1..9a48b184c73 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4895,17 +4895,23 @@ class Product extends CommonObject $label .= "
".$langs->trans("PMPValue").': '.price($this->pmp, 0, '', 1, -1, -1, $conf->currency); } - if (!empty($conf->accounting->enabled) && $this->status) { - include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; - $label .= '
'.$langs->trans('ProductAccountancySellCode').': '.length_accountg($this->accountancy_code_sell); - $label .= '
'.$langs->trans('ProductAccountancySellIntraCode').': '.length_accountg($this->accountancy_code_sell_intra); - $label .= '
'.$langs->trans('ProductAccountancySellExportCode').': '.length_accountg($this->accountancy_code_sell_export); - } - if (!empty($conf->accounting->enabled) && $this->status_buy) { - include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; - $label .= '
'.$langs->trans('ProductAccountancyBuyCode').': '.length_accountg($this->accountancy_code_buy); - $label .= '
'.$langs->trans('ProductAccountancyBuyIntraCode').': '.length_accountg($this->accountancy_code_buy_intra); - $label .= '
'.$langs->trans('ProductAccountancyBuyExportCode').': '.length_accountg($this->accountancy_code_buy_export); + if (!empty($conf->accounting->enabled)) { + if ($this->status) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; + $label .= '
'; + $label .= '
'.$langs->trans('ProductAccountancySellCode').': '.length_accountg($this->accountancy_code_sell); + $label .= '
'.$langs->trans('ProductAccountancySellIntraCode').': '.length_accountg($this->accountancy_code_sell_intra); + $label .= '
'.$langs->trans('ProductAccountancySellExportCode').': '.length_accountg($this->accountancy_code_sell_export); + } + if ($this->status_buy) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; + if (empty($this->status)) { + $label .= '
'; + } + $label .= '
'.$langs->trans('ProductAccountancyBuyCode').': '.length_accountg($this->accountancy_code_buy); + $label .= '
'.$langs->trans('ProductAccountancyBuyIntraCode').': '.length_accountg($this->accountancy_code_buy_intra); + $label .= '
'.$langs->trans('ProductAccountancyBuyExportCode').': '.length_accountg($this->accountancy_code_buy_export); + } } $linkclose = '';