Fix duplicate fetch
This commit is contained in:
parent
d522c28b70
commit
8dea97510e
1 changed files with 4 additions and 7 deletions
|
|
@ -1336,12 +1336,12 @@ class SupplierProposal extends CommonObject
|
|||
$this->multicurrency_total_tva = $obj->multicurrency_total_tva;
|
||||
$this->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
|
||||
|
||||
$this->db->free($resql);
|
||||
|
||||
// Retrieve all extrafield
|
||||
// fetch optionals attributes and labels
|
||||
$this->fetch_optionals();
|
||||
|
||||
$this->db->free($resql);
|
||||
|
||||
$this->lines = array();
|
||||
|
||||
// Lines of supplier proposals
|
||||
|
|
@ -1367,7 +1367,6 @@ class SupplierProposal extends CommonObject
|
|||
|
||||
$line->rowid = $objp->rowid; // deprecated
|
||||
$line->id = $objp->rowid;
|
||||
$line->fetch_optionals();
|
||||
$line->fk_supplier_proposal = $objp->fk_supplier_proposal;
|
||||
$line->fk_parent_line = $objp->fk_parent_line;
|
||||
$line->product_type = $objp->product_type;
|
||||
|
|
@ -1417,6 +1416,8 @@ class SupplierProposal extends CommonObject
|
|||
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||
$line->fk_unit = $objp->fk_unit;
|
||||
|
||||
$line->fetch_optionals();
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
$i++;
|
||||
|
|
@ -1427,10 +1428,6 @@ class SupplierProposal extends CommonObject
|
|||
return -1;
|
||||
}
|
||||
|
||||
// Retrieve all extrafield
|
||||
// fetch optionals attributes and labels
|
||||
$this->fetch_optionals();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue