From 215d7a883ed5ab691c13096c1c3960b9a502e2d5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 6 Oct 2012 23:13:46 +0200 Subject: [PATCH] Fix: Revert bugged new feature that show false information. --- htdocs/core/tpl/objectline_edit.tpl.php | 10 +++++++--- htdocs/core/tpl/objectline_view.tpl.php | 5 ++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 4c64d2dce0e..71da7fd4e69 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -105,8 +105,12 @@ - info_bits & 2) != 2) { ?> - qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; ?> + info_bits & 2) != 2) { + // I comment this because it shows info even when not required + // for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated + // must also not be output for most entities (proposal, intervention, ...) + //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; + ?>   @@ -330,7 +334,7 @@ $(document).ready(function() { - margin->enabled)) { ?> + margin->enabled)) { ?> $.post('/fourn/ajax/getSupplierPrices.php', {'idprod': fk_product?$line->fk_product:0; ?>}, function(data) { if (data && data.length > 0) { var options = ''; diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 836c01c6499..7b3da647860 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -103,7 +103,10 @@ info_bits & 2) != 2) && $line->special_code != 3) { - if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; + // I comment this because it shows info even when not required + // for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated + // must also not be output for most entities (proposal, intervention, ...) + //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; echo $line->qty; } else echo ' '; ?>