View | Details | Raw Unified | Return to bug 12388
Collapse All | Expand All

(-)a/C4/Members.pm (-3 / +17 lines)
Lines 534-539 sub IssueSlip { Link Here
534
                    lastreneweddate =>
534
                    lastreneweddate =>
535
                      { '>=' => $today_start, '<=' => $today_end, }
535
                      { '>=' => $today_start, '<=' => $today_end, }
536
                }
536
                }
537
            }, {
538
                order_by => [
539
                    { -asc => 'date_due' },
540
                    { -asc => 'issuedate' },
541
                ]
537
            }
542
            }
538
        );
543
        );
539
        my @checkouts;
544
        my @checkouts;
Lines 557-563 sub IssueSlip { Link Here
557
    else {
562
    else {
558
        my $today = Koha::Database->new->schema->storage->datetime_parser->format_datetime( dt_from_string );
563
        my $today = Koha::Database->new->schema->storage->datetime_parser->format_datetime( dt_from_string );
559
        # Checkouts due in the future
564
        # Checkouts due in the future
560
        my $checkouts = $pending_checkouts->search({ date_due => { '>' => $today } });
565
        my $checkouts = $pending_checkouts->search({ date_due => { '>' => $today } }, {
566
                order_by => [
567
                    { -asc => 'date_due' },
568
                    { -asc => 'issuedate' },
569
                ]
570
            });
561
        my @checkouts; my @overdues;
571
        my @checkouts; my @overdues;
562
        while ( my $c = $checkouts->next ) {
572
        while ( my $c = $checkouts->next ) {
563
            my $all = $c->unblessed_all_relateds;
573
            my $all = $c->unblessed_all_relateds;
Lines 570-576 sub IssueSlip { Link Here
570
        }
580
        }
571
581
572
        # Checkouts due in the past are overdues
582
        # Checkouts due in the past are overdues
573
        my $overdues = $pending_checkouts->search({ date_due => { '<=' => $today } });
583
        my $overdues = $pending_checkouts->search({ date_due => { '<=' => $today } }, {
584
                order_by => [
585
                    { -asc => 'date_due' },
586
                    { -asc => 'issuedate' },
587
                ]
588
            });
574
        while ( my $o = $overdues->next ) {
589
        while ( my $o = $overdues->next ) {
575
            my $all = $o->unblessed_all_relateds;
590
            my $all = $o->unblessed_all_relateds;
576
            push @overdues, {
591
            push @overdues, {
577
- 

Return to bug 12388