diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 48bd799879..d99ecbdc56 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -386,7 +386,8 @@ foreach my $item (@items) { # FIXME The following must be Koha::Item->serial my $serial_item = Koha::Serial::Items->find($item->itemnumber); if ( $serial_item ) { - $item_info->{serial} = $serial_item; + my $serial = Koha::Serials->find($serial_item->serialid); + $item_info->{serial} = $serial if $serial; $itemfields{publisheddate} = 1; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 1fdb6fe7eb..1befd20d7a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -430,7 +430,7 @@ Note that permanent location is a code, and location may be an authval. [% IF Koha.Preference('EnableItemGroups') %][% item.object.item_group.description | html %][% END %] [% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %] [% IF ( volinfo ) %] - [% SET serial = item.itemserial.serial %] + [% SET serial = item.serial %] [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %] [% ELSE %] @@ -439,7 +439,7 @@ Note that permanent location is a code, and location may be an authval. [% IF ( itemdata_enumchron ) %] [% IF item.enumchron && serial.serialseq %] [% item.enumchron | html %] - [% IF ( item.serialseq && item.enumchron != serial.serialseq ) %] + [% IF ( serial.serialseq && item.enumchron != serial.serialseq ) %] -- [% serial.serialseq | html %] [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 71aa68f180..c3593330a7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1325,7 +1325,7 @@ [% END %] [% IF ( itemdata_enumchron ) %] - [% SET serial = ITEM_RESULT.serialitem %] + [% SET serial = ITEM_RESULT.serial %] [% IF ITEM_RESULT.enumchron && serial.serialseq %] [% ITEM_RESULT.enumchron | html %] diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 3c2b8df6ec..116694e267 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -720,7 +720,8 @@ else { # FIXME The following must be Koha::Item->serial my $serial_item = Koha::Serial::Items->find($item->itemnumber); if ( $serial_item ) { - $item_info->{serial} = $serial_item; + my $serial = Koha::Serials->find($serial_item->serialid); + $item_info->{serial} = $serial if $serial; } $item_info->{checkout} = $item->checkout;