This commit is contained in:
Rodolphe Quiedeville 2003-10-12 18:18:21 +00:00
parent a7fb922fc7
commit 91832f2e3a

View File

@ -346,7 +346,7 @@ class Propal
$this->ref_url = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?propalid='.$this->id.'">'.$this->ref.'</a>'; $this->ref_url = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?propalid='.$this->id.'">'.$this->ref.'</a>';
/* /*
* Lignes * Lignes produits
*/ */
$sql = "SELECT p.rowid, p.label, p.description, p.ref, d.price, d.tva_tx, d.qty, d.remise_percent, d.subprice"; $sql = "SELECT p.rowid, p.label, p.description, p.ref, d.price, d.tva_tx, d.qty, d.remise_percent, d.subprice";
@ -377,7 +377,6 @@ class Propal
$this->lignes[$i] = $ligne; $this->lignes[$i] = $ligne;
$i++; $i++;
} }
$this->db->free(); $this->db->free();
} }
else else
@ -386,10 +385,9 @@ class Propal
} }
/* /*
* Lignes * Lignes génériques
*/ */
$sql = "SELECT d.qty, d.description, d.price, d.tva_tx, d.rowid, d.remise_percent";
$sql = "SELECT d.qty, d.description, d.price, d.tva_tx, d.rowid";
$sql .= " FROM llx_propaldet as d"; $sql .= " FROM llx_propaldet as d";
$sql .= " WHERE d.fk_propal = ".$this->id ." AND d.fk_product = 0"; $sql .= " WHERE d.fk_propal = ".$this->id ." AND d.fk_product = 0";
@ -403,12 +401,16 @@ class Propal
{ {
$objp = $this->db->fetch_object($i); $objp = $this->db->fetch_object($i);
$ligne = new PropaleLigne(); $ligne = new PropaleLigne();
$ligne->libelle = stripslashes($objp->description);
$ligne->desc = stripslashes($objp->description); $ligne->desc = stripslashes($objp->description);
$ligne->qty = $objp->qty; $ligne->qty = $objp->qty;
$ligne->ref = $objp->ref; $ligne->ref = $objp->ref;
$ligne->tva_tx = $objp->tva_tx; $ligne->tva_tx = $objp->tva_tx;
$ligne->subprice = $objp->subprice;
$ligne->remise_percent = $objp->remise_percent;
$ligne->price = $objp->price; $ligne->price = $objp->price;
$ligne->product_id = $objp->rowid; $ligne->product_id = 0;
$this->lignes[$i] = $ligne; $this->lignes[$i] = $ligne;
$i++; $i++;
$j++; $j++;