Merge pull request #15172 from fappels/13_fix_reception

Fix reception fetch_lines
This commit is contained in:
Laurent Destailleur 2020-10-26 18:53:15 +01:00 committed by GitHub
commit 3e050eba8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1018,12 +1018,12 @@ class Reception extends CommonObject
if (!empty($resql)) {
$this->lines = array();
while ($obj = $resql->fetch_object()) {
while ($obj = $this->db->fetch_object($resql)) {
$line = new CommandeFournisseurDispatch($this->db);
$line->fetch($obj->rowid);
$line->fetch_product();
$sql_commfourndet = 'SELECT qty, ref, label, tva_tx, vat_src_code, subprice, multicurrency_subprice, remise_percent FROM llx_commande_fournisseurdet WHERE rowid='.$line->fk_commandefourndet;
$resql_commfourndet = $db->query($sql_commfourndet);
$resql_commfourndet = $this->db->query($sql_commfourndet);
if (!empty($resql_commfourndet)) {
$obj = $this->db->fetch_object($resql_commfourndet);
$line->qty_asked = $obj->qty;