use C4::Acquisition;
use C4::Letters;
use Koha::DateUtils;
+use Koha::Acquisition::Orders;
my $input = new CGI;
my ($template, $loggedinuser, $cookie) = get_template_and_user(
}
};
- if ( $@ ) {
- $template->param(error_claim => $@);
- } elsif ( ref $err and exists $err->{error} and $err->{error} eq "no_email" ) {
+ if ( ref $err and exists $err->{error} and $err->{error} eq "no_email" ) {
$template->{VARS}->{'error_claim'} = "no_email";
} elsif ( ref $err and exists $err->{error} and $err->{error} eq "no_order_selected"){
$template->{VARS}->{'error_claim'} = "no_order_selected";
+ } elsif ( $@ or ref $err and exists $err->{error} ) {
+ $template->param(error_claim => $@ || $err->{error});
} else {
$template->{VARS}->{'info_claim'} = 1;
}