fix : where fk_facture = object id

This commit is contained in:
gauthier 2016-11-28 17:12:17 +01:00
parent 792e12e6c5
commit 3f6f1ac86f

View File

@ -620,7 +620,7 @@ if (empty($reshook))
$sql = 'SELECT SUM(pf.amount) as total_paiements
FROM llx_c_paiement as c, llx_paiement_facture as pf, llx_paiement as p
WHERE pf.fk_facture = 10 AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid ORDER BY p.datep, p.tms';
WHERE pf.fk_facture = '.$object->id.' AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid ORDER BY p.datep, p.tms';
$resql = $db->query($sql);
$res = $db->fetch_object($resql);