This commit is contained in:
Regis Houssin 2006-05-31 16:02:14 +00:00
parent 912333c8b0
commit cd6c1c4546
2 changed files with 11 additions and 10 deletions

View File

@ -222,7 +222,7 @@ class Expedition
// ligne de produit associée à une expédition // ligne de produit associée à une expédition
$this->lignes = array(); $this->lignes = array();
$sql = "SELECT c.description, c.qty as qtycom, e.qty as qtyexp"; $sql = "SELECT c.description, c.qty as qtycom, e.qty as qtyexp, e.fk_commande_ligne";
$sql .= ", c.fk_product, c.label, p.ref"; $sql .= ", c.fk_product, c.label, p.ref";
$sql .= " FROM ".MAIN_DB_PREFIX."expeditiondet as e"; $sql .= " FROM ".MAIN_DB_PREFIX."expeditiondet as e";
$sql .= " , ".MAIN_DB_PREFIX."commandedet as c"; $sql .= " , ".MAIN_DB_PREFIX."commandedet as c";
@ -240,18 +240,19 @@ class Expedition
while ($i < $num) while ($i < $num)
{ {
$objp = $this->db->fetch_object($resultp); $objp = $this->db->fetch_object($resultp);
$ligne = new ExpeditionLigne(); $ligne = new ExpeditionLigne();
$ligne->product_desc = $objp->description; // Description ligne $ligne->commande_ligne_id = $objp->fk_commande_ligne;
$ligne->qty_commande = $objp->qtycom; $ligne->product_desc = $objp->description; // Description ligne
$ligne->product_id = $objp->fk_product; $ligne->qty_commande = $objp->qtycom;
$ligne->product_id = $objp->fk_product;
$ligne->libelle = $objp->label; // Label produit $ligne->libelle = $objp->label; // Label produit
$ligne->ref = $objp->ref; $ligne->ref = $objp->ref;
$this->lignes[$i] = $ligne; $this->lignes[$i] = $ligne;
$i++; $i++;
} }
$this->db->free($resultp); $this->db->free($resultp);

View File

@ -109,7 +109,7 @@ class Livraison
for ($i = 0 ; $i < sizeof($lignes) ; $i++) for ($i = 0 ; $i < sizeof($lignes) ; $i++)
{ {
//TODO //TODO
if (! $this->create_line(0, $lignes[$i]->commande_ligne_id, $lignes[$i]->qty)) if (! $this->create_line(0, $this->lignes[$i]->commande_ligne_id, $this->lignes[$i]->qty))
{ {
$error++; $error++;
} }