Merge pull request #14766 from ptibogxiv/patch-361

FIx  product list
This commit is contained in:
Laurent Destailleur 2020-09-20 17:18:29 +02:00 committed by GitHub
commit dccdfd3a53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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),
@ -1445,7 +1445,9 @@ if ($resql)
// State
if (!empty($arrayfields['p.fk_state']['checked']))
{
print '<td>'.getState($obj->fk_state, 0, $db).'</td>';
print '<td>';
if (!empty($obj->fk_state)) print getState($obj->fk_state, 0, $db);
print '</td>';
if (!$i) $totalarray['nbfield']++;
}
// Accountancy code sell