Wechselkurs ging bei Kreditoren/Debitoren-Buchungen verloren, wenn er kleiner 1 war.
authorBernd Blessmann <bibi@online.de>
Wed, 31 Aug 2011 14:22:58 +0000 (16:22 +0200)
committerBernd Blessmann <bibi@online.de>
Wed, 31 Aug 2011 14:22:58 +0000 (16:22 +0200)
bin/mozilla/ap.pl
bin/mozilla/ar.pl

index d90b062..bc2986c 100644 (file)
@@ -684,12 +684,13 @@ $jsscript
     # format amounts
     if ($form->{"paid_$i"}) {
       $form->{"paid_$i"} =
-      $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
+        $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
     }
-    $form->{"exchangerate_$i"} =
-      $form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
     if ($form->{"exchangerate_$i"} == 0) {
       $form->{"exchangerate_$i"} = "";
+    } else {
+      $form->{"exchangerate_$i"} =
+        $form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
     }
 
     print qq|<input type=hidden name="gldate_$i" value=$form->{"gldate_$i"}>\n|;
index 8a04ac5..8ec365a 100644 (file)
@@ -727,11 +727,11 @@ $jsscript
       $form->{"paid_$i"} =
         $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
     }
-    $form->{"exchangerate_$i"} =
-      $form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
-
     if ($form->{"exchangerate_$i"} == 0) {
       $form->{"exchangerate_$i"} = "";
+    } else {
+      $form->{"exchangerate_$i"} =
+        $form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
     }
 
     $exchangerate = qq|&nbsp;|;