# 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 = (