Bugzilla – Attachment 10403 Details for
Bug 6777
Display link to related acquisitions details from catalogue record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6777 - Display link to related acquisitions details from catalogue record
Bug-6777---Display-link-to-related-acquisitions-de.patch (text/plain), 6.44 KB, created by
Paul Poulain
on 2012-06-21 09:56:29 UTC
(
hide
)
Description:
Bug 6777 - Display link to related acquisitions details from catalogue record
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2012-06-21 09:56:29 UTC
Size:
6.44 KB
patch
obsolete
>From 91dcc17ca6b46cfebae556c8a61b2d27541829b0 Mon Sep 17 00:00:00 2001 >From: Shinoy M <shinoy.m@osslabs.biz> >Date: Tue, 5 Jun 2012 17:25:08 +0530 >Subject: [PATCH] Bug 6777 - Display link to related acquisitions details from catalogue record > >A new column -Acq info- has been added to the holding tab of the catalog detail page .The column will contain the link which will redirect to the order details of that item. The permission settings has been done so that the user who has the Manage orders & basket permission can see the link.The link is also visible under Item information in the Items tab. > >Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com> >--- > C4/Items.pm | 18 ++++++++++++++++++ > catalogue/detail.pl | 6 ++++++ > catalogue/moredetail.pl | 1 + > .../prog/en/modules/catalogue/detail.tt | 2 ++ > .../prog/en/modules/catalogue/moredetail.tt | 1 + > 5 files changed, 28 insertions(+), 0 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 2afe537..07e0e97 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -71,6 +71,7 @@ BEGIN { > get_hostitemnumbers_of > GetItemnumberFromBarcode > GetBarcodeFromItemnumber >+ GetOrdernumberFromItemnumber > GetHiddenItemnumbers > DelItemCheck > MoveItemFromBiblio >@@ -1579,6 +1580,23 @@ sub GetBarcodeFromItemnumber { > return ($result); > } > >+=head2 GetOrdernumberFromItemnumber >+ >+ $result = GetOrdernumberFromItemnumber($itemnumber); >+ >+=cut >+ >+sub GetOrdernumberFromItemnumber { >+ my ($itemnumber) = @_; >+ my $dbh = C4::Context->dbh; >+ >+ my $rq = >+ $dbh->prepare("SELECT ordernumber FROM aqorders_items LEFT JOIN items ON aqorders_items.itemnumber=items.itemnumber WHERE items.itemnumber=?"); >+ $rq->execute($itemnumber); >+ my ($result) = $rq->fetchrow; >+ return ($result); >+} >+ > =head2 GetHiddenItemnumbers > > =over 4 >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index be4fd9a..d8b26bc 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -179,6 +179,7 @@ my $authvalcode_items_damaged = GetAuthValCode('items.damaged', $fw); > > my $analytics_flag; > my $materials_flag; # set this if the items have anything in the materials field >+my $ordernumber_flag; > foreach my $item (@items) { > > $item->{homebranch} = GetBranchName($item->{homebranch}); >@@ -260,6 +261,10 @@ foreach my $item (@items) { > if ($item->{'materials'} ne ''){ > $materials_flag = 1; > } >+ $item->{'ordernumber'} = GetOrdernumberFromItemnumber($item->{itemnumber}); >+ if($item->{'ordernumber'}){ >+ $ordernumber_flag = 1; >+ } > push @itemloop, $item; > } > >@@ -284,6 +289,7 @@ $template->param( > hostrecords => $hostrecords, > analytics_flag => $analytics_flag, > C4::Search::enabled_staff_search_views, >+ ordernumber_flag => $ordernumber_flag, > materials => $materials_flag, > ); > >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index ca7d13c..27b6f3a 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -129,6 +129,7 @@ foreach ( keys %{$data} ) { > > ($itemnumber) and @items = (grep {$_->{'itemnumber'} == $itemnumber} @items); > foreach my $item (@items){ >+ $item->{'ordernumber'} = GetOrdernumberFromItemnumber($item->{itemnumber}); > $item->{itemlostloop}= GetAuthorisedValues(GetAuthValCode('items.itemlost',$fw),$item->{itemlost}) if GetAuthValCode('items.itemlost',$fw); > $item->{itemdamagedloop}= GetAuthorisedValues(GetAuthValCode('items.damaged',$fw),$item->{damaged}) if GetAuthValCode('items.damaged',$fw); > $item->{'collection'} = $ccodes->{ $item->{ccode} } if ($ccodes); >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 ce52040..860066d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -276,6 +276,7 @@ function verify_images() { > <th>Status</th> > <th>Last seen</th> > <th>Barcode</th> >+ [% IF ( CAN_user_acquisition_order_manage ) %][% IF ( ordernumber_flag ) %]<th>Acq info</th>[% END %][% END %] > [% IF ( volinfo ) %]<th>Publication details</th>[% END %] > [% IF ( itemdata_uri ) %]<th>url</th>[% END %] > [% IF ( itemdata_copynumber ) %]<th>Copy no.</th>[% END %] >@@ -387,6 +388,7 @@ function verify_images() { > </td> > <td class="datelastseen">[% itemloo.datelastseen %]</td> > <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% itemloo.type %]&itemnumber=[% itemloo.itemnumber %]&biblionumber=[% itemloo.biblionumber %]&bi=[% itemloo.biblioitemnumber %]#item[% itemloo.itemnumber %]">[% itemloo.barcode %]</a></td> >+ [% IF ( CAN_user_acquisition_order_manage ) %][% IF ( ordernumber_flag ) %][% IF ( itemloo.ordernumber ) %]<td><a href="/cgi-bin/koha/acqui/neworderempty.pl?ordernumber=[% itemloo.ordernumber %]">View order</a></td>[% ELSE %]<td> </td> [% END %][% END %][% END %] > [% IF ( volinfo ) %] <td class="enumchron"> > [% IF ( itemdata_enumchron ) %] > [% IF ( itemloo.enumchron ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index afd2a6d..2c6ce3d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -58,6 +58,7 @@ > <li><span class="label">Item callnumber:</span> [% ITEM_DAT.itemcallnumber %] </li> > [% IF ( ITEM_DAT.copyvol ) %]<li><span class="label">Copy / Vol :</span> [% ITEM_DAT.copyvol %] </li> [% END %] > [% IF ( ITEM_DAT.replacementprice ) %]<li><span class="label">Replacement price:</span> [% ITEM_DAT.replacementprice %] </li> [% END %] >+ [% IF ( CAN_user_acquisition_order_manage ) %][% IF ( ITEM_DAT.ordernumber ) %]<li><span class="label">Acquisition info:</span><a href="/cgi-bin/koha/acqui/neworderempty.pl?ordernumber=[% ITEM_DAT.ordernumber %]">View order</a> </li>[% END %][% END %] > [% IF ITEM_DAT.materials %]<li><span class="label">Materials specified:</span> [% ITEM_DAT.materials %] </li> [% END %] > </ol></div> > <div class="listgroup"><h4>Statuses [% IF ( ITEM_DAT.status_advisory ) %]( >-- >1.7.2.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 6777
:
9946
| 10403