]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/rp.pl
Zusätzliche Auftragsfelder beim Laden von Rechnungen holen.
[mfinanz.git] / bin / mozilla / rp.pl
index db1473ed58b20a614f40e641a0804a540392848d..5099c899551d9d1171fd3fad1b3dfba6f841674b 100644 (file)
@@ -154,9 +154,9 @@ sub report {
 
   # get departments
   $form->all_departments(\%myconfig);
-  if (@{ $form->{all_departments} }) {
+  if (@{ $form->{all_departments} || [] }) {
     $form->{selectdepartment} = "<option>\n";
-    map { $form->{selectdepartment} .= "<option>$_->{description}--$_->{id}\n" } @{ $form->{all_departments} };
+    map { $form->{selectdepartment} .= "<option>$_->{description}--$_->{id}\n" } @{ $form->{all_departments} || [] };
   }
 
   my $department = qq|
@@ -1296,7 +1296,7 @@ sub generate_trial_balance {
   RP->trial_balance(\%myconfig, \%$form, 'beginning_balances' => 1);
 
 
-  $form->{rowcount} = scalar @{ $form->{TB} };
+  $form->{rowcount} = scalar @{ $form->{TB} || [] };
   $form->{title} = sprintf($locale->text('Trial balance between %s and %s'), $form->{fromdate}, $form->{todate});
 
   my @columns = (