Skip to content
Snippets Groups Projects
Commit 3df537ff authored by Rodolphe Quiedeville's avatar Rodolphe Quiedeville
Browse files

Modif des logs et montant négatif

parent 966a46a8
No related branches found
No related tags found
No related merge requests found
......@@ -162,24 +162,28 @@ class Paiement
$value = trim($value);
$amount = ereg_replace(",",".",round($value, 2));
if (is_numeric($amount) && $amount > 0)
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."')";
if (! $this->db->query($sql) )
{
dolibarr_print_error($this->db);
dolibarr_syslog("Paiement::Create Erreur INSERT dans paiement_facture ".$facid);
$sql_err++;
}
}
else
{
dolibarr_syslog("Paiement::Create Montant non numérique");
}
}
}
else
{
dolibarr_print_error($this->db);
dolibarr_syslog("Paiement::Create Erreur INSERT dans paiement");
$sql_err++;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment