Skip to content
Snippets Groups Projects
Commit 23af50ad authored by Benoit's avatar Benoit Committed by Laurent Destailleur
Browse files

Add fk_facture_fourn element to fetch lines objects

parent ec4e416a
No related branches found
No related tags found
No related merge requests found
......@@ -636,7 +636,7 @@ class FactureFournisseur extends CommonInvoice
function fetch_lines()
{
$sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.vat_src_code, f.tva_tx';
$sql.= ', f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 ';
$sql.= ', f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2, f.fk_facture_fourn ';
$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.= ', f.fk_multicurrency, f.multicurrency_code, f.multicurrency_subprice, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc';
......@@ -645,6 +645,7 @@ class FactureFournisseur extends CommonInvoice
$sql.= ' WHERE fk_facture_fourn='.$this->id;
$sql.= ' ORDER BY f.rang, f.rowid';
dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG);
$resql_rows = $this->db->query($sql);
if ($resql_rows)
......@@ -683,6 +684,7 @@ class FactureFournisseur extends CommonInvoice
$line->total_tva = $obj->total_tva;
$line->total_localtax1 = $obj->total_localtax1;
$line->total_localtax2 = $obj->total_localtax2;
$line->fk_facture_fourn = $obj->fk_facture_fourn;
$line->total_ttc = $obj->total_ttc;
$line->fk_product = $obj->fk_product;
$line->product_type = $obj->product_type;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment