]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/oe.pl
Fix zu Bug 1775: Wechselkurs in Einkaufrechnung kann nicht eingegeben werden
[mfinanz.git] / bin / mozilla / oe.pl
index 40a9b4e024ac31f32836d09006a7babf77953927..aa6df6d615f3a909f62a764e982ed4969463ddac 100644 (file)
@@ -536,11 +536,13 @@ sub update {
 
   set_headings($form->{"id"} ? "edit" : "add");
 
-  map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate) unless $recursive_call;
   $form->{update} = 1;
 
   &check_name($form->{vc});
 
+  if (!$form->{forex}) {        # read exchangerate from input field (not hidden)
+    map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate) unless $recursive_call;
+  }
   my $buysell           = 'buy';
   $buysell              = 'sell' if ($form->{vc} eq 'vendor');
   $form->{forex}        = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{transdate}, $buysell);