Bugzilla – Attachment 75176 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.65 KB, created by
Jonathan Druart
on 2018-05-08 16:50: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-05-08 16:50:58 UTC
Size:
5.65 KB
patch
obsolete
>From 7045e982f920f048e822d8f896099a9a0791e5ed 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 (?) >--- > 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 86a0698c2f..51d4ff29b3 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 ec6695c2ce..fd579e539d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -693,43 +693,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 %] >@@ -741,6 +744,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