From dcca45094432cbfe41772568330deea3d1f0ee4e Mon Sep 17 00:00:00 2001 From: Srdjan Jankovic Date: Tue, 20 Dec 2011 18:39:24 +1300 Subject: [PATCH] Bug 7235: Adding invoice number and vendor name to the moredetail page Signed-off-by: Katrin Fischer --- catalogue/moredetail.pl | 8 +++++++- .../prog/en/modules/catalogue/moredetail.tt | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index f5bb90452b..d75e36fb1d 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -27,7 +27,8 @@ use C4::Biblio; use C4::Items; use C4::Branch; use C4::Acquisition; -use C4::Output; +use C4::Bookseller qw(GetBookSellerFromId); +use C4::Output; # contains gettemplate use C4::Auth; use C4::Serials; use C4::Dates qw/format_date/; @@ -147,6 +148,11 @@ foreach my $item (@items){ $item->{'ordernumber'} = $order->{'ordernumber'}; $item->{'basketno'} = $order->{'basketno'}; $item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'}; + if ($item->{'basketno'}){ + my $basket = GetBasket($item->{'basketno'}); + my $bookseller = GetBookSellerFromId($basket->{'booksellerid'}); + $item->{'vendor'} = $bookseller->{'name'}; + } $item->{'datereceived'} = $order->{'datereceived'}; if ($item->{notforloantext} or $item->{itemlost} or $item->{damaged} or $item->{wthdrawn}) { 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 1a9536b595..579265fb6a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -164,8 +164,18 @@ [% END %] [% ELSE %] [% ITEM_DAT.dateaccessioned %] - [% END %] - + [% END %] + + [% IF ITEM_DAT.vendor %] +
  • Vendor + [% ITEM_DAT.vendor %] +
  • + [% IF ITEM_DAT.booksellerinvoicenumber %] +
  • Invoice number + [% ITEM_DAT.booksellerinvoicenumber %] +
  • + [% END %] + [% END %]
  • Total Checkouts:[% IF ( ITEM_DAT.issues ) %][% ITEM_DAT.issues %][% ELSE %]0[% END %] (View item's checkout history)
  • -- 2.39.5