X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/9da45b829bedb62872220846b5f2685b359e8f81..cac2ae9bcd47fc55d35c37e25dbb03cd6ac6edeb:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index e28c35376..56acec2bf 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1032,6 +1032,12 @@ sub parse_template { $self->{"myconfig_${_}"} = $myconfig->{$_} for grep { $_ ne 'dbpasswd' } keys %{ $myconfig }; $self->{$_} = $defaults->$_ for qw(co_ustid); $self->{"myconfig_${_}"} = $defaults->$_ for qw(address businessnumber co_ustid company duns sepa_creditor_id taxnumber); + $self->{AUTH} = $::auth; + $self->{INSTANCE_CONF} = $::instance_conf; + $self->{LOCALE} = $::locale; + $self->{LXCONFIG} = $::lx_office_conf; + $self->{LXDEBUG} = $::lxdebug; + $self->{MYCONFIG} = \%::myconfig; $self->{copies} = 1 if (($self->{copies} *= 1) <= 0); @@ -1944,7 +1950,7 @@ sub get_duedate { : $self->{vendor_id} ? SL::DB::Vendor ->new(id => $self->{vendor_id}) ->load->payment : croak("Missing field in \$::form: payment_id, customer_id or vendor_id"); - my $duedate = $terms->calc_date(reference_date => $reference_date)->to_kivitendo; + my $duedate = $terms ? $terms->calc_date(reference_date => $reference_date)->to_kivitendo : undef; $main::lxdebug->leave_sub();