X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/631333651472a180e562efa70bcb8233c67beb22..c8c6d6d:/bin/mozilla/ir.pl diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 09ef5249c..06f6d059b 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -463,7 +463,7 @@ sub update { my $rows = scalar @{ $form->{item_list} }; if ($rows) { - $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"}); + $form->{"qty_$i"} = 1 unless $form->parse_amount(\%myconfig, $form->{"qty_$i"}); if ($rows > 1) { @@ -667,6 +667,12 @@ sub post { exit; } + if ($myconfig{mandatory_departments} && !$form->{department_id}) { + $form->{saved_message} = $::locale->text('You have to specify a department.'); + update(); + exit; + } + remove_emptied_rows(); &validate_items;