Bugzilla – Attachment 72760 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 - sco-main
Bug-19935-Replace-GetPendingIssues---sco-main.patch (text/plain), 2.17 KB, created by
Benjamin Rokseth
on 2018-03-13 10:03:13 UTC
(
hide
)
Description:
Bug 19935: Replace GetPendingIssues - sco-main
Filename:
MIME Type:
Creator:
Benjamin Rokseth
Created:
2018-03-13 10:03:13 UTC
Size:
2.17 KB
patch
obsolete
>From 458b80d881b426932c1819ee6e7fb6d6965d41e3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 8 Jan 2018 12:06:59 -0300 >Subject: [PATCH] Bug 19935: Replace GetPendingIssues - sco-main > >Same as previously, we do not need all the prefetched values here, just >a few. > >Test plan: >Use the self checkout module to check some items out > >Signed-off-by: Benjamin Rokseth <benjamin.rokseth@deichman.no> >--- > opac/sco/sco-main.pl | 21 +++++++++++---------- > 1 file changed, 11 insertions(+), 10 deletions(-) > >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index cec66b6..b6b281c 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -245,24 +245,25 @@ if ($borrower) { > # warn "issuer's branchcode: " . $issuer->{branchcode}; > # warn "user's branchcode: " . $borrower->{branchcode}; > my $borrowername = sprintf "%s %s", ($borrower->{firstname} || ''), ($borrower->{surname} || ''); >- my @issues; >- my ($issueslist) = GetPendingIssues( $borrower->{'borrowernumber'} ); >- foreach my $it (@$issueslist) { >+ my $pending_checkouts = $patron->pending_checkouts; >+ my @checkouts; >+ while ( my $c = $pending_checkouts->next ) { >+ my $checkout = $c->unblessed_all_relateds; > my ($can_be_renewed, $renew_error) = CanBookBeRenewed( > $borrower->{borrowernumber}, >- $it->{itemnumber}, >+ $checkout->{itemnumber}, > ); >- $it->{can_be_renewed} = $can_be_renewed; >- $it->{renew_error} = $renew_error; >- $it->{date_due} = $it->{date_due_sql}; >- push @issues, $it; >+ $checkout->{can_be_renewed} = $can_be_renewed; # In the future this will be $checkout->can_be_renewed >+ $checkout->{renew_error} = $renew_error; >+ $checkout->{overdue} = $c->is_overdue; >+ push @checkouts, $checkout; > } > > $template->param( > validuser => 1, > borrowername => $borrowername, >- issues_count => scalar(@issues), >- ISSUES => \@issues, >+ issues_count => scalar(@checkouts), >+ ISSUES => \@checkouts, > patronid => $patronid, > patronlogin => $patronlogin, > patronpw => $patronpw, >-- >2.1.4
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