Bug 30572: Dbrev for search_marc_to_field.sort
[koha-ffzg.git] / acqui / cancelorder.pl
index a0df47a..2d0d367 100755 (executable)
@@ -57,7 +57,7 @@ if( $action and $action eq "confirmcancel" ) {
     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 )
@@ -66,7 +66,7 @@ if( $action and $action eq "confirmcancel" ) {
             if $messages[0]->message eq 'error_delbiblio';
     } else {
         # 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);