From 524b1869599db819de8b702499dd349e5c968abf Mon Sep 17 00:00:00 2001 From: gauthier Date: Thu, 11 Apr 2019 15:19:40 +0200 Subject: [PATCH 1/3] 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/3] 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) { From 8fa8d7fa08eecb2f914a5b00baa1b37473c8c216 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Apr 2019 16:13:23 +0200 Subject: [PATCH 3/3] FIX Combo list was limited to 20 in stock correction --- htdocs/product/stock/tpl/stockcorrection.tpl.php | 2 +- htdocs/product/stock/tpl/stocktransfer.tpl.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index ce947c2003b..849bc15fc6b 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -81,7 +81,7 @@ if (empty($conf) || ! is_object($conf)) { { print ''.$langs->trans("Product").''; print ''; - print $form->select_produits(GETPOST('product_id'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''), 20, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); + print $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); print '