From 8284d0ee06a785c85f41598f7973aba11e120dd7 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 17 Sep 2020 11:41:53 +0200 Subject: [PATCH 1/3] FIx product list fix mistake if fk_state empty --- htdocs/product/list.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 2217d85ccfc..a6fb86f07b8 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -1445,7 +1445,9 @@ if ($resql) // State if (!empty($arrayfields['p.fk_state']['checked'])) { - print ''.getState($obj->fk_state, 0, $db).''; + print ''; + if (!empty($obj->fk_state)) print getState($obj->fk_state, 0, $db); + print ''; if (!$i) $totalarray['nbfield']++; } // Accountancy code sell From cbd511fbb42a9db63834db677143568c0db09ae0 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 17 Sep 2020 16:16:35 +0200 Subject: [PATCH 2/3] Update list.php --- htdocs/product/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index a6fb86f07b8..f3aab6091ef 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -210,8 +210,8 @@ $arrayfields = array( 'p.stock'=>array('label'=>$langs->trans("PhysicalStock"), 'checked'=>1, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service'), 'position'=>52), 'stock_virtual'=>array('label'=>$langs->trans("VirtualStock"), 'checked'=>1, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service' && $virtualdiffersfromphysical), 'position'=>53), 'p.tobatch'=>array('label'=>$langs->trans("ManageLotSerial"), 'checked'=>0, 'enabled'=>(!empty($conf->productbatch->enabled)), 'position'=>60), - 'p.fk_country'=>array('label'=>$langs->trans("Country").' ('.$langs->trans("Country").')', 'checked'=>0, 'position'=>100), - 'p.fk_state'=>array('label'=>$langs->trans("State").' ('.$langs->trans("State").')', 'checked'=>0, 'position'=>101), + 'p.fk_country'=>array('label'=>$langs->trans("Country").', 'checked'=>0, 'position'=>100), + 'p.fk_state'=>array('label'=>$langs->trans("State").', 'checked'=>0, 'position'=>101), 'p.accountancy_code_sell'=>array('label'=>$langs->trans("ProductAccountancySellCode"), 'checked'=>0, 'position'=>400), 'p.accountancy_code_sell_intra'=>array('label'=>$langs->trans("ProductAccountancySellIntraCode"), 'checked'=>0, 'enabled'=>$isInEEC, 'position'=>401), 'p.accountancy_code_sell_export'=>array('label'=>$langs->trans("ProductAccountancySellExportCode"), 'checked'=>0, 'position'=>402), From 08d7973b4a8e85e9a3f5c19a2e3e7aeec512a690 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 17 Sep 2020 22:10:22 +0200 Subject: [PATCH 3/3] Update list.php --- htdocs/product/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index f3aab6091ef..f0d1a3ef4c0 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -210,8 +210,8 @@ $arrayfields = array( 'p.stock'=>array('label'=>$langs->trans("PhysicalStock"), 'checked'=>1, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service'), 'position'=>52), 'stock_virtual'=>array('label'=>$langs->trans("VirtualStock"), 'checked'=>1, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service' && $virtualdiffersfromphysical), 'position'=>53), 'p.tobatch'=>array('label'=>$langs->trans("ManageLotSerial"), 'checked'=>0, 'enabled'=>(!empty($conf->productbatch->enabled)), 'position'=>60), - 'p.fk_country'=>array('label'=>$langs->trans("Country").', 'checked'=>0, 'position'=>100), - 'p.fk_state'=>array('label'=>$langs->trans("State").', 'checked'=>0, 'position'=>101), + 'p.fk_country'=>array('label'=>$langs->trans("Country"), 'checked'=>0, 'position'=>100), + 'p.fk_state'=>array('label'=>$langs->trans("State"), 'checked'=>0, 'position'=>101), 'p.accountancy_code_sell'=>array('label'=>$langs->trans("ProductAccountancySellCode"), 'checked'=>0, 'position'=>400), 'p.accountancy_code_sell_intra'=>array('label'=>$langs->trans("ProductAccountancySellIntraCode"), 'checked'=>0, 'enabled'=>$isInEEC, 'position'=>401), 'p.accountancy_code_sell_export'=>array('label'=>$langs->trans("ProductAccountancySellExportCode"), 'checked'=>0, 'position'=>402),