Début ajout bon de livraison

This commit is contained in:
Regis Houssin 2006-05-31 08:17:35 +00:00
parent 61e231b2c9
commit 4d5bbcf210

View File

@ -95,29 +95,18 @@ class Livraison
if ($this->db->query($sql)) if ($this->db->query($sql))
{ {
/* //test $commande = new Commande($this->db);
if ($conf->expedition->enabled) $commande->id = $this->commande_id;
{ $lignes = $commande->fetch_lignes();
$this->expedition = new Expedition($this->db);
$this->expedition->id = $this->expedition_id;
$this->expedition->fetch_lignes();
}
else
*/
if (!$conf->expedition->enabled)
{
$this->commande = new Commande($this->db);
$this->commande->id = $this->commande_id;
$this->commande->fetch_lignes();
}
/* /*
* Insertion des produits dans la base * Insertion des produits dans la base
*/ */
for ($i = 0 ; $i < sizeof($this->lignes) ; $i++) for ($i = 0 ; $i < sizeof($lignes) ; $i++)
{ {
//TODO //TODO
if (! $this->create_line(0, $this->lignes[$i]->commande_ligne_id, $this->lignes[$i]->qty)) if (! $this->create_line(0, $lignes[$i]->id, $lignes[$i]->qty))
{ {
$error++; $error++;
} }