]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/ir.pl
Mehrere neue Outputtypen für die parsing engine eingebaut:
[mfinanz.git] / bin / mozilla / ir.pl
index 6038276b69e7fbd02cfadb909109e7af2b709280..541eb6c06b18980214c6c41ed8157e45d1ca3228 100644 (file)
@@ -112,7 +112,7 @@ sub invoice_links {
   }
 
   # currencies
-  @curr = split /:/, $form->{currencies};
+  @curr = split(/:/, $form->{currencies});
   chomp $curr[0];
   $form->{defaultcurrency} = $curr[0];
 
@@ -189,6 +189,7 @@ sub prepare_invoice {
 
     map { $form->{$_} =~ s/\"/"/g } qw(invnumber ordnumber quonumber);
 
+    my $i = 0;
     foreach $ref (@{ $form->{invoice_details} }) {
       $i++;
       map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref};
@@ -684,8 +685,10 @@ sub form_footer {
       s/option>\Q$form->{"AP_paid_$i"}\E/option selected>$form->{"AP_paid_$i"}/;
 
     # format amounts
-    $form->{"paid_$i"} =
-      $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
+    if ($form->{"paid_$i"}) {
+      $form->{"paid_$i"} =
+        $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
+    }
     $form->{"exchangerate_$i"} =
       $form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
 
@@ -831,8 +834,6 @@ sub update {
 
   } else {
 
-    $form->{"selected_unit_$i"} = $form->{"unit_$i"};
-
     IR->retrieve_item(\%myconfig, \%$form);
 
     my $rows = scalar @{ $form->{item_list} };