View | Details | Raw Unified | Return to bug 7379
Collapse All | Expand All

(-)a/catalogue/detail.pl (+4 lines)
Lines 171-176 $dat->{'hiddencount'} = scalar @all_items + @hostitems - scalar @items; Link Here
171
171
172
my $shelflocations = GetKohaAuthorisedValues('items.location', $fw);
172
my $shelflocations = GetKohaAuthorisedValues('items.location', $fw);
173
my $collections    = GetKohaAuthorisedValues('items.ccode'   , $fw);
173
my $collections    = GetKohaAuthorisedValues('items.ccode'   , $fw);
174
my $copynumbers    = GetKohaAuthorisedValues('items.copynumber', $fw);
174
my (@itemloop, %itemfields);
175
my (@itemloop, %itemfields);
175
my $norequests = 1;
176
my $norequests = 1;
176
my $authvalcode_items_itemlost = GetAuthValCode('items.itemlost',$fw);
177
my $authvalcode_items_itemlost = GetAuthValCode('items.itemlost',$fw);
Lines 201-210 foreach my $item (@items) { Link Here
201
        $item->{itemdamagedloop} = GetAuthorisedValues($authvalcode_items_damaged, $item->{damaged}) if $authvalcode_items_damaged;
202
        $item->{itemdamagedloop} = GetAuthorisedValues($authvalcode_items_damaged, $item->{damaged}) if $authvalcode_items_damaged;
202
    }
203
    }
203
    #get shelf location and collection code description if they are authorised value.
204
    #get shelf location and collection code description if they are authorised value.
205
    # same thing for copy number
204
    my $shelfcode = $item->{'location'};
206
    my $shelfcode = $item->{'location'};
205
    $item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
207
    $item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
206
    my $ccode = $item->{'ccode'};
208
    my $ccode = $item->{'ccode'};
207
    $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
209
    $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
210
    my $copynumber = $item->{'copynumber'};
211
    $item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) );
208
    foreach (qw(ccode enumchron copynumber itemnotes uri)) {
212
    foreach (qw(ccode enumchron copynumber itemnotes uri)) {
209
        $itemfields{$_} = 1 if ( $item->{$_} );
213
        $itemfields{$_} = 1 if ( $item->{$_} );
210
    }
214
    }
