X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b65a230d60e86d2c18a3ab7222379905aea5ecd7..c8c6d6d:/bin/mozilla/ir.pl diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index c44ef42f3..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,13 @@ 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; my $closedto = $form->datetonum($form->{closedto}, \%myconfig);