From 2ba54e72dcf3ec99173cdde7766bb446839f713a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 8 Dec 2007 20:37:45 +0000 Subject: [PATCH] =?UTF-8?q?Pour=20moi=20il=20n'=20y=20a=20pas=20de=20bug,?= =?UTF-8?q?=20il=20faut=20bien=20toujours=20d=E9duire=20le=20stock=5Fcomma?= =?UTF-8?q?nde=20du=20stock=20r=E9el=20m=EAme=20si=20le=20stock=20r=E9el?= =?UTF-8?q?=20est=20en=20n=E9gatif,=20ex:=20j'ai=20un=20stock=20r=E9el=20d?= =?UTF-8?q?e=20-5=20(n=E9gatif)=20si=20j'ai=20un=20stock=5Fcommande=20de?= =?UTF-8?q?=202=20on=20fait=20toujours=20-5=20-=202=20=3D=20-7=20donc=20il?= =?UTF-8?q?=20faudra=20bien=20pr=E9voir=20de=20commander=20au=20fournisseu?= =?UTF-8?q?r=207=20produits=20pour=20faire=20la=20balance=20avec=20le=20st?= =?UTF-8?q?ock=20disponible.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/langs/en_US/stocks.lang | 2 +- htdocs/product/reassort.php | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 6b294125ca0..4de8033bbf6 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -44,4 +44,4 @@ DeStockReStockOnShipment=Decrease/increase stocks on shipment StockAvailable=Available stock StockInstant=Real stock StockLimitShort=Limit -StockLimit=Stock limit +StockLimit=Stock limit \ No newline at end of file diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index e86b7e81499..4f47ef2245f 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -80,9 +80,8 @@ $sql = 'SELECT p.rowid, p.ref, p.label, p.price, p.fk_product_type, '.$db->pdate $sql.= ' p.duration, p.envente as statut, p.seuil_stock_alerte,'; $sql.= ' p.stock_commande,'; $sql.= ' SUM(s.reel) as stock,'; -// \FIXME Bug ? On soustrait le stock commandé alors qu'il ait stocké en base en négatif. Du coup on additionne ! $sql.= ' (SUM(s.reel) - p.stock_commande) as stock_dispo'; -$sql.= ' FROM '.MAIN_DB_PREFIX.'product_stock as s,'; // '.MAIN_DB_PREFIX.'product_det as d'; //en attendant le debugage +$sql.= ' FROM '.MAIN_DB_PREFIX.'product_stock as s,'; $sql.= ' '.MAIN_DB_PREFIX.'product as p'; if ($catid || ($conf->categorie->enabled && ! $user->rights->categorie->voir)) { @@ -193,6 +192,7 @@ if ($resql) print_liste_field_titre($langs->trans("StockAvailable"),"reassort.php", "p.stock_dispo","&envente=$envente&".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref","",'align="right"',$sortfield,$sortorder); if ($conf->service->enabled && $type == 1) print_liste_field_titre($langs->trans("Duration"),"reassort.php", "p.duration","&envente=$envente&".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref","",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("StockInstant"),"reassort.php", "stock","&envente=$envente&".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref","",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("StockLimit"),"reassort.php", "stock","&envente=$envente&".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref","",'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),"reassort.php", "p.envente","&envente=$envente&".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref","",'align="right"',$sortfield,$sortorder); print "\n"; @@ -214,10 +214,7 @@ if ($resql) print ' '; print ''; } - print ''; - print ' '; - print ''; - print ''; + print ''; print ' '; print ''; print ''; @@ -278,6 +275,7 @@ if ($resql) } print ''.$objp->stock_dispo.''; print ''.$objp->stock.''; + print ''.$objp->seuil_stock_alerte.''; print ''.$product_static->LibStatut($objp->statut,5).''; print "\n"; $i++;