]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Fix zu Bug 1775: Wechselkurs in Einkaufrechnung kann nicht eingegeben werden
authorBernd Blessmann <bibi@online.de>
Mon, 16 Jan 2012 10:51:38 +0000 (11:51 +0100)
committerBernd Blessmann <bibi@online.de>
Mon, 16 Jan 2012 10:51:38 +0000 (11:51 +0100)
Auch Zahlenformatierung repariert, wenn man das Datum von einem mit vorhandenem
Wechselkurs in eines ohne wechselt (Ver- und Einkauf).

bin/mozilla/ir.pl
bin/mozilla/is.pl
bin/mozilla/oe.pl
doc/changelog

index 2ace9a7b434c58c380b4e810f8846f4376b0887b..25831b2eafd03097f6b8bea670ff9f32b81515c1 100644 (file)
@@ -463,10 +463,11 @@ sub update {
 
   $main::auth->assert('vendor_invoice_edit');
 
-#  map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate creditlimit creditremaining);
-
   &check_name('vendor');
 
+  if (!$form->{forex}) {        # read exchangerate from input field (not hidden)
+    $form->{exchangerate} = $form->parse_amount(\%myconfig, $form->{exchangerate});
+  }
   $form->{forex}        = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, 'sell');
   $form->{exchangerate} = $form->{forex} if $form->{forex};
 
index bcbf10782185b2b95d43bb6f44d04e5f020cb899..f438f1c9bdbaf5ca593bd4da814526351d525eb5 100644 (file)
@@ -485,8 +485,6 @@ sub update {
 
   my ($recursive_call) = @_;
 
-  $form->{exchangerate} = $form->parse_amount(\%myconfig, $form->{exchangerate}) unless $recursive_call;
-
   $form->{print_and_post} = 0         if $form->{second_run};
   my $taxincluded         = $form->{taxincluded} ? "checked" : '';
   $form->{update} = 1;
@@ -495,6 +493,9 @@ sub update {
 
   $form->{taxincluded} ||= $taxincluded;
 
+  if (!$form->{forex}) {        # read exchangerate from input field (not hidden)
+    $form->{exchangerate} = $form->parse_amount(\%myconfig, $form->{exchangerate}) unless $recursive_call;
+  }
   $form->{forex}        = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, 'buy');
   $form->{exchangerate} = $form->{forex} if $form->{forex};
 
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);
index c19e8c4c1f2c3dfee9f427cd89678ac00b7af73b..e85c85e23ae1f62e8bf62f0f93f5f640460e830a 100644 (file)
@@ -87,6 +87,7 @@
   - Bugfix 1752: Rechnung -> Druckvorschau ignoriert Änderung des Steuersatz beim Beleg
   - Bugfix 1708: Fehlender Übertrag der Lieferadresse von Angebot -> Auftragsbestätigung
   - Bugfix 1648: bebuchte Konten sollten nicht in Überschriften umgewandelt werden können
+  - Bugfix 1775: Wechselkurs in Einkaufrechnung kann nicht eingegeben werden
 
 
 2011-06-15 - Release 2.6.3