Bugzilla – Attachment 20707 Details for
Bug 10609
Use branch name rather than branch code in serials-collection.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10609: Use branch name rather than branch code in serials-collection.pl (3.12.x)
Bug-10609-Use-branch-name-rather-than-branch-code-.patch (text/plain), 4.38 KB, created by
Tomás Cohen Arazi (tcohen)
on 2013-08-28 14:51:47 UTC
(
hide
)
Description:
Bug 10609: Use branch name rather than branch code in serials-collection.pl (3.12.x)
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2013-08-28 14:51:47 UTC
Size:
4.38 KB
patch
obsolete
>From 06386c1971890427b7dddf8b51640347e34c68df Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Wed, 28 Aug 2013 11:48:16 -0300 >Subject: [PATCH] Bug 10609: Use branch name rather than branch code in > serials-collection.pl (3.12.x) > >This is the 3.12.x compatible version of the patch for 10609. > >Regards >To+ > >Sponsored-by: Universidad Nacional de Cordoba >--- > C4/Serials.pm | 23 ++++++++++++-------- > .../prog/en/modules/serials/serials-collection.tt | 4 ++-- > serials/serials-collection.pl | 6 +++++ > 3 files changed, 22 insertions(+), 11 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 58c3838..6418412 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -369,6 +369,7 @@ sub GetFullSubscription { > aqbooksellers.name as aqbooksellername, > biblio.title as bibliotitle, > subscription.branchcode AS branchcode, >+ branches.branchname AS branchname, > subscription.subscriptionid AS subscriptionid |; > if ( C4::Context->preference('IndependantBranches') > && C4::Context->userenv >@@ -378,15 +379,19 @@ sub GetFullSubscription { > , ((subscription.branchcode <>\"" . C4::Context->userenv->{'branch'} . "\") and subscription.branchcode <>\"\" and subscription.branchcode IS NOT NULL) as cannotedit "; > } > $query .= qq| >- FROM serial >- LEFT JOIN subscription ON >- (serial.subscriptionid=subscription.subscriptionid ) >- LEFT JOIN aqbooksellers on subscription.aqbooksellerid=aqbooksellers.id >- LEFT JOIN biblio on biblio.biblionumber=subscription.biblionumber >- WHERE serial.subscriptionid = ? >- ORDER BY year DESC, >- IF(serial.publisheddate="00-00-0000",serial.planneddate,serial.publisheddate) DESC, >- serial.subscriptionid >+ FROM serial >+ LEFT JOIN subscription ON >+ ( serial.subscriptionid = subscription.subscriptionid ) >+ LEFT JOIN aqbooksellers ON >+ ( subscription.aqbooksellerid = aqbooksellers.id ) >+ LEFT JOIN biblio ON >+ ( biblio.biblionumber = subscription.biblionumber ) >+ LEFT JOIN branches ON >+ ( subscription.branchcode = branches.branchcode ) >+ WHERE serial.subscriptionid = ? >+ ORDER BY year DESC, >+ IF(serial.publisheddate="00-00-0000",serial.planneddate,serial.publisheddate) DESC, >+ serial.subscriptionid > |; > $debug and warn "GetFullSubscription query: $query"; > my $sth = $dbh->prepare($query); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >index b833795..71ba912 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >@@ -175,7 +175,7 @@ $(document).ready(function() { > [% IF ( subscription.numberpattern7 ) %] > None of the above > [% END %]</td> >- <td> [% subscription.branchcode %]</td> >+ <td> [% subscription.branchname %]</td> > <td> [% subscription.callnumber %]</td> > <td> [% subscription.notes %] > [% UNLESS subscription.closed %] >@@ -311,7 +311,7 @@ $(document).ready(function() { > [% serial.notes %] > </td> > <td> >- [% serial.branchcode %] >+ [% serial.branchname %] > </td> > [% IF ( routing ) %] > <td> >diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl >index 7428494..a0b7cf5 100755 >--- a/serials/serials-collection.pl >+++ b/serials/serials-collection.pl >@@ -23,6 +23,7 @@ use strict; > use warnings; > use CGI; > use C4::Auth; >+use C4::Branch qw/GetBranchName/; > use C4::Koha; > use C4::Dates qw/format_date/; > use C4::Serials; >@@ -114,6 +115,11 @@ if (@subscriptionid){ > $subs->{ "status" . $subs->{'status'} } = 1; > $subs->{startdate} = format_date( $subs->{startdate} ); > $subs->{histstartdate} = format_date( $subs->{histstartdate} ); >+ >+ if ( defined $subs->{ branchcode } ) { >+ $subs->{ branchname } = GetBranchName( $subs->{ branchcode } ); >+ } >+ > if ( !defined $subs->{enddate} || $subs->{enddate} eq '0000-00-00' ) { > $subs->{enddate} = ''; > } >-- >1.7.9.5
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 10609
:
19803
|
19966
|
20023
|
20707
|
21580
|
21837