Fix: Revert bugged new feature that show false information.

This commit is contained in:
Laurent Destailleur 2012-10-06 23:13:46 +02:00
parent 430b63f4e1
commit 215d7a883e
2 changed files with 11 additions and 4 deletions

View File

@ -105,8 +105,12 @@
<?php } ?>
<td align="right">
<?php if (($line->info_bits & 2) != 2) { ?>
<?php if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; ?>
<?php if (($line->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;"')." ";
?>
<input size="3" type="text" class="flat" name="qty" value="<?php echo $line->qty; ?>">
<?php } else { ?>
&nbsp;
@ -330,7 +334,7 @@ $(document).ready(function() {
<?php } ?>
<?php if (! empty($conf->margin->enabled)) { ?>
<?php if (! empty($conf->margin->enabled)) { ?>
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php', {'idprod': <?php echo $line->fk_product?$line->fk_product:0; ?>}, function(data) {
if (data && data.length > 0) {
var options = '';

View File

@ -103,7 +103,10 @@
<td align="right" nowrap="nowrap">
<?php if ((($line->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 '&nbsp;'; ?>
</td>