Bug 13773: add stock number to details and items display
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 18 Feb 2015 14:15:33 +0000 (15:15 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 4 May 2015 15:29:25 +0000 (12:29 -0300)
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 <nicole@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
catalogue/detail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

index d3b34eb..74665b1 100755 (executable)
@@ -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),
index a392e1a..b782616 100644 (file)
@@ -597,6 +597,7 @@ function verify_images() {
                 [% IF ( volinfo ) %]<th>Publication details</th>[% END %]
                 [% IF ( itemdata_uri ) %]<th>url</th>[% END %]
                 [% IF ( itemdata_copynumber ) %]<th>Copy number</th>[% END %]
+                [% IF ( itemdata_stocknumber ) %]<th>Inventory number</th>[% END %]
                 [% IF materials %]<th>Materials specified</th>[% END %]
                 [% IF ( itemdata_itemnotes ) %]<th>Public notes</th>[% END %]
                 [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th>Spine label</th>[% END %]
@@ -761,6 +762,9 @@ function verify_images() {
                     [% IF ( itemdata_copynumber ) %]
                         <td class="copynumber">[% item.copynumber %]</td>
                     [% END %]
+                    [% IF ( itemdata_stocknumber ) %]
+                        <td class="stocknumber">[% item.stocknumber %]</td>
+                    [% END %]
                     [% IF materials %]
                         <td class="materials"> [% item.materials %] </td>
                     [% END %]