my $reason = $input->param('reason');
my $order = Koha::Acquisition::Orders->find($ordernumber);
$order->cancel({ reason => $reason, delete_biblio => $delete_biblio });
- my @messages = @{ $order->messages };
+ my @messages = @{ $order->object_messages };
if ( scalar @messages > 0 ) {
$template->param( error_delitem => 1 )
$template->param( error_delbiblio => 1 )
if $messages[0]->message eq 'error_delbiblio';
} else {
- $template->param(success_cancelorder => 1);
# Log the cancellation of the order
- if (C4::Context->preference("AcqLog")) {
+ if (C4::Context->preference("AcquisitionLog")) {
logaction('ACQUISITIONS', 'CANCEL_ORDER', $ordernumber);
}
+ $template->param(success_cancelorder => 1);
}
$template->param(confirmcancel => 1);
}