diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 51e453393a0..c111c8553cb 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -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 ''; } + // Limit for alert + if (! empty($arrayfields['p.seuil_stock_alerte']['checked'])) + { + print ''; + print ' '; + print ''; + } // Desired stock if (! empty($arrayfields['p.desiredstock']['checked'])) { @@ -681,6 +690,16 @@ else } } + // Limit alert + if (! empty($arrayfields['p.seuil_stock_alerte']['checked'])) + { + print ''; + if ($objp->fk_product_type != 1) + { + print $objp->seuil_stock_alerte; + } + print ''; + } // Desired stock if (! empty($arrayfields['p.desiredstock']['checked'])) { @@ -691,7 +710,7 @@ else } print ''; } - // Desired stock + // Lot/Serial if (! empty($arrayfields['p.tobatch']['checked'])) { print ''; diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 27f85cd90ab..57ca1adff9d 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -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 ''; print ''.$objp->label.'';