From: Sven Schöling Date: Tue, 10 Mar 2009 12:32:44 +0000 (+0000) Subject: Bug 905. X-Git-Tag: release-2.6.0beta2~157 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1a16973b266728b4ef9a388fb82abe236675f266;p=kivitendo-erp.git Bug 905. check_currency sicherer gemacht und eine aufrufschwäche in do.pl beseitigt. --- 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');