Bug fix: stock to buy now computes correctly when the stock too low picto is present

This commit is contained in:
Cédric Salvador 2013-07-01 18:46:32 +02:00
parent 435deae5e9
commit a607cb677d

View File

@ -458,10 +458,11 @@ if ($resql) {
} else {
$stock = $objp->stock_physique;
}
$warning='';
if ($objp->seuil_stock_alerte
&& ($stock < $objp->seuil_stock_alerte)) {
$warn = $langs->trans('StockTooLow');
$stock = img_warning($warn) . ' ' . $stock;
$warning = img_warning($warn) . ' ';
}
//depending on conf, use either physical stock or
//virtual stock to compute the stock to buy value
@ -470,7 +471,7 @@ if ($resql) {
'<td align="right">',
$stock,
'</td>',
'<td align="right">'.$stocktobuy.'</td>',
'<td align="right">', $warning, $stocktobuy , '</td>',
'<input type="hidden" name="tobuy' . $i . '" value="' . $stocktobuy . '" >',
'<td align="right">',
ordered($prod->id),