bugfix
This commit is contained in:
parent
06e7e6d8f3
commit
912333c8b0
@ -95,9 +95,12 @@ class Livraison
|
|||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
|
|
||||||
$commande = new Commande($this->db);
|
if (!$conf->expedition->enabled)
|
||||||
$commande->id = $this->commande_id;
|
{
|
||||||
$lignes = $commande->fetch_lignes(1); //on ne prend que les produits
|
$commande = new Commande($this->db);
|
||||||
|
$commande->id = $this->commande_id;
|
||||||
|
$lignes = $commande->fetch_lignes();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -106,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]->id, $lignes[$i]->qty))
|
if (! $this->create_line(0, $lignes[$i]->commande_ligne_id, $lignes[$i]->qty))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
@ -404,12 +407,13 @@ class Livraison
|
|||||||
for ($i = 0 ; $i < sizeof($expedition->lignes) ; $i++)
|
for ($i = 0 ; $i < sizeof($expedition->lignes) ; $i++)
|
||||||
{
|
{
|
||||||
$LivraisonLigne = new LivraisonLigne();
|
$LivraisonLigne = new LivraisonLigne();
|
||||||
|
$LivraisonLigne->commande_ligne_id = $expedition->lignes[$i]->commande_ligne_id;
|
||||||
$LivraisonLigne->libelle = $expedition->lignes[$i]->libelle;
|
$LivraisonLigne->libelle = $expedition->lignes[$i]->libelle;
|
||||||
$LivraisonLigne->description = $expedition->lignes[$i]->product_desc;
|
$LivraisonLigne->description = $expedition->lignes[$i]->product_desc;
|
||||||
$LivraisonLigne->qty = $expedition->lignes[$i]->qty_commande;
|
$LivraisonLigne->qty = $expedition->lignes[$i]->qty_commande;
|
||||||
$LivraisonLigne->product_id = $expedition->lignes[$i]->product_id;
|
$LivraisonLigne->product_id = $expedition->lignes[$i]->product_id;
|
||||||
$LivraisonLigne->ref = $expedition->lignes[$i]->ref;
|
$LivraisonLigne->ref = $expedition->lignes[$i]->ref;
|
||||||
$this->lines[$i] = $LivraisonLigne;
|
$this->lignes[$i] = $LivraisonLigne;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->commande_id = $expedition->commande_id;
|
$this->commande_id = $expedition->commande_id;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user