Merge pull request #6490 from atm-gauthier/4.0_fix_fetch_infos_multicurrency
FIX : load multicurrency informations on supplier order and bill line…
This commit is contained in:
commit
66d30344f9
@ -2752,7 +2752,8 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||||||
$sql.= ' cd.info_bits, cd.total_ht, cd.total_tva, cd.total_ttc,';
|
$sql.= ' cd.info_bits, cd.total_ht, cd.total_tva, cd.total_ttc,';
|
||||||
$sql.= ' cd.total_localtax1, cd.total_localtax2,';
|
$sql.= ' cd.total_localtax1, cd.total_localtax2,';
|
||||||
$sql.= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc,';
|
$sql.= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc,';
|
||||||
$sql.= ' cd.date_start, cd.date_end, cd.fk_unit';
|
$sql.= ' cd.date_start, cd.date_end, cd.fk_unit,';
|
||||||
|
$sql.= ' cd.multicurrency_subprice, cd.multicurrency_total_ht, cd.multicurrency_total_tva, cd.multicurrency_total_ttc';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON cd.fk_product = p.rowid';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON cd.fk_product = p.rowid';
|
||||||
$sql.= ' WHERE cd.rowid = '.$rowid;
|
$sql.= ' WHERE cd.rowid = '.$rowid;
|
||||||
@ -2787,6 +2788,11 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||||||
$this->date_end = $this->db->jdate($objp->date_end);
|
$this->date_end = $this->db->jdate($objp->date_end);
|
||||||
$this->fk_unit = $objp->fk_unit;
|
$this->fk_unit = $objp->fk_unit;
|
||||||
|
|
||||||
|
$this->multicurrency_subprice = $objp->multicurrency_subprice;
|
||||||
|
$this->multicurrency_total_ht = $objp->multicurrency_total_ht;
|
||||||
|
$this->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||||
|
$this->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2078,6 +2078,7 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
$sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 ';
|
$sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 ';
|
||||||
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit';
|
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit';
|
||||||
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
|
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
|
||||||
|
$sql.= ', f.multicurrency_subprice, f.multicurrency_total_ht, f.multicurrency_total_tva, multicurrency_total_ttc';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid';
|
||||||
$sql.= ' WHERE f.rowid = '.$rowid;
|
$sql.= ' WHERE f.rowid = '.$rowid;
|
||||||
@ -2130,6 +2131,11 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
$this->rang = $obj->rang;
|
$this->rang = $obj->rang;
|
||||||
$this->fk_unit = $obj->fk_unit;
|
$this->fk_unit = $obj->fk_unit;
|
||||||
|
|
||||||
|
$this->multicurrency_subprice = $obj->multicurrency_subprice;
|
||||||
|
$this->multicurrency_total_ht = $obj->multicurrency_total_ht;
|
||||||
|
$this->multicurrency_total_tva = $obj->multicurrency_total_tva;
|
||||||
|
$this->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user