]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/ir.pl
XUL - Menu für Firefox/Prism: Stylesheet geändert.
[mfinanz.git] / bin / mozilla / ir.pl
index 09ef5249c6db807dee465caaff3064eeb01c818e..06f6d059b139419eba1508885cfeca448bf3e98d 100644 (file)
@@ -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;