Einkaufsrechnungen: Nicht auf den bereits formatierten Wechselkurs prüfen.
authorSven Schöling <s.schoeling@linet-services.de>
Thu, 30 Dec 2010 17:08:51 +0000 (18:08 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 30 Dec 2010 17:09:26 +0000 (18:09 +0100)
Fix für Bug 1517.

bin/mozilla/ap.pl

index 06541ef..35fef99 100644 (file)
@@ -244,17 +244,10 @@ sub form_header {
   $form->{forex}        = $form->check_exchangerate( \%myconfig, $form->{currency}, $form->{transdate}, 'sell');
   $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");
 
   my $exchangerate = qq|
 <input type=hidden name=forex value=$form->{forex}>