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

(-)a/Koha/Template/Plugin/ItemTypes.pm (-2 / +3 lines)
Lines 25-32 use base qw( Template::Plugin ); Link Here
25
use Koha::ItemTypes;
25
use Koha::ItemTypes;
26
26
27
sub GetDescription {
27
sub GetDescription {
28
    my ( $self, $itemtype ) = @_;
28
    my ( $self, $itemtypecode ) = @_;
29
    return Koha::ItemTypes->find( $itemtype )->translated_description;
29
    my $itemtype = Koha::ItemTypes->find( $itemtypecode );
30
    return $itemtype ? $itemtype->translated_description : q{};
30
}
31
}
31
32
32
sub Get {
33
sub Get {
(-)a/members/summary-print.pl (-1 / +1 lines)
Lines 94-100 sub build_issue_data { Link Here
94
        my ( $charge, $itemtype ) =
94
        my ( $charge, $itemtype ) =
95
          GetIssuingCharges( $issue->{itemnumber}, $borrowernumber );
95
          GetIssuingCharges( $issue->{itemnumber}, $borrowernumber );
96
96
97
        my $itemtype = Koha::ItemTypes->find( $itemtype );
97
        $itemtype = Koha::ItemTypes->find( $itemtype );
98
        $row{'itemtype_description'} = $itemtype->description; #FIXME Should not it be translated_description
98
        $row{'itemtype_description'} = $itemtype->description; #FIXME Should not it be translated_description
99
99
100
        $row{'charge'} = sprintf( "%.2f", $charge );
100
        $row{'charge'} = sprintf( "%.2f", $charge );
(-)a/opac/opac-shelves.pl (-3 / +5 lines)
Lines 282-290 if ( $op eq 'view' ) { Link Here
282
                my $marcflavour = C4::Context->preference("marcflavour");
282
                my $marcflavour = C4::Context->preference("marcflavour");
283
                my $itemtype = Koha::Biblioitems->search({ biblionumber => $content->biblionumber })->next->itemtype;
283
                my $itemtype = Koha::Biblioitems->search({ biblionumber => $content->biblionumber })->next->itemtype;
284
                $itemtype = Koha::ItemTypes->find( $itemtype );
284
                $itemtype = Koha::ItemTypes->find( $itemtype );
285
                $this_item->{imageurl}          = C4::Koha::getitemtypeimagelocation( 'opac', $itemtype->imageurl );
285
                if( $itemtype ) {
286
                $this_item->{description}       = $itemtype->description; #FIXME Should not it be translated_description?
286
                    $this_item->{imageurl}          = C4::Koha::getitemtypeimagelocation( 'opac', $itemtype->imageurl );
287
                $this_item->{notforloan}        = $itemtype->notforloan;
287
                    $this_item->{description}       = $itemtype->description; #FIXME Should not it be translated_description?
288
                    $this_item->{notforloan}        = $itemtype->notforloan;
289
                }
288
                $this_item->{'coins'}           = GetCOinSBiblio($record);
290
                $this_item->{'coins'}           = GetCOinSBiblio($record);
289
                $this_item->{'subtitle'}        = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $biblionumber ) );
291
                $this_item->{'subtitle'}        = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $biblionumber ) );
290
                $this_item->{'normalized_upc'}  = GetNormalizedUPC( $record, $marcflavour );
292
                $this_item->{'normalized_upc'}  = GetNormalizedUPC( $record, $marcflavour );
(-)a/virtualshelves/shelves.pl (-4 / +3 lines)
Lines 250-258 if ( $op eq 'view' ) { Link Here
250
                $this_item->{title}             = $biblio->title;
250
                $this_item->{title}             = $biblio->title;
251
                $this_item->{author}            = $biblio->author;
251
                $this_item->{author}            = $biblio->author;
252
                $this_item->{dateadded}         = $content->dateadded;
252
                $this_item->{dateadded}         = $content->dateadded;
253
                $this_item->{imageurl}          = C4::Koha::getitemtypeimagelocation( 'intranet', $itemtype->imageurl );
253
                $this_item->{imageurl}          = $itemtype ? C4::Koha::getitemtypeimagelocation( 'intranet', $itemtype->imageurl ) : q{};
254
                $this_item->{description}       = $itemtype->description; #FIXME Should not it be translated_description
254
                $this_item->{description}       = $itemtype ? $itemtype->description : q{}; #FIXME Should this be translated_description ?
255
                $this_item->{notforloan}        = $itemtype->notforloan;
255
                $this_item->{notforloan}        = $itemtype->notforloan if $itemtype;
256
                $this_item->{'coins'}           = GetCOinSBiblio($record);
256
                $this_item->{'coins'}           = GetCOinSBiblio($record);
257
                $this_item->{'subtitle'}        = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $biblionumber ) );
257
                $this_item->{'subtitle'}        = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $biblionumber ) );
258
                $this_item->{'normalized_upc'}  = GetNormalizedUPC( $record, $marcflavour );
258
                $this_item->{'normalized_upc'}  = GetNormalizedUPC( $record, $marcflavour );
259
- 

Return to bug 17843