From ef204b26206f9bfbc489d3afc21c634b19eb36fe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Mar 2022 12:52:04 +0100 Subject: [PATCH] Fix column conditions --- htdocs/mrp/mo_production.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index bc1a0457325..1c6f3f7ec39 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -735,9 +735,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print $langs->trans("Warehouse"); } print ''; - if ($conf->productbatch->enabled) { + if ($conf->stock->enabled) { // Available - print ''; + print ''; if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { print $langs->trans("Stock"); } @@ -958,12 +958,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Lot Batch - print ''; - if ($line2['batch'] != '') { - $tmpbatch->fetch(0, $line2['fk_product'], $line2['batch']); - print $tmpbatch->getNomUrl(1); + if ($conf->productbatch->enabled) { + print ''; + if ($line2['batch'] != '') { + $tmpbatch->fetch(0, $line2['fk_product'], $line2['batch']); + print $tmpbatch->getNomUrl(1); + } + print ''; } - print ''; // Action delete line if ($permissiontodelete) {