Bugzilla – Attachment 120404 Details for
Bug 26273
Expose cashup summary history for a cash register
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28273: Add Koha::Biblios->pickup_locations
Bug-28273-Add-KohaBiblios-pickuplocations.patch (text/plain), 1.50 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-05-03 12:59:50 UTC
(
hide
)
Description:
Bug 28273: Add Koha::Biblios->pickup_locations
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-05-03 12:59:50 UTC
Size:
1.50 KB
patch
obsolete
>From 334c31db0697a54988c5f186084b211bdc17194e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 3 May 2021 09:45:41 -0300 >Subject: [PATCH] Bug 28273: Add Koha::Biblios->pickup_locations > >https://bugs.koha-community.org/show_bug.cgi?id=26273 >--- > Koha/Biblios.pm | 32 +++++++++++++++++++++++++++++++- > 1 file changed, 31 insertions(+), 1 deletion(-) > >diff --git a/Koha/Biblios.pm b/Koha/Biblios.pm >index 845298897b5..9491fb3112f 100644 >--- a/Koha/Biblios.pm >+++ b/Koha/Biblios.pm >@@ -24,6 +24,7 @@ use Carp; > use Koha::Database; > > use Koha::Biblio; >+use Koha::Libraries; > > use base qw(Koha::Objects); > >@@ -33,10 +34,39 @@ Koha::Biblios - Koha Biblio object set class > > =head1 API > >-=head2 Class Methods >+=head2 Class methods >+ >+=head3 pickup_locations >+ >+ my $biblios = Koha::Biblios->search(...); >+ my $pickup_locations = $biblios->pickup_locations({ patron => $patron }); >+ >+For a given resultset, it returns all the pickup locations > > =cut > >+sub pickup_locations { >+ my ( $self, $params ) = @_; >+ >+ my $patron = $params->{patron}; >+ >+ my @pickup_locations; >+ foreach my $biblio ( $self->as_list ) { >+ push @pickup_locations, >+ $biblio->pickup_locations( { patron => $patron } ) >+ ->_resultset->get_column('branchcode')->all; >+ } >+ >+ return Koha::Libraries->search( >+ { >+ branchcode => \@pickup_locations >+ }, >+ { order_by => ['branchname'] } >+ ); >+} >+ >+=head2 Internal methods >+ > =head3 type > > =cut >-- >2.31.1
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 26273
:
116176
|
116640
|
116685
|
116691
|
116692
|
116697
|
116698
|
116699
|
116710
|
116771
|
116772
|
116773
|
117449
|
117450
|
117451
|
117787
|
117793
|
117809
|
117810
|
117811
|
117829
|
117830
|
117831
|
117832
|
117833
|
117834
|
118125
|
118129
|
118130
|
118149
|
118150
|
118151
|
118152
|
120403
|
120404