Bug fix: stock to buy now computes correctly when the stock too low picto is present
This commit is contained in:
parent
435deae5e9
commit
a607cb677d
@ -458,10 +458,11 @@ if ($resql) {
|
|||||||
} else {
|
} else {
|
||||||
$stock = $objp->stock_physique;
|
$stock = $objp->stock_physique;
|
||||||
}
|
}
|
||||||
|
$warning='';
|
||||||
if ($objp->seuil_stock_alerte
|
if ($objp->seuil_stock_alerte
|
||||||
&& ($stock < $objp->seuil_stock_alerte)) {
|
&& ($stock < $objp->seuil_stock_alerte)) {
|
||||||
$warn = $langs->trans('StockTooLow');
|
$warn = $langs->trans('StockTooLow');
|
||||||
$stock = img_warning($warn) . ' ' . $stock;
|
$warning = img_warning($warn) . ' ';
|
||||||
}
|
}
|
||||||
//depending on conf, use either physical stock or
|
//depending on conf, use either physical stock or
|
||||||
//virtual stock to compute the stock to buy value
|
//virtual stock to compute the stock to buy value
|
||||||
@ -470,7 +471,7 @@ if ($resql) {
|
|||||||
'<td align="right">',
|
'<td align="right">',
|
||||||
$stock,
|
$stock,
|
||||||
'</td>',
|
'</td>',
|
||||||
'<td align="right">'.$stocktobuy.'</td>',
|
'<td align="right">', $warning, $stocktobuy , '</td>',
|
||||||
'<input type="hidden" name="tobuy' . $i . '" value="' . $stocktobuy . '" >',
|
'<input type="hidden" name="tobuy' . $i . '" value="' . $stocktobuy . '" >',
|
||||||
'<td align="right">',
|
'<td align="right">',
|
||||||
ordered($prod->id),
|
ordered($prod->id),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user