]> wagnertech.de Git - mfinanz.git/blobdiff - SL/AP.pm
Bugfixes zum Rechnungstemplate
[mfinanz.git] / SL / AP.pm
index ed0fe98c6e883073ea5ca6440f7751269025aceb..7b5a461505774eb22d762d7f5cfee586fdbdab42 100644 (file)
--- a/SL/AP.pm
+++ b/SL/AP.pm
@@ -37,6 +37,8 @@ package AP;
 use SL::DBUtils;
 use SL::MoreCommon;
 
+use strict;
+
 sub post_transaction {
   $main::lxdebug->enter_sub();
 
@@ -473,7 +475,7 @@ sub ap_transactions {
   }
 
   my @a = qw(transdate invnumber name);
-  push @a, "employee" if $self->{l_employee};
+  push @a, "employee" if $form->{l_employee};
   my $sortdir   = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC';
   my $sortorder = join(', ', map { "$_ $sortdir" } @a);
 
@@ -640,6 +642,7 @@ sub setup_form {
     $j = 0;
     $k = 0;
 
+    next unless $form->{acc_trans}{$key};
     for $i (1 .. scalar @{ $form->{acc_trans}{$key} }) {
 
       if ($key eq "AP_paid") {