Bug 21467: Fix default sort
[koha.git] / serials / subscription-detail.pl
index 4eefe18..9ea681b 100755 (executable)
@@ -45,7 +45,7 @@ if ( $op and $op eq "close" ) {
     C4::Serials::ReopenSubscription( $subscriptionid );
 }
 
-# the subscription must be deletable if there is NO issues for a reason or another (should not happend, but...)
+# the subscription must be deletable if there is NO issues for a reason or another (should not happened, but...)
 
 # Permission needed if it is a deletion (del) : delete_subscription
 # Permission needed otherwise : *
@@ -129,7 +129,7 @@ for my $field ( @$additional_fields ) {
 $template->param( additional_fields_for_subscription => $additional_fields );
 
 # FIXME Do we want to hide canceled orders?
-my $orders = Koha::Acquisition::Orders->search( { subscriptionid => $subscriptionid } );
+my $orders = Koha::Acquisition::Orders->search( { subscriptionid => $subscriptionid }, { order_by => { -desc => 'parent_ordernumber' } } );
 
 $template->param(
     subscriptionid => $subscriptionid,