# Build the combobox to select the billing place
my @billingplaceloop;
for (sort keys %$branches) {
- my $selected = 1 if $_ eq $billingplace;
- my %row = (
+ push @billingplaceloop, {
value => $_,
- selected => $selected,
+ selected => $_ eq $billingplace,
branchname => $branches->{$_}->{branchname},
- );
- push @billingplaceloop, \%row;
+ };
}
$template->param( billingplaceloop => \@billingplaceloop );
# Build the combobox to select the delivery place
my @deliveryplaceloop;
for (sort keys %$branches) {
- my $selected = 1 if $_ eq $deliveryplace;
- my %row = (
+ push @deliveryplaceloop, {
value => $_,
- selected => $selected,
+ selected => $_ eq $deliveryplace,
branchname => $branches->{$_}->{branchname},
- );
- push @deliveryplaceloop, \%row;
+ };
}
$template->param( deliveryplaceloop => \@deliveryplaceloop );
}
);
-my $from_iso = C4::Dates->new($input->param('from'))->output('iso') if $input->param('from');
-my $to_iso = C4::Dates->new($input->param('to'))->output('iso') if $input->param('iso');
+my ( $from_iso, $to_iso, $d );
+if ( $d = $input->param('from') ) {
+ $from_iso = C4::Dates->new($d)->output('iso');
+}
+if ( $d = $input->param('iso') ) {
+ $to_iso = C4::Dates->new($d)->output('iso');
+}
+
my ( $order_loop, $total_qty, $total_price, $total_qtyreceived ) =
- &GetHistory( $title, $author, $name, $from_iso, $to_iso );
-
+ GetHistory( $title, $author, $name, $from_iso, $to_iso );
+
$template->param(
suggestions_loop => $order_loop,
total_qty => $total_qty,