From 8e29ed4b65b59df56b7203a8755e244dead32c0a 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 Content-Type: text/plain; charset=utf-8 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. --- 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 33253aad47..ac444a6f09 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 21c0351f1a..a6141fe161 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -573,6 +573,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 %] @@ -764,6 +767,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.30.2