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

(-)a/catalogue/detail.pl (+4 lines)
Lines 172-177 $dat->{'hiddencount'} = scalar @all_items + @hostitems - scalar @items; Link Here
172
172
173
my $shelflocations = GetKohaAuthorisedValues('items.location', $fw);
173
my $shelflocations = GetKohaAuthorisedValues('items.location', $fw);
174
my $collections    = GetKohaAuthorisedValues('items.ccode'   , $fw);
174
my $collections    = GetKohaAuthorisedValues('items.ccode'   , $fw);
175
my $copynumbers    = GetKohaAuthorisedValues('items.copynumber', $fw);
175
my (@itemloop, %itemfields);
176
my (@itemloop, %itemfields);
176
my $norequests = 1;
177
my $norequests = 1;
177
my $authvalcode_items_itemlost = GetAuthValCode('items.itemlost',$fw);
178
my $authvalcode_items_itemlost = GetAuthValCode('items.itemlost',$fw);
Lines 203-212 foreach my $item (@items) { Link Here
203
        $item->{itemdamagedloop} = GetAuthorisedValues($authvalcode_items_damaged, $item->{damaged}) if $authvalcode_items_damaged;
204
        $item->{itemdamagedloop} = GetAuthorisedValues($authvalcode_items_damaged, $item->{damaged}) if $authvalcode_items_damaged;
204
    }
205
    }
205
    #get shelf location and collection code description if they are authorised value.
206
    #get shelf location and collection code description if they are authorised value.
207
    # same thing for copy number
206
    my $shelfcode = $item->{'location'};
208
    my $shelfcode = $item->{'location'};
207
    $item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
209
    $item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
208
    my $ccode = $item->{'ccode'};
210
    my $ccode = $item->{'ccode'};
209
    $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
211
    $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
212
    my $copynumber = $item->{'copynumber'};
213
    $item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) );
210
    foreach (qw(ccode enumchron copynumber itemnotes uri)) {
214
    foreach (qw(ccode enumchron copynumber itemnotes uri)) {
211
        $itemfields{$_} = 1 if ( $item->{$_} );
215
        $itemfields{$_} = 1 if ( $item->{$_} );
212
    }
216
    }
(-)a/catalogue/moredetail.pl (-1 / +10 lines)
Lines 119-124 $data->{'showncount'}=$showncount; Link Here
119
$data->{'hiddencount'}=$hiddencount;  # can be zero
119
$data->{'hiddencount'}=$hiddencount;  # can be zero
120
120
121
my $ccodes= GetKohaAuthorisedValues('items.ccode',$fw);
121
my $ccodes= GetKohaAuthorisedValues('items.ccode',$fw);
122
my $copynumbers = GetKohaAuthorisedValues('items.copynumber',$fw);
122
my $itemtypes = GetItemTypes;
123
my $itemtypes = GetItemTypes;
123
124
124
$data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'};
125
$data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'};
Lines 134-140 foreach my $item (@items){ Link Here
134
    $item->{'collection'}              = $ccodes->{ $item->{ccode} } if ($ccodes);
135
    $item->{'collection'}              = $ccodes->{ $item->{ccode} } if ($ccodes);
135
    $item->{'itype'}                   = $itemtypes->{ $item->{'itype'} }->{'description'};
136
    $item->{'itype'}                   = $itemtypes->{ $item->{'itype'} }->{'description'};
136
    $item->{'replacementprice'}        = sprintf( "%.2f", $item->{'replacementprice'} );
137
    $item->{'replacementprice'}        = sprintf( "%.2f", $item->{'replacementprice'} );
137
    $item->{'copyvol'}                 = $item->{'copynumber'};
138
    if ( defined $item->{'copynumber'} ) {
139
        $item->{'displaycopy'} = 1;
140
        if ( defined $copynumbers->{ $item->{'copynumber'} } ) {
141
            $item->{'copyvol'} = $copynumbers->{ $item->{'copynumber'} }
142
        }
143
        else {
144
            $item->{'copyvol'} = $item->{'copynumber'};
145
        }
146
    }
138
147
139
    # item has a host number if its biblio number does not match the current bib
148
    # item has a host number if its biblio number does not match the current bib
140
    if ($item->{biblionumber} ne $biblionumber){
149
    if ($item->{biblionumber} ne $biblionumber){
(-)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 446-451 if ( $itemtype ) { Link Here
446
}
446
}
447
my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}, 'opac');
447
my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}, 'opac');
448
my $collections =  GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}, 'opac');
448
my $collections =  GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}, 'opac');
449
my $copynumbers = GetKohaAuthorisedValues('items.copynumber',$dat->{'frameworkcode'}, 'opac');
449
450
450
#coping with subscriptions
451
#coping with subscriptions
451
my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
452
my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
Lines 527-535 for my $itm (@items) { Link Here
527
    }
528
    }
528
529
529
    # get collection code description, too
530
    # get collection code description, too
530
    if ( my $ccode = $itm->{'ccode'} ) {
531
    my $ccode = $itm->{'ccode'};
531
        $itm->{'ccode'} = $collections->{$ccode} if ( defined($collections) && exists( $collections->{$ccode} ) );
532
    $itm->{'ccode'} = $collections->{$ccode} if ( defined($collections) && exists( $collections->{$ccode} ) );
532
    }
533
    my $copynumber = $itm->{'copynumber'};
534
    $itm->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumbers) && defined($copynumber) && exists( $copynumbers->{$copynumber} ) );
533
    if ( defined $itm->{'location'} ) {
535
    if ( defined $itm->{'location'} ) {
534
        $itm->{'location_description'} = $shelflocations->{ $itm->{'location'} };
536
        $itm->{'location_description'} = $shelflocations->{ $itm->{'location'} };
535
    }
537
    }
536
- 

Return to bug 7379