FIX It was possible to create cashfence without entering data.
This commit is contained in:
parent
bbc1dfb0f7
commit
783e01588c
@ -132,7 +132,16 @@ elseif ($action=="add")
|
|||||||
$error=0;
|
$error=0;
|
||||||
foreach($arrayofpaymentmode as $key=>$val)
|
foreach($arrayofpaymentmode as $key=>$val)
|
||||||
{
|
{
|
||||||
$object->$key = price2num(GETPOST($key.'_amount', 'alpha'));
|
if (GETPOST($key.'_amount', 'alpha') == '')
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv($val)), null, 'errors');
|
||||||
|
$action='start';
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$object->$key = price2num(GETPOST($key.'_amount', 'alpha'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user