Debitorenbuchungen: Nicht auf den bereits formatierten Wechselkurs prüfen.
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 19 Jan 2011 09:31:54 +0000 (10:31 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 19 Jan 2011 09:31:54 +0000 (10:31 +0100)
Fix für Bug 1554.

bin/mozilla/ar.pl

index 585301c..3d4fe26 100644 (file)
@@ -271,17 +271,9 @@ sub form_header {
   $form->{exchangerate} = $form->{forex} if $form->{forex};
 
   # format amounts
-  $form->{exchangerate} =
-    $form->format_amount(\%myconfig, $form->{exchangerate});
-
-  if ($form->{exchangerate} == 0) {
-    $form->{exchangerate} = "";
-  }
-
-  $form->{creditlimit} =
-    $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0");
-  $form->{creditremaining} =
-    $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0");
+  $form->{exchangerate}    = $form->{exchangerate} ? $form->format_amount(\%myconfig, $form->{exchangerate}) : '';
+  $form->{creditlimit}     = $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0");
+  $form->{creditremaining} = $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0");
 
   $exchangerate = qq|
 <input type=hidden name=forex value=$form->{forex}>