]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Form.pm
Revert "Buchungsliste: Kontonamen werden nicht angezeigt."
[mfinanz.git] / SL / Form.pm
index e28c35376a7a2970990ac3b5007dac2453a258aa..56acec2bfb7c1a06a640ed1c56052e130dfac8f9 100644 (file)
@@ -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->{"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);
 
 
   $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");
 
               : $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();
 
 
   $main::lxdebug->leave_sub();