Ajoute la fonction getSommePaiement

This commit is contained in:
Rodolphe Quiedeville 2003-10-27 12:39:21 +00:00
parent aaf6cb30ee
commit ac5f7b5155

View File

@ -768,6 +768,23 @@ class Facture
return -1;
}
}
/**
* Renvoie la sommes des paiements
*
*/
Function getSommePaiement()
{
$sql = "SELECT sum(amount) FROM llx_paiement WHERE fk_facture = ".$this->id;
if ($this->db->query($sql))
{
$row = $this->db->fetch_row(0);
return $row[0];
}
else
{
return -1;
}
}
/**
* RODO TODO
*