});
my $booksellerid = $input->param('booksellerid') || undef; # we don't want "" or 0
-my $delay = $input->param('delay');
+my $delay = $input->param('delay') // 0;
# Get the "date from" param if !defined is today
my $estimateddeliverydatefrom = $input->param('estimateddeliverydatefrom');
# Format the output of "date from" and "date to"
if ($estimateddeliverydatefrom_dt) {
- $estimateddeliverydatefrom = output_pref($estimateddeliverydatefrom_dt, undef, 1);
+ $estimateddeliverydatefrom = output_pref({dt => $estimateddeliverydatefrom_dt, dateonly => 1});
}
if ($estimateddeliverydateto_dt) {
- $estimateddeliverydateto = output_pref($estimateddeliverydateto_dt, undef, 1);
+ $estimateddeliverydateto = output_pref({dt => $estimateddeliverydateto_dt, dateonly => 1});
}
my $branch = $input->param('branch');
}
if ($op and $op eq "send_alert"){
- my @ordernums = $input->param("claim_for");# FIXME: Fallback values?
+ my @ordernums = $input->param("ordernumber");# FIXME: Fallback values?
my $err;
eval {
$err = SendAlerts( 'claimacquisition', \@ordernums, $input->param("letter_code") ); # FIXME: Fallback value?
AddClaim ( $_ ) for @ordernums;
}
};
+
if ( $@ ) {
$template->param(error_claim => $@);
} elsif ( ref $err and exists $err->{error} and $err->{error} eq "no_email" ) {
}
}
-my @parameters = ( $delay, $branch );
+my @parameters = ( $delay );
push @parameters, $estimateddeliverydatefrom_dt
? $estimateddeliverydatefrom_dt->ymd()
: undef;
estimateddeliverydateto => $estimateddeliverydateto,
total => $total,
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
- DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
);
output_html_with_http_headers $input, $cookie, $template->output;