From bb3e788e4bb1a6c2ac1e427df28f5b1ac2644458 Mon Sep 17 00:00:00 2001
From: Baptiste Wojtkowski
Date: Tue, 3 Mar 2026 15:48:53 +0000
Subject: [PATCH] Bug 39723: (follow-up) only use the suggestion object in
template params
---
acqui/basket.pl | 4 +---
acqui/parcel.pl | 4 +---
.../intranet-tmpl/prog/en/modules/acqui/basket.tt | 10 ++++------
.../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 4 ++--
4 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/acqui/basket.pl b/acqui/basket.pl
index bcddc385228..aff8b22112e 100755
--- a/acqui/basket.pl
+++ b/acqui/basket.pl
@@ -659,9 +659,7 @@ sub get_order_infos {
}
my $suggestion = Koha::Suggestions->search( { biblionumber => $line{biblionumber} } )->single;
- $line{suggestionid} = $suggestion->suggestionid;
- $line{surnamesuggestedby} = $suggestion->suggester->surname;
- $line{firstnamesuggestedby} = $suggestion->suggester->firstname;
+ $line{suggestion} = $suggestion;
$line{estimated_delivery_date} = $order->{estimated_delivery_date};
diff --git a/acqui/parcel.pl b/acqui/parcel.pl
index 3ed89728066..067eebd702d 100755
--- a/acqui/parcel.pl
+++ b/acqui/parcel.pl
@@ -151,9 +151,7 @@ for my $order (@orders) {
$total_tax_included += get_rounded_price( $line{unitprice_tax_included} ) * $line{quantity};
my $suggestion = Koha::Suggestions->search( { biblionumber => $line{biblionumber} } )->single;
- $line{suggestionid} = $suggestion->suggestionid;
- $line{surnamesuggestedby} = $suggestion->suggester->surname;
- $line{firstnamesuggestedby} = $suggestion->suggester->firstname;
+ $line{suggestion} = $suggestion;
if ( $line{parent_ordernumber} != $line{ordernumber} ) {
if ( grep { $_->{ordernumber} == $line{parent_ordernumber} } @orders ) {
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 bae154948a0..a908c7c071b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
@@ -834,12 +834,10 @@
[% books_loo.copyrightdate | html %]
[% END -%]
[%- IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement | html %][% END -%]
- [%- IF ( books_loo.suggestionid ) %]
+ [%- IF ( books_loo.suggestion ) %]
- Suggested by: [% books_loo.surnamesuggestedby | html %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby | html %][% END %] (suggestion #[% books_loo.suggestionid | html %])
+ Suggested by: [% books_loo.suggestion.suggester.surname | html %][% IF ( books_loo.suggestion.suggester.firstname ) %], [% books_loo.suggestion.suggester.firstname | html %][% END %]
+ (suggestion #[% books_loo.suggestion.suggestionid | html %])
[% END %]
[% IF ( books_loo.order_internalnote ) %]
@@ -962,7 +960,7 @@
Transfer
[% END %]
- [% UNLESS ( books_loo.suggestionid ) %]
+ [% UNLESS ( books_loo.suggestion.suggestionid ) %]
- Suggested by: [% order.surnamesuggestedby | html %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby | html %][% END %] (suggestion #[% order.suggestionid | html %])
--
2.43.0