From e1767d133786e131e93555ebe381c668e165a08e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Wed, 16 May 2012 17:00:09 +0200 Subject: [PATCH] Trim payment amounts This allows to ignore trailing characters that may triggers a warning because the payment looks greater than what's required --- htdocs/compta/paiement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 7d8caf6e69c..b66c4b09ecf 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -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);