Fix: Problme de , sur le montant d'un paiement.

This commit is contained in:
Laurent Destailleur 2004-07-21 21:53:40 +00:00
parent 92c82f5129
commit 6fc9ec57dc

View File

@ -122,12 +122,12 @@ class Paiement
{
$facid = $key;
$value = trim($value);
$amount = round(ereg_replace(",",".",$value), 2);
$amount = ereg_replace(",",".",round($value, 2));
if (is_numeric($amount) && $amount > 0)
{
$sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement_facture (fk_facture, fk_paiement, amount)";
$sql .= " VALUES (".$facid.",". $this->id.",". $amount.")";
$sql .= " VALUES ('".$facid."','". $this->id."','". $amount."')";
if (! $this->db->query($sql) )
{
$sql_err++;