Fix: Avoid duplicate lines when fetch_lines called twice
This commit is contained in:
parent
637aa69e37
commit
7847e544a4
@ -351,6 +351,8 @@ class Contrat extends CommonObject
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
$this->lines=array();
|
||||
|
||||
// Selectionne les lignes contrats liees a un produit
|
||||
$sql = "SELECT p.label, p.description as product_desc, p.ref,";
|
||||
$sql.= " d.rowid, d.fk_contrat, d.statut, d.description, d.price_ht, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.qty, d.remise_percent, d.subprice,";
|
||||
@ -422,9 +424,9 @@ class Contrat extends CommonObject
|
||||
$line->date_debut_reel = $this->db->jdate($objp->date_ouverture);
|
||||
$line->date_fin_prevue = $this->db->jdate($objp->date_fin_validite);
|
||||
$line->date_fin_reel = $this->db->jdate($objp->date_cloture);
|
||||
|
||||
|
||||
$this->lines[] = $line;
|
||||
|
||||
|
||||
//dol_syslog("1 ".$line->desc);
|
||||
//dol_syslog("2 ".$line->product_desc);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user