Trim payment amounts

This allows to ignore trailing characters that may triggers a warning because the payment looks greater than what's
required
This commit is contained in:
Raphaël Doursenaud 2012-05-16 17:00:09 +02:00 committed by Laurent Destailleur
parent 1aa442977c
commit e1767d1337

View File

@ -75,7 +75,7 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye
if (substr($key,0,7) == 'amount_')
{
$cursorfacid = substr($key,7);
$amounts[$cursorfacid] = price2num($_POST[$key]);
$amounts[$cursorfacid] = price2num(trim($_POST[$key]));
$totalpaiement = $totalpaiement + $amounts[$cursorfacid];
$tmpfacture=new Facture($db);
$tmpfacture->fetch($cursorfacid);