NEW : Add color regarding stock even on ajax autocompleter product
selector
This commit is contained in:
parent
a240cf30d6
commit
a013e84e0e
@ -2032,7 +2032,9 @@ class Form
|
|||||||
if (! empty($conf->stock->enabled) && isset($objp->stock) && $objp->fk_product_type == 0)
|
if (! empty($conf->stock->enabled) && isset($objp->stock) && $objp->fk_product_type == 0)
|
||||||
{
|
{
|
||||||
$opt.= ' - '.$langs->trans("Stock").':'.$objp->stock;
|
$opt.= ' - '.$langs->trans("Stock").':'.$objp->stock;
|
||||||
$outval.=' - '.$langs->transnoentities("Stock").':'.$objp->stock;
|
|
||||||
|
if ($objp->stock > 0) $outval.= '<span class="product_line_stock_ok">'.' - '.$langs->transnoentities("Stock").':'.$objp->stock.'</span>';
|
||||||
|
else if ($objp->stock <= 0) $outval.= '<span class="product_line_stock_too_low">'.' - '.$langs->transnoentities("Stock").':'.$objp->stock.'</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($outdurationvalue && $outdurationunit)
|
if ($outdurationvalue && $outdurationunit)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user