ORDER BY description|;
$self->{all_departments} = selectall_hashref_query($self, $dbh, $query);
- delete($self->{all_departments}) unless (@{ $self->{all_departments} });
+ delete($self->{all_departments}) unless (@{ $self->{all_departments} || [] });
$main::lxdebug->leave_sub();
}
}
# departments
- if (@{ $form->{all_departments} }) {
+ if (@{ $form->{all_departments} || [] }) {
$form->{selectdepartment} = "<option>\n";
$form->{department} = "$form->{department}--$form->{department_id}";
map {
$form->{selectdepartment} .=
"<option>$_->{description}--$_->{id}\n"
- } (@{ $form->{all_departments} });
+ } (@{ $form->{all_departments} || [] });
}
$form->{employee} = "$form->{employee}--$form->{employee_id}";
}
# departments
- if (@{ $form->{all_departments} }) {
+ if (@{ $form->{all_departments} || [] }) {
$form->{selectdepartment} = "<option>\n";
map {
$form->{selectdepartment} .=
"<option>$_->{description}--$_->{id}\n"
- } (@{ $form->{all_departments} });
+ } (@{ $form->{all_departments} || [] });
}
my $department = qq|
}
# departments
- if (@{ $form->{all_departments} }) {
+ if (@{ $form->{all_departments} || [] }) {
$form->{selectdepartment} = "<option>\n";
$form->{department} = "$form->{department}--$form->{department_id}";
map {
$form->{selectdepartment} .=
"<option>$_->{description}--$_->{id}\n"
- } (@{ $form->{all_departments} });
+ } (@{ $form->{all_departments} || [] });
}
$form->{employee} = "$form->{employee}--$form->{employee_id}";
# sales staff
- if (@{ $form->{all_employees} }) {
+ if (@{ $form->{all_employees} || [] }) {
$form->{selectemployee} = "";
map { $form->{selectemployee} .= "<option>$_->{name}--$_->{id}\n" }
- (@{ $form->{all_employees} });
+ (@{ $form->{all_employees} || [] });
}
# build the popup menus
}
# departments
- if (@{ $form->{all_departments} }) {
+ if (@{ $form->{all_departments} || [] }) {
$form->{selectdepartment} = "<option>\n";
map {
$form->{selectdepartment} .=
"<option>$_->{description}--$_->{id}\n"
- } (@{ $form->{all_departments} });
+ } (@{ $form->{all_departments} || [] });
}
$department = qq|
map {
$form->{selectdepartment} .=
"<option>$_->{description}--$_->{id}\n"
- } (@{ $form->{all_departments} });
+ } (@{ $form->{all_departments} || [] });
}
my $department = qq|
}
# departments
- if (@{ $form->{all_departments} }) {
+ if (@{ $form->{all_departments} || [] }) {
$form->{selectdepartment} = "<option>\n";
$form->{department} = "$form->{department}--$form->{department_id}";
map {
$form->{selectdepartment} .=
"<option>$_->{description}--$_->{id}\n"
- } (@{ $form->{all_departments} });
+ } (@{ $form->{all_departments} || [] });
}
CP->paymentaccounts(\%myconfig, \%$form);
$form->{SHOW_CUSTOMER_SELECTION} = $form->{all_customer} && scalar @{ $form->{all_customer} };
$form->{SHOW_DUNNING_LEVEL_SELECTION} = $form->{DUNNING} && scalar @{ $form->{DUNNING} };
- $form->{SHOW_DEPARTMENT_SELECTION} = $form->{all_departments} && scalar @{ $form->{all_departments} };
+ $form->{SHOW_DEPARTMENT_SELECTION} = $form->{all_departments} && scalar @{ $form->{all_departments} || [] };
$form->{title} = $locale->text('Start Dunning Process');
$form->{jsscript} = 1;
# 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} });
+ } (@{ $form->{all_departments} || [] });
}
$form->{show_details} = $myconfig{show_form_details} unless defined $form->{show_details};
# 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} });
+ } (@{ $form->{all_departments} || [] });
}
my $i = 1;
$form->all_departments(\%myconfig);
# departments
- if (@{ $form->{all_departments} }) {
+ if (@{ $form->{all_departments} || [] }) {
$form->{selectdepartment} = "<option>\n";
map {
$form->{selectdepartment} .=
"<option>$_->{description}--$_->{id}\n"
- } (@{ $form->{all_departments} });
+ } (@{ $form->{all_departments} || [] });
}
my $department = qq|
map {
$form->{selectdepartment} .=
"<option>$_->{description}--$_->{id}\n"
- } (@{ $form->{all_departments} });
+ } (@{ $form->{all_departments} || [] });
}
# forex
map {
$form->{selectdepartment} .=
"<option>$_->{description}--$_->{id}</option>\n"
- } (@{ $form->{all_departments} });
+ } (@{ $form->{all_departments} || [] });
}
$form->{employee} = "$form->{employee}--$form->{employee_id}";
$form->all_departments(\%myconfig);
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|