Bugzilla – Attachment 20061 Details for
Bug 10013
Ability to link directly from an item in the Staff client to budget information.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10013 - Ability to link directly from an item in the Staff client to budget information.
Bug-10013---Ability-to-link-directly-from-an-item-.patch (text/plain), 5.00 KB, created by
Kyle M Hall (khall)
on 2013-08-02 16:02:45 UTC
(
hide
)
Description:
Bug 10013 - Ability to link directly from an item in the Staff client to budget information.
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-08-02 16:02:45 UTC
Size:
5.00 KB
patch
obsolete
>From e522bd91184dc2b74c2cc0b114e095ea5412f678 Mon Sep 17 00:00:00 2001 >From: Amit Gupta <amitddng135@gmail.com> >Date: Mon, 3 Jun 2013 10:52:50 +0530 >Subject: [PATCH] Bug 10013 - Ability to link directly from an item in the Staff client to budget information. > >To Test: >1) Create budget and fund under budget administration. >2) Create Vendor in acquisitons module. >3) Create basket under vendor. >4) Create order and choose budget while creating order. >5) Receive shipment. >6) Check in catalog details, in holding tab budget information column is displayed >, on click it should display the budget information. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Acquisition.pm | 19 +++++++++++++++++++ > catalogue/detail.pl | 9 ++++++++- > .../prog/en/modules/catalogue/detail.tt | 4 ++++ > 3 files changed, 31 insertions(+), 1 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 1a210b5..38a0757 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -72,6 +72,7 @@ BEGIN { > &CloseInvoice > &ReopenInvoice > &DelInvoice >+ &GetBudgetInfoFromItemnumber > > &GetItemnumbersFromOrder > >@@ -103,6 +104,24 @@ sub GetOrderFromItemnumber { > > } > >+sub GetBudgetInfoFromItemnumber { >+ my ($itemnumber) = @_; >+ my $dbh = C4::Context->dbh; >+ my $query = qq| >+ >+ SELECT aqorders_items.ordernumber, aqbudgets.budget_period_id, aqorders.budget_id, aqbudgets.budget_name, items.barcode >+ FROM aqorders_items LEFT JOIN items ON items.itemnumber = aqorders_items.itemnumber >+ LEFT JOIN aqorders ON aqorders.ordernumber = aqorders_items.ordernumber >+ LEFT JOIN aqbudgets ON aqbudgets.budget_id = aqorders.budget_id >+ WHERE items.itemnumber = ? | ; >+ >+ my $sth = $dbh->prepare($query); >+ $sth->execute($itemnumber); >+ return $sth->fetchrow_hashref; >+ >+} >+ >+ > # Returns the itemnumber(s) associated with the ordernumber given in parameter > sub GetItemnumbersFromOrder { > my ($ordernumber) = @_; >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index ab1df8a..bd54f86 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -39,6 +39,7 @@ use C4::Tags qw(get_tags); > use C4::VirtualShelves; > use C4::XSLT; > use C4::Images; >+use C4::Acquisition qw(GetBudgetInfoFromItemnumber); > use Koha::DateUtils; > use C4::HTML5Media; > use C4::CourseReserves qw(GetItemCourseReservesInfo); >@@ -215,7 +216,7 @@ foreach my $item (@items) { > $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) ); > my $copynumber = $item->{'copynumber'}; > $item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) ); >- foreach (qw(ccode enumchron copynumber itemnotes uri)) { >+ foreach (qw(ccode enumchron copynumber itemnotes uri booksellerid)) { > $itemfields{$_} = 1 if ( $item->{$_} ); > } > >@@ -223,6 +224,11 @@ foreach my $item (@items) { > my ($reservedate,$reservedfor,$expectedAt) = GetReservesFromItemnumber($item->{itemnumber}); > my $ItemBorrowerReserveInfo = GetMemberDetails( $reservedfor, 0); > >+ # checking for budget information >+ my $budget = GetBudgetInfoFromItemnumber($item->{itemnumber}); >+ $item->{budget_period_id} = $budget->{'budget_period_id'}; >+ $item->{budget_name} = $budget->{'budget_name'}; >+ > if (C4::Context->preference('HidePatronName')){ > $item->{'hidepatronname'} = 1; > } >@@ -310,6 +316,7 @@ $template->param( > itemdata_copynumber => $itemfields{copynumber}, > volinfo => $itemfields{enumchron}, > itemdata_itemnotes => $itemfields{itemnotes}, >+ itemdata_booksellerid => $itemfields{booksellerid}, > z3950_search_params => C4::Search::z3950_search_args($dat), > hostrecords => $hostrecords, > analytics_flag => $analytics_flag, >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 b3a4240..04d25cd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -386,6 +386,7 @@ function verify_images() { > [% IF ( hostrecords ) %]<th>Host records</th>[% END %] > [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %] > [% IF ( ShowCourseReserves ) %]<th>Course Reserves</th>[% END %] >+ [% IF ( itemdata_booksellerid ) %]<th>Budget information</th>[% END %] > </tr> > </thead> > <tbody> >@@ -554,6 +555,9 @@ function verify_images() { > [% END %] > </td> > [% END %] >+ [% IF ( itemdata_booksellerid ) %] >+ <td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% item.budget_period_id %]" >[% item.budget_name %]</a></td> >+ [% END %] > </tr> > [% END %] > </tbody> >-- >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 10013
:
17598
|
17610
|
17623
|
17645
|
18598
|
18600
| 20061 |
20063
|
20064
|
22061