From 62b48bb932a165bf01e7a0d0866ed2d92e90263e Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 12 Feb 2024 08:01:26 +0000 Subject: [PATCH] Bug 10758: Show title of deleted biblio on basket page Test plan: Find a completed order line and a cancelled one with deleted biblios. Goto acqui/basket.pl Check if you see the title if deleted_biblionumber is filled. Signed-off-by: Michaela Sieber Signed-off-by: Emily Lamancusa Signed-off-by: Katrin Fischer --- acqui/basket.pl | 4 +++- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index 6401125d01..fa22520c63 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -41,6 +41,7 @@ use Koha::CsvProfiles; use Koha::Patrons; use Koha::AdditionalFields; +use Koha::Old::Biblios; =head1 NAME @@ -500,7 +501,8 @@ sub get_order_infos { $line{holds_on_order} = $itemholds ? $itemholds : $holds_count if $line{left_holds_on_order}; $line{order_object} = $order; $line{invoice_object} = $invoice; - + } else { + $line{deleted_biblio} = Koha::Old::Biblios->find( $order->{deleted_biblionumber} ); } my $suggestion = GetSuggestionInfoFromBiblionumber($line{biblionumber}); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index fdadf42c66..a41111c115 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -600,6 +600,9 @@ [% IF ( books_loo.order_received ) %] (received)[% END %] [% IF books_loo.title %] [% INCLUDE 'biblio-title.inc' biblio=books_loo link = 1 %] [% IF books_loo.author %] by [% books_loo.author | html %][% END %] + [% ELSIF books_loo.deleted_biblio %] + [% INCLUDE 'biblio-title.inc' biblio=books_loo.deleted_biblio %] +
(Deleted bibliographic record) [% ELSE %] Deleted bibliographic record, can't find title
[%- END %] @@ -791,6 +794,9 @@ [% IF ( order.order_received ) %] (received)[% END %] [% IF (order.title) %] [% order.title | html %][% IF order.author %] by [% order.author | html %][% END %] + [% ELSIF order.deleted_biblio %] + [% INCLUDE 'biblio-title.inc' biblio=order.deleted_biblio %] +
(Deleted bibliographic record) [% ELSE %] Deleted bibliographic record, can't find title [% END %] -- 2.39.5