Bugzilla – Attachment 36922 Details for
Bug 11847
Display basketgroup closed date at OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11847: Display basketgroup closed date at OPAC
Bug-11847-Display-basketgroup-closed-date-at-OPAC.patch (text/plain), 2.87 KB, created by
Julian Maurice
on 2015-03-16 10:59:55 UTC
(
hide
)
Description:
Bug 11847: Display basketgroup closed date at OPAC
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2015-03-16 10:59:55 UTC
Size:
2.87 KB
patch
obsolete
>From c66fefb27f820a1764e4fb6b4e08b7d554d09e40 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 1 Aug 2014 10:34:33 +0200 >Subject: [PATCH] Bug 11847: Display basketgroup closed date at OPAC > >in Holdings table, on detail page. > >Test plan: >1/ Enable OPACAcquisitionDetails syspref >2/ Set AcqCreateItem syspref to "ordering" >3/ Create a basket with 1 order, close this basket then create a >basketgroup with this basket and close the basketgroup >4/ Create another basket with 1 order on the same biblio record as >previous order. Close the basket then create a basketgroup with this >basket but do not close it. >5/ Go to the OPAC detail page of the biblio record. >6/ In holdings table, under "Status" column, you should see: > - for the first item ordered: "On order since DATE" > - for the second item ordered: "On order" > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc | 8 +++++++- > opac/opac-detail.pl | 11 +++++++++-- > 2 files changed, 16 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >index 23b3a19..a80d984 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >@@ -1,4 +1,5 @@ > [% USE AuthorisedValues %] >+[% USE KohaDates %] > [% SET itemavailable = 1 %] > > [%#- >@@ -79,7 +80,12 @@ not use an API to fetch items that populates item.datedue. > > [% IF item.on_order %] > [% SET itemavailable = 0 %] >- <span class="item-status onorder">On order</span> >+ <span class="item-status onorder"> >+ On order >+ [% IF item.order_date %] >+ since [% item.order_date |$KohaDates %] >+ [% END %] >+ </span> > [% END %] > > [% IF ( itemavailable ) %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index b8cd194..c36f4d7 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -676,8 +676,15 @@ if ( not $viewallitems and @items > $max_items_to_display ) { > if ( C4::Context->preference('OPACAcquisitionDetails') > and C4::Context->preference('AcqCreateItem') eq 'ordering' ) > { >- $itm->{on_order} = 1 >- if grep /^$itm->{itemnumber}$/, @itemnumbers_on_order; >+ if (grep /^$itm->{itemnumber}$/, @itemnumbers_on_order) { >+ $itm->{on_order} = 1; >+ my $order = C4::Acquisition::GetOrderFromItemnumber($itm->{itemnumber}); >+ my $basket = C4::Acquisition::GetBasket($order->{basketno}); >+ my $basketgroup = C4::Acquisition::GetBasketgroup($basket->{basketgroupid}); >+ if ($basketgroup and $basketgroup->{closeddate}) { >+ $itm->{order_date} = $basketgroup->{closeddate}; >+ } >+ } > } > > my $itembranch = $itm->{$separatebranch}; >-- >1.9.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 11847
:
25639
|
30445
|
30480
|
32079
|
32088
| 36922 |
36923