Skip to content

Commit

Permalink
FIX It was possible to create cashfence without entering data.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 18, 2019
1 parent bbc1dfb commit 783e015
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion htdocs/compta/cashcontrol/cashcontrol_card.php
Expand Up @@ -132,7 +132,16 @@
$error=0;
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)
Expand Down

0 comments on commit 783e015

Please sign in to comment.