From 0b9fc4e613db11933371e06ccd2f2ed1ca293e38 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 9 Oct 2015 13:06:19 +0200 Subject: [PATCH] Rechnungen: vor Benutzen von SL::DB::Invoice Modul auch laden. Sonst gibt es eine Fehlermeldung, zumindest ohne fcgi. --- bin/mozilla/is.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 7700fc271..49b0c1e04 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -292,7 +292,10 @@ sub form_header { my %TMPL_VAR = (); my @custom_hiddens; - $TMPL_VAR{invoice_obj} = SL::DB::Invoice->new(id => $form->{id})->load if $form->{id}; + if ($form->{id}) { + require SL::DB::Invoice; + $TMPL_VAR{invoice_obj} = SL::DB::Invoice->new(id => $form->{id})->load; + } $form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id}; $form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id}; -- 2.20.1