]> wagnertech.de Git - mfinanz.git/blobdiff - SL/IR.pm
Kosmetik: Leerzeichen an Zeilenenden entfernt. Die Abfragen für Buchungsgruppen umfor...
[mfinanz.git] / SL / IR.pm
index a6f66659e458d2df39d739ced16f777db5402267..d79e0fd5d9a10ebe68bc3c04111df7059358bf50 100644 (file)
--- a/SL/IR.pm
+++ b/SL/IR.pm
@@ -112,7 +112,7 @@ sub post_invoice {
       $form->{"inventory_accno_$i"} = $form->{"expense_accno_$i"};
     }
     
-    if ($form->{"qty_$i"} != 0) {
+    if ($form->{"id_$i"}) {
 
       # get item baseunit
       $query = qq|SELECT p.unit
@@ -1250,6 +1250,7 @@ sub vendor_details {
   # remove id and taxincluded before copy back
   delete @$ref{qw(id taxincluded)};
 
+  @wanted_vars = grep({ $_ } @wanted_vars);
   if (scalar(@wanted_vars) > 0) {
     my %h_wanted_vars;
     map({ $h_wanted_vars{$_} = 1; } @wanted_vars);