From 6615ee7e6f12a8298b29ae84e95c90966f7d75a8 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Sat, 23 Nov 2013 14:59:28 +0100 Subject: [PATCH] [ bug #1148 ] Product consomation : supplier order bad status --- ChangeLog | 1 + htdocs/product/stats/commande_fournisseur.php | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4702e01e0a1..c49735f97e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Fix: [ bug #1105 ] Searching Boxes other search option Fix: wrong buy price update Fix: [ bug #1142 ] Set paiement on invoice (PGSql) Fix: [ bug #1145 ] Agenda button list type do not display +Fix: [ bug #1148 ] Product consomation : supplier order bad status ***** ChangeLog for 3.4.1 compared to 3.4.0 ***** Fix: Display buying price on line edit when no supplier price is defined diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 0e8b5509149..f8d73c3e5e9 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -25,7 +25,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $langs->load("orders"); @@ -136,8 +136,8 @@ if ($id > 0 || ! empty($ref)) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print "\n"; - $commandestatic=new Commande($db); - + $commandestatic=new CommandeFournisseur($db); + if ($num > 0) { $var=True; @@ -145,17 +145,19 @@ if ($id > 0 || ! empty($ref)) { $objp = $db->fetch_object($result); $var=!$var; + + $commandestatic->id=$objp->commandeid; + $commandestatic->ref=$objp->ref; + $commandestatic->statut=$objp->statut; print ""; - print ''.img_object($langs->trans("ShowOrder"),"order").' '; - print $objp->ref; - print "\n"; + print ''.$commandestatic->getNomUrl(1)."\n"; print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''; print "".$objp->code_client."\n"; print ""; print dol_print_date($db->jdate($objp->date_commande)).""; print "".price($objp->total_ht)."\n"; - print ''.$commandestatic->LibStatut($objp->statut,$objp->facture,5).''; + print ''.$commandestatic->getLibStatut(4).''; print "\n"; $i++; }