Bug 22563: Typo in query (manualinvoice)
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 5 Jul 2019 17:47:09 +0000 (14:47 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 15 Jul 2019 10:28:03 +0000 (11:28 +0100)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

C4/Accounts.pm

index 3049116..34a3ef9 100644 (file)
@@ -163,7 +163,7 @@ sub manualinvoice {
           ? $checkouts->next
           : Koha::Old::Checkouts->search(
             { itemnumber => $itemnum, borrowernumber => $borrowernumber },
-            { order_by   => { 'DESC' => 'returndate' }, rows => 1 }
+            { order_by   => { -desc => 'returndate' }, rows => 1 }
         )->next;
         $issue_id = $checkout ? $checkout->issue_id : undef;
     }