From 2f1a72c35bcd7d600b0209d36f70bbc1602a180e Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 18 Feb 2015 15:15:33 +0100 Subject: [PATCH] Bug 13773: add stock number to details and items display This patch adds stocknumber (named Inventory number in interface) to details table and items display if it exists. Test scenario: 1. find item(s) which have inventory number assigned 2. verify that you don't see inventory number in items display 3. apply this patch 4. verify that inventory number is now available Signed-off-by: Nicole Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- catalogue/detail.pl | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index d3b34ebefb..74665b18b9 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -224,7 +224,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 stocknumber itemnotes uri)) { $itemfields{$_} = 1 if ( $item->{$_} ); } @@ -313,6 +313,7 @@ $template->param( itemdata_enumchron => $itemfields{enumchron}, itemdata_uri => $itemfields{uri}, itemdata_copynumber => $itemfields{copynumber}, + itemdata_stocknumber => $itemfields{stocknumber}, volinfo => $itemfields{enumchron}, itemdata_itemnotes => $itemfields{itemnotes}, z3950_search_params => C4::Search::z3950_search_args($dat), 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 a392e1afde..b7826162ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -597,6 +597,7 @@ function verify_images() { [% IF ( volinfo ) %]Publication details[% END %] [% IF ( itemdata_uri ) %]url[% END %] [% IF ( itemdata_copynumber ) %]Copy number[% END %] + [% IF ( itemdata_stocknumber ) %]Inventory number[% END %] [% IF materials %]Materials specified[% END %] [% IF ( itemdata_itemnotes ) %]Public notes[% END %] [% IF ( SpineLabelShowPrintOnBibDetails ) %]Spine label[% END %] @@ -761,6 +762,9 @@ function verify_images() { [% IF ( itemdata_copynumber ) %] [% item.copynumber %] [% END %] + [% IF ( itemdata_stocknumber ) %] + [% item.stocknumber %] + [% END %] [% IF materials %] [% item.materials %] [% END %] -- 2.39.5