From 524b1869599db819de8b702499dd349e5c968abf Mon Sep 17 00:00:00 2001 From: gauthier Date: Thu, 11 Apr 2019 15:19:40 +0200 Subject: [PATCH 1/2] FIX : Product accountancey sell intra code must be visible if main feature level 1 --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 66f7e288efa..e7f6e0f8af3 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3580,7 +3580,7 @@ class Product extends CommonObject { // } - if (! empty($conf->accounting->enabled) && $this->status) + if (! empty($conf->accounting->enabled) && $this->status && !empty($conf->global->MAIN_FEATURES_LEVEL)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; $label.= '
' . $langs->trans('ProductAccountancySellCode') . ': '. length_accountg($this->accountancy_code_sell); From 9a24007c0a7c7d1de0eb37f38d05e84cdef14719 Mon Sep 17 00:00:00 2001 From: gauthier Date: Thu, 11 Apr 2019 15:32:50 +0200 Subject: [PATCH 2/2] FIX : better test --- htdocs/product/class/product.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index e7f6e0f8af3..fce619094dc 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3580,12 +3580,14 @@ class Product extends CommonObject { // } - if (! empty($conf->accounting->enabled) && $this->status && !empty($conf->global->MAIN_FEATURES_LEVEL)) + 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_export); - $label.= '
' . $langs->trans('ProductAccountancySellExportCode') . ': '. length_accountg($this->accountancy_code_sell_intra); + if(!empty($conf->global->MAIN_FEATURES_LEVEL)) { + $label.= '
' . $langs->trans('ProductAccountancySellIntraCode') . ': '. length_accountg($this->accountancy_code_sell_export); + $label.= '
' . $langs->trans('ProductAccountancySellExportCode') . ': '. length_accountg($this->accountancy_code_sell_intra); + } } if (! empty($conf->accounting->enabled) && $this->status_buy) {