Fix sql error
This commit is contained in:
parent
ec28a4fcdc
commit
fe2e41527a
@ -253,7 +253,7 @@ if ($result > 0)
|
|||||||
/**
|
/**
|
||||||
* List of vendor invoices
|
* List of vendor invoices
|
||||||
*/
|
*/
|
||||||
$sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.total_ttc, f.date, f.fk_statut as status,';
|
$sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.paye, f.total_ht, f.total_tva, f.total_ttc, f.datef as date, f.fk_statut as status,';
|
||||||
$sql .= ' pf.amount, s.nom as name, s.rowid as socid';
|
$sql .= ' pf.amount, s.nom as name, s.rowid as socid';
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf,'.MAIN_DB_PREFIX.'facture_fourn as f,'.MAIN_DB_PREFIX.'societe as s';
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf,'.MAIN_DB_PREFIX.'facture_fourn as f,'.MAIN_DB_PREFIX.'societe as s';
|
||||||
$sql .= ' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid';
|
$sql .= ' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid';
|
||||||
@ -286,9 +286,13 @@ if ($result > 0)
|
|||||||
|
|
||||||
$facturestatic->id = $objp->facid;
|
$facturestatic->id = $objp->facid;
|
||||||
$facturestatic->ref = ($objp->ref ? $objp->ref : $objp->rowid);
|
$facturestatic->ref = ($objp->ref ? $objp->ref : $objp->rowid);
|
||||||
$facturestatic->date = $db->jdate($obj->date);
|
$facturestatic->date = $db->jdate($objp->date);
|
||||||
$facturestatic->type = $obj->type;
|
$facturestatic->type = $objp->type;
|
||||||
$facturestatic->statut = $obj->status;
|
$facturestatic->total_ht = $objp->total_ht;
|
||||||
|
$facturestatic->total_tva = $objp->total_tva;
|
||||||
|
$facturestatic->total_ttc = $objp->total_ttc;
|
||||||
|
$facturestatic->statut = $objp->status;
|
||||||
|
$facturestatic->alreadypaid = -1; // unknown
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
// Ref
|
// Ref
|
||||||
@ -304,7 +308,7 @@ if ($result > 0)
|
|||||||
// Payed
|
// Payed
|
||||||
print '<td class="right">'.price($objp->amount).'</td>';
|
print '<td class="right">'.price($objp->amount).'</td>';
|
||||||
// Status
|
// Status
|
||||||
print '<td class="right">'.$facturestatic->LibStatut($objp->paye, $objp->fk_statut, 6, 1).'</td>';
|
print '<td class="right">'.$facturestatic->LibStatut($objp->paye, $objp->status, 6, 1).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if ($objp->paye == 1)
|
if ($objp->paye == 1)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user