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