# should there be any missing vars, declare them globally
use strict;
-1;
-
-# end of main
-
# this is for our long dates
# $locale->text('January')
# $locale->text('February')
# 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|
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 = (
$main::lxdebug->leave_sub();
}
+1;