From a2817049c90c1962c64593b0ead262ba46668602 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Feb 2016 03:34:56 +0100 Subject: [PATCH] Fix must show warning only if threshold defined. --- htdocs/product/stock/product.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 5b26f215adb..42fadf54923 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -493,16 +493,14 @@ if ($id > 0 || $ref) print $form->textwithtooltip($langs->trans("PhysicalStock"), $text_stock_options, 2, 1, img_picto('', 'info'), '', 2); print ''; print ''.$object->stock_reel; - if ($object->seuil_stock_alerte && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit")); + if ($object->seuil_stock_alerte != '' && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit")); print ''; print ''; // Calculating a theorical value print ''.$langs->trans("VirtualStock").''; print "".(empty($object->stock_theorique)?0:$object->stock_theorique); - if ($object->stock_theorique < $object->seuil_stock_alerte) { - print ' '.img_warning($langs->trans("StockLowerThanLimit")); - } + if ($object->seuil_stock_alerte != '' && ($object->stock_theorique < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit")); print ''; print '';