From 1a16973b266728b4ef9a388fb82abe236675f266 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 10 Mar 2009 12:32:44 +0000 Subject: [PATCH] Bug 905. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit check_currency sicherer gemacht und eine aufrufschwäche in do.pl beseitigt. --- SL/Form.pm | 4 ++++ bin/mozilla/do.pl | 1 + 2 files changed, 5 insertions(+) diff --git a/SL/Form.pm b/SL/Form.pm index d68bc7152..355d60aef 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1628,6 +1628,10 @@ sub check_exchangerate { my ($self, $myconfig, $currency, $transdate, $fld) = @_; + if ($fld !~/^buy|sell$/) { + $self->error('Fatal: check_exchangerate called with invalid buy/sell argument'); + } + unless ($transdate) { $main::lxdebug->leave_sub(); return ""; diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index b3c9f10fb..29eff0ec8 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -655,6 +655,7 @@ sub invoice { $form->{title} = $locale->text('Add Vendor Invoice'); $form->{script} = 'ir.pl'; $script = "ir"; + $buysell = 'sell'; } else { $form->{title} = $locale->text('Add Sales Invoice'); -- 2.20.1