Implemented from the suggestions attached to the bug.
To test:
Check out a book to a patron
Click print -> quick slip
Slip should show only today's checkouts.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
# return unless ( C4::Context->boolean_preference('printcirculationslips') );
# return unless ( C4::Context->boolean_preference('printcirculationslips') );
- my $today = POSIX::strftime("%Y-%m-%d", localtime);
+ my $now = POSIX::strftime("%Y-%m-%d", localtime);
my $issueslist = GetPendingIssues($borrowernumber);
foreach my $it (@$issueslist){
my $issueslist = GetPendingIssues($borrowernumber);
foreach my $it (@$issueslist){
- if ($it->{'issuedate'} eq $today) {
- $it->{'today'} = 1;
+ if ((substr $it->{'issuedate'}, 0, 10) eq $now) {
+ $it->{'now'} = 1;
- elsif ($it->{'date_due'} le $today) {
+ elsif ((substr $it->{'date_due'}, 0, 10) le $now) {
'biblio' => $_,
'items' => $_,
'issues' => $_,
'biblio' => $_,
'items' => $_,
'issues' => $_,
- }, grep { $_->{'today'} } @issues ],
+ }, grep { $_->{'now'} } @issues ],