Bugzilla – Attachment 77510 Details for
Bug 20366
More information about orders linked to subscriptions on "Acquisition details" tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20366: Add subscription info to the acq tab on the biblio detail page
Bug-20366-Add-subscription-info-to-the-acq-tab-on-.patch (text/plain), 5.81 KB, created by
Jonathan Druart
on 2018-08-06 21:11:58 UTC
(
hide
)
Description:
Bug 20366: Add subscription info to the acq tab on the biblio detail page
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-08-06 21:11:58 UTC
Size:
5.81 KB
patch
obsolete
>From 615958814c9e62348dd878785646b400a57498fb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 8 May 2018 13:31:55 -0300 >Subject: [PATCH] Bug 20366: Add subscription info to the acq tab on the biblio > detail page > >On the "Acquisition details" tab of the bibliographic detail page, the >subscription information are missing. >This patch replace the call to GetHistory with Koha::Acquisition::Orders >in order to simplify the code and make use of new Koha:: >packages/methods. > >TODO: Add column settings (show/hide columns) to this table (?) > >Sponsored-by: BULAC - http://www.bulac.fr/ > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > catalogue/detail.pl | 10 ++++-- > .../prog/en/modules/catalogue/detail.tt | 37 +++++++++++++++------- > 2 files changed, 33 insertions(+), 14 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 1c6b234651..fe59fa12cc 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -20,7 +20,6 @@ use Modern::Perl; > > use CGI qw ( -utf8 ); > use HTML::Entities; >-use C4::Acquisition qw( GetHistory ); > use C4::Auth; > use C4::Koha; > use C4::Serials; #uses getsubscriptionfrom biblionumber >@@ -180,7 +179,14 @@ foreach my $subscription (@subscriptions) { > > # Get acquisition details > if ( C4::Context->preference('AcquisitionDetails') ) { >- my $orders = C4::Acquisition::GetHistory( biblionumber => $biblionumber, get_canceled_order => 1 ); >+ my $orders = Koha::Acquisition::Orders->search( >+ { biblionumber => $biblionumber }, >+ { >+ join => 'basketno', >+ order_by => 'basketno.booksellerid' >+ } >+ ); # GetHistory sorted by aqbooksellerid, but does it make sense? >+ > $template->param( > orders => $orders, > ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index e4da23a9cf..51250df78c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -709,43 +709,46 @@ > <th class="title-string">Receive date</th> > <th>Status</th> > <th>Quantity</th> >+ <th>Subscription</th> >+ <th>Subscription callnumber</th> > </tr> > </thead> > <tbody> > [% FOR order IN orders %] >+ [% SET basket = order.basket %] >+ [% SET vendor = basket.bookseller %] > <tr> > <td> >- [% IF (order.id) %] >- <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.id %]" title="Vendor detail page">[% order.name %]</a> >- [% END %] >+ <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% vendor.id %]" title="Vendor detail page">[% vendor.name %]</a> > </td> > <td> >- [% IF (order.invoiceid) %] >+ [% IF order.invoiceid %] > [% IF CAN_user_acquisition %] > <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid %]" > title="Invoice detail page"> >- [% order.invoicenumber %]</a> >+ [% order.invoice.invoicenumber %]</a> > [% ELSE %] >- [% order.invoicenumber %] >+ [% order.invoice.invoicenumber %] > [% END %] > [% END %] > </td> > <td> >- [% IF (order.basketgroupid) %] >+ [% IF basket.basketgroupid %] >+ [% SET basket_group = basket.basket_group %] > [% IF CAN_user_acquisition_group_manage %] >- <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% order.id %]&basketgroupid=[% order.basketgroupid %]">[% order.groupname %] ([% order.basketgroupid %])</a> >+ <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% vendor.id %]&basketgroupid=[% basket_group.id %]">[% basket_group.name %] ([% basket_group.id %])</a> > [% ELSE %] >- [% order.groupname %] ([% order.basketgroupid %]) >+ [% basket_group.name %] ([% basket_group.id %]) > [% END %] > [% END %] > </td> > <td>[% IF CAN_user_acquisition_order_manage %] >- <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno %]">[% order.basketname %] ([% order.basketno %])</a> >+ <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">[% basket.basketname %] ([% basket.basketno %])</a> > [% ELSE %] >- [% order.basketname %] ([% order.basketno %]) >+ [% basket.basketname %] ([% basket.basketno %]) > [% END %]</td> > <td>[% order.ordernumber %]</td> >- <td><span title="[% order.creationdate %]">[% order.creationdate | $KohaDates%]</span></td> >+ <td><span title="[% basket.creationdate %]">[% basket.creationdate | $KohaDates%]</span></td> > <td><span title="[% order.datereceived %]">[% order.datereceived | $KohaDates%]</span></td> > <td> > [% SWITCH order.orderstatus %] >@@ -757,6 +760,16 @@ > [% END %] > </td> > <td>[% order.quantity %]</td> >+ <td> >+ [% IF order.subscriptionid %] >+ <a href="g/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% order.subscriptionid %]">[% order.subscriptionid %]</a> >+ [% END %] >+ </td> >+ <td> >+ [% IF order.subscriptionid %] >+ [% order.subscription.callnumber %] >+ [% END %] >+ </td> > </tr> > [% END %] > </tbody> >-- >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 20366
:
75174
|
75175
|
75176
|
77438
|
77439
|
77440
|
77441
|
77452
|
77453
|
77454
|
77455
|
77508
|
77509
|
77510
|
77511
|
78070
|
78071
|
78072
|
78073