(-)a/catalogue/moredetail.pl (-1 / +10 lines)
Lines 116-121 $data->{'showncount'}=$showncount; Link Here
116
$data->{'hiddencount'}=$hiddencount;  # can be zero
116
$data->{'hiddencount'}=$hiddencount;  # can be zero
117
117
118
my $ccodes= GetKohaAuthorisedValues('items.ccode',$fw);
118
my $ccodes= GetKohaAuthorisedValues('items.ccode',$fw);
119
my $copynumbers = GetKohaAuthorisedValues('items.copynumber',$fw);
119
my $itemtypes = GetItemTypes;
120
my $itemtypes = GetItemTypes;
120
121
121
$data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'};
122
$data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'};
Lines 132-138 foreach my $item (@items){ Link Here
132
    $item->{'itype'}                   = $itemtypes->{ $item->{'itype'} }->{'description'};
133
    $item->{'itype'}                   = $itemtypes->{ $item->{'itype'} }->{'description'};
133
    $item->{'replacementprice'}        = sprintf( "%.2f", $item->{'replacementprice'} );
134
    $item->{'replacementprice'}        = sprintf( "%.2f", $item->{'replacementprice'} );
134
    $item->{$_}                        = format_date( $item->{$_} ) foreach qw/datelastborrowed dateaccessioned datelastseen lastreneweddate/;
135
    $item->{$_}                        = format_date( $item->{$_} ) foreach qw/datelastborrowed dateaccessioned datelastseen lastreneweddate/;
135
    $item->{'copyvol'}                 = $item->{'copynumber'};
136
    if ( defined $item->{'copynumber'} ) {
137
        $item->{'displaycopy'} = 1;
138
        if ($copynumbers) {
139
            $item->{'copyvol'} = $copynumbers->{ $item->{'copynumber'} }
140
        }
141
        else {
142
            $item->{'copyvol'} = $item->{'copynumber'};
143
        }
144
    }
136
145
137
146
138
    # item has a host number if its biblio number does not match the current bib
147
    # item has a host number if its biblio number does not match the current bib
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt (-1 / +1 lines)
Lines 56-62 Link Here
56
	    [% END %]
56
	    [% END %]
57
            [% IF ( ITEM_DAT.collection ) %]<li><span class="label">Collection:</span> [% ITEM_DAT.collection %]</li> [% END %]
57
            [% IF ( ITEM_DAT.collection ) %]<li><span class="label">Collection:</span> [% ITEM_DAT.collection %]</li> [% END %]
58
            <li><span class="label">Item Callnumber:</span> [% ITEM_DAT.itemcallnumber %]&nbsp;</li>
58
            <li><span class="label">Item Callnumber:</span> [% ITEM_DAT.itemcallnumber %]&nbsp;</li>
59
            [% IF ( ITEM_DAT.copyvol ) %]<li><span class="label">Copy / Vol :</span> [% ITEM_DAT.copyvol %]&nbsp;</li> [% END %]
59
            [% IF ( ITEM_DAT.displaycopy ) %]<li><span class="label">Copy / Vol :</span> [% ITEM_DAT.copyvol %]&nbsp;</li> [% END %]
60
            [% IF ( ITEM_DAT.replacementprice ) %]<li><span class="label">Replacement Price:</span> [% ITEM_DAT.replacementprice %]&nbsp;</li> [% END %]
60
            [% IF ( ITEM_DAT.replacementprice ) %]<li><span class="label">Replacement Price:</span> [% ITEM_DAT.replacementprice %]&nbsp;</li> [% END %]
61
	    [% IF ITEM_DAT.materials %]<li><span class="label">Materials Specified:</span> [% ITEM_DAT.materials %] </li> [% END %]
61
	    [% IF ITEM_DAT.materials %]<li><span class="label">Materials Specified:</span> [% ITEM_DAT.materials %] </li> [% END %]
62
            </ol></div>
62
            </ol></div>
(-)a/opac/opac-detail.pl (-4 / +5 lines)
Lines 439-444 if ( $itemtype ) { Link Here
439
}
439
}
440
my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}, 'opac');
440
my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}, 'opac');
441
my $collections =  GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}, 'opac');
441
my $collections =  GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}, 'opac');
442
my $copynumbers     = GetKohaAuthorisedValues('items.copynumber',$dat->{'frameworkcode'}, 'opac');
442
443
443
#coping with subscriptions
444
#coping with subscriptions
444
my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
445
my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
Lines 498-506 for my $itm (@items) { Link Here
498
    $itm->{datelastseen} = format_date($itm->{datelastseen});
499
    $itm->{datelastseen} = format_date($itm->{datelastseen});
499
500
500
    # get collection code description, too
501
    # get collection code description, too
501
    if ( my $ccode = $itm->{'ccode'} ) {
502
    my $ccode = $itm->{'ccode'};
502
        $itm->{'ccode'} = $collections->{$ccode} if ( defined($collections) && exists( $collections->{$ccode} ) );
503
    $itm->{'ccode'} = $collections->{$ccode} if ( defined($collections) && exists( $collections->{$ccode} ) );
503
    }
504
    my $copynumber = $itm->{'copynumber'};
505
    $itm->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumbers) && defined($copynumber) && exists( $copynumbers->{$copynumber} ) );
504
    if ( defined $itm->{'location'} ) {
506
    if ( defined $itm->{'location'} ) {
505
        $itm->{'location_description'} = $shelflocations->{ $itm->{'location'} };
507
        $itm->{'location_description'} = $shelflocations->{ $itm->{'location'} };
506
    }
508
    }
507
- 

Return to bug 7379