copynumber and stocknumbe added for label search
authorMarijana Glavica <mglavica@ffzg.hr>
Wed, 4 Jul 2012 13:55:17 +0000 (15:55 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 16 Jul 2014 11:00:30 +0000 (13:00 +0200)
koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt
labels/label-item-search.pl

index 748d5ac..c848435 100644 (file)
@@ -23,6 +23,9 @@ to add to Batch [% batch_id %]
 <ol><li>
 <select name="idx" >   <!-- FIXME: script does keyword search regardless -->
 
+[% IF ( selected ) %]<option value="copynumber" selected="selected">Inv. no</option>
+[% ELSE %]<option value="kw" selected="selected">Inv. no</option>[% END %]
+
 [% IF ( selected ) %]<option value="kw" selected="selected">Keyword</option>
 [% ELSE %]<option value="kw">Keyword</option>[% END %]
 
@@ -50,7 +53,7 @@ to add to Batch [% batch_id %]
 [% IF ( selected ) %]
    <option value="ti" selected="selected">Title</option>
 [% ELSE %]
-   <option value="ti" selected="selected">Title</option>[% END %]
+   <option value="ti">Title</option>[% END %]
 
 [% IF ( selected ) %]<option value="ti,phr" selected="selected">Title phrase</option>
 [% ELSE %]<option value="ti,phr">Title phrase</option>[% END %]
index 6d7db6f..a995815 100755 (executable)
@@ -59,6 +59,8 @@ my (
 my $resultsperpage = C4::Context->preference('numSearchResults') || '20';
 my $show_results = 0;
 my $display_columns = [ {_add                   => {label => "Add Item", link_field => 1}},
+                                               {_item_copynumber       => {label => "Inv. no", link_field => 0}},
+                                               {_item_stocknumber       => {label => "NEW Inv. no", link_field => 0}},
                         {_item_call_number      => {label => "Call Number", link_field => 0}},
                         {_date_accessioned      => {label => "Accession Date", link_field => 0}},
                         {_barcode               => {label => "Barcode", link_field => 0}},
@@ -145,6 +147,8 @@ if ($show_results) {
                     $item_data->{'_date_accessioned'} = $item_results->{$item}->{'dateaccessioned'};
                     $item_data->{'_barcode'} = ( $item_results->{$item}->{'barcode'} ? $item_results->{$item}->{'barcode'} : 'NA');
                     $item_data->{'_add'} = $item_results->{$item}->{'itemnumber'};
+                                       $item_data->{'_item_copynumber'} = ($item_results->{$item}->{'copynumber'} ? $item_results->{$item}->{'copynumber'} : 'NA');
+                                       $item_data->{'_item_stocknumber'} = ($item_results->{$item}->{'stocknumber'} ? $item_results->{$item}->{'stocknumber'} : 'NA');
                     unshift (@row_data, $item_data);    # item numbers are given to us in descending order by get_itemnumbers_of()...
                 }
             }