- my @branchloop;
- foreach my $thisbranch (sort keys %$branches) {
- my $selected = 1 if $thisbranch eq $branch;
- my %row = (
- value => $thisbranch,
- selected => $selected,
- branchname => $branches->{$thisbranch}->{branchname},
- );
- push @branchloop, \%row;
+
+ # Build the combobox to select the billing place
+ my @billingplaceloop;
+ for (sort keys %$branches) {
+ push @billingplaceloop, {
+ value => $_,
+ selected => $_ eq $billingplace,
+ branchname => $branches->{$_}->{branchname},
+ };
+ }
+ $template->param( billingplaceloop => \@billingplaceloop );
+
+ # Build the combobox to select the delivery place
+ my @deliveryplaceloop;
+ for (sort keys %$branches) {
+ push @deliveryplaceloop, {
+ value => $_,
+ selected => $_ eq $deliveryplace,
+ branchname => $branches->{$_}->{branchname},
+ };