ffzg/recall_notices.pl: added --interval and --dedup
[koha.git] / C4 / Circulation.pm
index b74fdff..ee9ca5f 100644 (file)
@@ -1534,6 +1534,13 @@ Get loan length for an itemtype, a borrower type and a branch
 
 sub GetLoanLength {
     my ( $borrowertype, $itemtype, $branchcode ) = @_;
+
+               # FIXME FFZG -- submit bug to koha
+               if ( ref($branchcode) ) {
+                       Carp::cluck("$branchcode");
+                       $branchcode = 'FFZG';
+                       warn "FIXME branchcode = $branchcode";
+               }
     my $dbh = C4::Context->dbh;
     my $sth = $dbh->prepare(qq{
         SELECT issuelength, lengthunit, renewalperiod
@@ -2385,7 +2392,7 @@ sub _FixAccountForLostAndReturned {
             accounttype => { -in => [ 'L', 'Rep', 'W' ] },
         },
         {
-            order_by => { -desc => [ 'date', 'accountno' ] }
+            order_by => { -desc => [ 'date', 'accountlines_id' ] }
         }
     );