Bug 24190: (follow-up) Cancel order del item bug

If an order is cancelled but the associated bib / items are unable to be
removed, we go into error handling. We still need to log the
cancellation though. So this fix moves the logging to just after the
cancellation, so it will be logged regardless of the outcome with
associated things.

Signed-off-by: Maura Stephens <maura.stephens@gmit.ie>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Andrew Isherwood 2020-05-19 12:06:47 +01:00 committed by Jonathan Druart
parent bf90fb810e
commit 23e7f7995e

View file

@ -65,11 +65,11 @@ if( $action and $action eq "confirmcancel" ) {
$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")) {
logaction('ACQUISITIONS', 'CANCEL_ORDER', $ordernumber);
}
$template->param(success_cancelorder => 1);
}
$template->param(confirmcancel => 1);
}