Fix: not complete renaming

This commit is contained in:
Laurent Destailleur 2013-04-11 23:04:25 +02:00
parent 891dbf5c60
commit edcc201305

View File

@ -243,6 +243,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
$total_localtax2='total_localtax2';
$paymenttable='paiement';
$paymentfacturetable='paiement_facture';
$invoicefieldref='facnumber';
}
if ($direction == 'buy')
{
@ -256,6 +257,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
$total_localtax2='total_localtax2';
$paymenttable='paiementfourn';
$paymentfacturetable='paiementfourn_facturefourn';
$invoicefieldref='ref';
}
// CAS DES BIENS
@ -279,7 +281,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
$sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,";
$sql .=" d.".$total_localtax1." as total_localtax1, d.".$total_localtax2." as total_localtax2, ";
$sql.= " d.date_start as date_start, d.date_end as date_end,";
$sql.= " f.facnumber as facnum, f.type, f.total_ttc as ftotal_ttc,";
$sql.= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc,";
$sql.= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,";
$sql.= " 0 as payment_id, 0 as payment_amount";
$sql.= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,";
@ -324,7 +326,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
$sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,";
$sql .=" d.".$total_localtax1." as total_localtax1, d.".$total_localtax2." as total_localtax2, ";
$sql.= " d.date_start as date_start, d.date_end as date_end,";
$sql.= " f.facnumber as facnum, f.type, f.total_ttc as ftotal_ttc,";
$sql.= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc,";
$sql.= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,";
$sql.= " 0 as payment_id, 0 as payment_amount";
$sql.= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,";
@ -437,7 +439,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
$sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,";
$sql .=" d.".$total_localtax1." as total_localtax1, d.".$total_localtax2." as total_localtax2, ";
$sql.= " d.date_start as date_start, d.date_end as date_end,";
$sql.= " f.facnumber as facnum, f.type, f.total_ttc as ftotal_ttc,";
$sql.= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc,";
$sql.= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,";
$sql.= " 0 as payment_id, 0 as payment_amount";
$sql.= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,";
@ -483,7 +485,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
$sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,";
$sql .=" d.".$total_localtax1." as total_localtax1, d.".$total_localtax2." as total_localtax2, ";
$sql.= " d.date_start as date_start, d.date_end as date_end,";
$sql.= " f.facnumber as facnum, f.type, f.total_ttc as ftotal_ttc,";
$sql.= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc,";
$sql.= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,";
$sql.= " pf.".$fk_payment." as payment_id, pf.amount as payment_amount";
$sql.= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,";