Correction erreur si pas de prix saisi
This commit is contained in:
parent
b0a44b85c6
commit
1d4f17ead6
@ -74,6 +74,10 @@ $form->runIf(f('save') && !$form->hasErrors(),
|
|||||||
{
|
{
|
||||||
foreach(f('designation') as $k=>$value)
|
foreach(f('designation') as $k=>$value)
|
||||||
{
|
{
|
||||||
|
if ($value != '' && f('prix')[$k] == null) {
|
||||||
|
throw new UserException('Il manque le prix sur la ligne '. $k+1 . ' !!');
|
||||||
|
}
|
||||||
|
|
||||||
$data['contenu'][$k]['designation'] = $value;
|
$data['contenu'][$k]['designation'] = $value;
|
||||||
$data['contenu'][$k]['prix'] = Utils::moneyToInteger(f('prix')[$k]);
|
$data['contenu'][$k]['prix'] = Utils::moneyToInteger(f('prix')[$k]);
|
||||||
$data['toto'] += Utils::moneyToInteger(f('prix')[$k]);
|
$data['toto'] += Utils::moneyToInteger(f('prix')[$k]);
|
||||||
|
Loading…
Reference in New Issue
Block a user