2
0
forked from Wavyzz/dolibarr

Fix: jquery payment not stable

This commit is contained in:
Regis Houssin
2011-07-01 16:18:10 +00:00
parent 08d99b584b
commit 16947fff89

View File

@@ -24,13 +24,15 @@
require('../main.inc.php');
print_r($_POST);
// Getting the posted keys=>values, sanitize the ones who are from text inputs
// from text inputs : total amount
$amountPayment = price2num($_POST['amountPayment']);
$amountPayment = is_numeric($amountPayment)? $amountPayment : 0; // is a value
// from text inputs : invoice amount payment
$amounts = $_POST['amounts']; // is an array (need a foreach)
foreach ($amounts as $key => &$value)
foreach ($amounts as $key => $value)
{
$value = price2num($value);
if (!is_numeric($value)) unset($amounts[$key]);