From 4f399131468efcf0237aabedf87c2b52671bfccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Fri, 31 May 2013 11:05:50 +0200 Subject: [PATCH] display the desiredstock field in product/reassort.php --- htdocs/product/reassort.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index f39a06f36c2..3aa7f8820f2 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -104,6 +104,7 @@ $sql = 'SELECT p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price $sql.= ' p.fk_product_type, p.tms as datem,'; $sql.= ' p.duration, p.tosell as statut, p.tobuy, p.seuil_stock_alerte,'; $sql.= ' SUM(s.reel) as stock_physique'; +$sql .= ', p.desiredstock'; $sql.= ' FROM ('.MAIN_DB_PREFIX.'product as p'; // We'll need this table joined to the select in order to filter by categ if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_product as cp"; @@ -157,6 +158,7 @@ if ($search_categ) $sql.= " GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type,"; $sql.= " p.fk_product_type, p.tms,"; $sql.= " p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte"; +$sql .= ", p.desiredstock"; if ($toolowstock) $sql.= " HAVING SUM(s.reel) < p.seuil_stock_alerte"; // Not used yet $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit + 1, $offset); @@ -242,6 +244,7 @@ if ($resql) print_liste_field_titre($langs->trans("Label"),"reassort.php", "p.label",$param,"","",$sortfield,$sortorder); if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre($langs->trans("Duration"),"reassort.php", "p.duration",$param,"",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("MininumStock"),"reassort.php", "p.seuil_stock_alerte",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DesiredStock"),"reassort.php", "p.desiredstock",$param,"",'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("PhysicalStock"),"reassort.php", "stock_physique",$param,"",'align="right"',$sortfield,$sortorder); // TODO Add info of running suppliers/customers orders //print_liste_field_titre($langs->trans("TheoreticalStock"),"reassort.php", "stock_theorique",$param,"",'align="right"',$sortfield,$sortorder); @@ -267,7 +270,8 @@ if ($resql) print ' '; print ' '; print ' '; - print ' '; + print ' '; + print ' '; print ''; print ''; print ''; @@ -319,6 +323,7 @@ if ($resql) } //print ''.$objp->stock_theorique.''; print ''.$objp->seuil_stock_alerte.''; + print ''.$objp->desiredstock.''; print ''; if ($objp->seuil_stock_alerte && ($objp->stock_physique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' '; print $objp->stock_physique; @@ -356,4 +361,4 @@ else llxFooter(); $db->close(); -?> \ No newline at end of file +?>