Bugzilla – Attachment 71810 Details for
Bug 19935
Move C4::Members::GetPendingIssues to the Koha namespace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19935: Replace GetPendingIssues - opac-user.pl
Bug-19935-Replace-GetPendingIssues---opac-userpl.patch (text/plain), 4.23 KB, created by
Jonathan Druart
on 2018-02-16 14:46:38 UTC
(
hide
)
Description:
Bug 19935: Replace GetPendingIssues - opac-user.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-02-16 14:46:38 UTC
Size:
4.23 KB
patch
obsolete
>From 2e48d4ebe7b5d3d04d307044c9e400f815900ef9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 8 Jan 2018 11:59:29 -0300 >Subject: [PATCH] Bug 19935: Replace GetPendingIssues - opac-user.pl > >At first glance we just need the biblio title and the subtitle (in >addition of the fines info), we should not need the prefetch. > >Test plan: >Loggin at the OPAC, on the summary page you should see your checkouts >and overdues with the correct values >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 6 +++--- > opac/opac-user.pl | 9 +++++---- > 2 files changed, 8 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 1a5203f719..229880cbd0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -246,14 +246,14 @@ Using this account is not recommended because some parts of Koha will not functi > <td class="date_due overdue"> > <span title="[% ISSUE.date_due %]"> > <span class="tdlabel">Date due:</span> >- [% ISSUE.date_due_sql | $KohaDates as_due_date => 1 %] >+ [% ISSUE.date_due | $KohaDates as_due_date => 1 %] > </span> > </td> > [% ELSE %] > <td class="date_due"> > <span title="[% ISSUE.date_due %]"> > <span class="tdlabel">Date due:</span> >- [% ISSUE.date_due_sql | $KohaDates as_due_date => 1 %] >+ [% ISSUE.date_due | $KohaDates as_due_date => 1 %] > </span> > </td> > [% END %] >@@ -540,7 +540,7 @@ Using this account is not recommended because some parts of Koha will not functi > <td> > <span title="[% OVERDUE.date_due %]"> > <span class="tdlabel">Date due:</span> >- [% OVERDUE.date_due_sql | $KohaDates as_due_date => 1 %] >+ [% OVERDUE.date_due | $KohaDates as_due_date => 1 %] > </span> > </td> > [% IF ( OpacRenewalAllowed ) %] >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index ac91d4f06a..774fd8ee8b 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -180,9 +180,10 @@ my $overdues_count = 0; > my @overdues; > my @issuedat; > my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } }; >-my $issues = GetPendingIssues($borrowernumber); >-if ($issues){ >- foreach my $issue ( sort { $b->{date_due}->datetime() cmp $a->{date_due}->datetime() } @{$issues} ) { >+my $pending_checkouts = $patron->pending_checkouts({}, { order_by => [ { -desc => 'date_due' }, { -asc => 'issue_id' } ] }); >+if ( $pending_checkouts->count ) { # Useless test >+ while ( my $c = $pending_checkouts->next ) { >+ my $issue = $c->unblessed_all_relateds; > # check for reserves > my $restype = GetReserveStatus( $issue->{'itemnumber'} ); > if ( $restype ) { >@@ -247,7 +248,7 @@ if ($issues){ > } > } > >- if ( $issue->{'overdue'} ) { >+ if ( $c->is_overdue ) { > push @overdues, $issue; > $overdues_count++; > $issue->{'overdue'} = 1; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19935
:
70351
|
70352
|
70353
|
70354
|
70355
|
70356
|
70357
|
70358
|
70359
|
70360
|
70361
|
71807
|
71808
|
71809
|
71810
|
71811
|
71812
|
71813
|
72752
|
72753
|
72754
|
72755
|
72756
|
72757
|
72758
|
72759
|
72760
|
72761
|
72762
|
73557
|
73558
|
73559
|
73560
|
73561
|
73562
|
73563
|
73564
|
73565
|
73566
|
73567
|
73568
|
73569
|
73570
|
73571
|
73572
|
73573
|
73574
|
73575
|
73576
|
73577
|
73578
|
73579
|
73580
|
73581
|
73582