From e712a2147eeaa7e73329b06cd55f744b2bb58e0d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 4 May 2010 14:06:08 +0200 Subject: [PATCH] =?utf8?q?Falsche=20Variablennamen=20f=C3=BCr=20W=C3=A4hru?= =?utf8?q?ng=20beim=20Buchen=20von=20Debitorenbuchungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Führt dazu, dass ein Wechselkurs benutzt werden soll, der aber 0 ist. Mit 0 multipliziert sind dann alle Positionen ebenfalls 0. --- SL/AR.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/AR.pm b/SL/AR.pm index df470761c..04af97350 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -54,7 +54,7 @@ sub post_transaction { my $dbh = $provided_dbh ? $provided_dbh : $form->dbconnect_noauto($myconfig); $form->{defaultcurrency} = $form->get_default_currency($myconfig); - delete $form->{currency} unless $form->{default_currency}; + delete $form->{currency} unless $form->{defaultcurrency}; # set exchangerate $form->{exchangerate} = ($form->{currency} eq $form->{defaultcurrency}) ? 1 : @@ -349,7 +349,7 @@ sub post_payment { $form->{exchangerate} = $form->format_amount($myconfig, $form->{exchangerate}); $form->{defaultcurrency} = $form->get_default_currency($myconfig); - delete $form->{currency} unless $form->{default_currency}; + delete $form->{currency} unless $form->{defaultcurrency}; # Get the AR accno (which is normally done by Form::create_links()). $query = -- 2.20.1