FIX Stock limit for alert added into list of available fields for stock
This commit is contained in:
parent
810a6c2cb4
commit
c6371060d0
@ -140,7 +140,8 @@ $arrayfields=array(
|
||||
'p.duration'=>array('label'=>$langs->trans("Duration"), 'checked'=>($contextpage != 'productlist'), 'enabled'=>(! empty($conf->service->enabled))),
|
||||
'p.sellprice'=>array('label'=>$titlesellprice, 'checked'=>1, 'enabled'=>empty($conf->global->PRODUIT_MULTIPRICES)),
|
||||
'p.minbuyprice'=>array('label'=>$langs->trans("BuyingPriceMinShort"), 'checked'=>1, 'enabled'=>(! empty($user->rights->fournisseur->lire))),
|
||||
'p.desiredstock'=>array('label'=>$langs->trans("DesiredStock"), 'checked'=>1, 'enabled'=>(! empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service')),
|
||||
'p.seuil_stock_alerte'=>array('label'=>$langs->trans("StockLimit"), 'checked'=>0, 'enabled'=>(! empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service')),
|
||||
'p.desiredstock'=>array('label'=>$langs->trans("DesiredStock"), 'checked'=>1, 'enabled'=>(! empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service')),
|
||||
'p.tobatch'=>array('label'=>$langs->trans("ManageLotSerial"), 'checked'=>0, 'enabled'=>(! empty($conf->productbatch->enabled))),
|
||||
'p.stock'=>array('label'=>$langs->trans("PhysicalStock"), 'checked'=>1, 'enabled'=>(! empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service')),
|
||||
'p.accountancy_code_sell'=>array('label'=>$langs->trans("ProductAccountancySellCode"), 'checked'=>0),
|
||||
@ -425,6 +426,7 @@ else
|
||||
if (! empty($arrayfields['p.duration']['checked'])) print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"],"p.duration","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.sellprice']['checked'])) print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.minbuyprice']['checked'])) print_liste_field_titre($arrayfields['p.minbuyprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.seuil_stock_alerte']['checked'])) print_liste_field_titre($arrayfields['p.seuil_stock_alerte']['label'], $_SERVER["PHP_SELF"],"p.seuil_stock_alerte","",$param,'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.desiredstock']['checked'])) print_liste_field_titre($arrayfields['p.desiredstock']['label'], $_SERVER["PHP_SELF"],"p.desiredstock","",$param,'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.tobatch']['checked'])) print_liste_field_titre($arrayfields['p.tobatch']['label'], $_SERVER["PHP_SELF"],"p.tobatch","",$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.stock']['checked'])) print_liste_field_titre($arrayfields['p.stock']['label'], $_SERVER["PHP_SELF"],"p.stock","",$param,'align="right"',$sortfield,$sortorder);
|
||||
@ -499,6 +501,13 @@ else
|
||||
print ' ';
|
||||
print '</td>';
|
||||
}
|
||||
// Limit for alert
|
||||
if (! empty($arrayfields['p.seuil_stock_alerte']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
}
|
||||
// Desired stock
|
||||
if (! empty($arrayfields['p.desiredstock']['checked']))
|
||||
{
|
||||
@ -681,6 +690,16 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
// Limit alert
|
||||
if (! empty($arrayfields['p.seuil_stock_alerte']['checked']))
|
||||
{
|
||||
print '<td align="right">';
|
||||
if ($objp->fk_product_type != 1)
|
||||
{
|
||||
print $objp->seuil_stock_alerte;
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
// Desired stock
|
||||
if (! empty($arrayfields['p.desiredstock']['checked']))
|
||||
{
|
||||
@ -691,7 +710,7 @@ else
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
// Desired stock
|
||||
// Lot/Serial
|
||||
if (! empty($arrayfields['p.tobatch']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
|
||||
@ -316,7 +316,7 @@ if ($resql)
|
||||
$product_static->label = $objp->label;
|
||||
$product_static->type=$objp->fk_product_type;
|
||||
$product_static->entity=$objp->entity;
|
||||
print $product_static->getNomUrl(1,'',16);
|
||||
print $product_static->getNomUrl(1,'',24);
|
||||
//if ($objp->stock_theorique < $objp->seuil_stock_alerte) print ' '.img_warning($langs->trans("StockTooLow"));
|
||||
print '</td>';
|
||||
print '<td>'.$objp->label.'</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user