From 36f71aaa9ef898037efa3b8fbfdcfff5232ba84a Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Wed, 4 Mar 2026 15:46:22 +0000 Subject: [PATCH] Bug 39724: (follow-up) use the suggestion object in neworderempty.tt --- acqui/neworderempty.pl | 68 +++++++++---------- .../prog/en/modules/acqui/neworderempty.tt | 13 ++-- 2 files changed, 40 insertions(+), 41 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 1f0c87c5b25..1a8155904c2 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -460,41 +460,39 @@ $template->param( closedate => $basket->{'closedate'}, # order details - suggestionid => $suggestion->suggestionid, - surnamesuggestedby => $suggestion->surname, - firstnamesuggestedby => $suggestion->firstname, - biblionumber => $biblionumber, - uncertainprice => $data->{'uncertainprice'}, - discount_2dp => sprintf( "%.2f", $bookseller->discount ), # for display - discount => $bookseller->discount, - orderdiscount_2dp => sprintf( "%.2f", $data->{'discount'} || 0 ), - orderdiscount => $data->{'discount'}, - order_internalnote => $data->{'order_internalnote'}, - order_vendornote => $data->{'order_vendornote'}, - listincgst => $bookseller->listincgst, - invoiceincgst => $bookseller->invoiceincgst, - cur_active_sym => $active_currency->symbol, - cur_active => $active_currency->currency, - currencies => Koha::Acquisition::Currencies->search, - currency => $data->{currency}, - vendor_currency => $bookseller->listprice, - orderexists => ( $new eq 'yes' ) ? 0 : 1, - title => $data->{'title'}, - author => $data->{'author'}, - publicationyear => $data->{'publicationyear'} ? $data->{'publicationyear'} : $data->{'copyrightdate'}, - editionstatement => $data->{'editionstatement'}, - budget_loop => $budget_loop, - isbn => $data->{'isbn'}, - ean => $data->{'ean'}, - seriestitle => $data->{'seriestitle'}, - itemtypeloop => \@itemtypes, - quantity => $quantity, - quantityrec => $quantity, - quantitysugg => $data->{quantitysugg}, - rrp => $data->{'rrp'}, - replacementprice => $data->{'replacementprice'}, - gst_values => \@gst_values, - tax_rate => $data->{tax_rate_on_ordering} ? $data->{tax_rate_on_ordering} + 0.0 + suggestion => $suggestion, + biblionumber => $biblionumber, + uncertainprice => $data->{'uncertainprice'}, + discount_2dp => sprintf( "%.2f", $bookseller->discount ), # for display + discount => $bookseller->discount, + orderdiscount_2dp => sprintf( "%.2f", $data->{'discount'} || 0 ), + orderdiscount => $data->{'discount'}, + order_internalnote => $data->{'order_internalnote'}, + order_vendornote => $data->{'order_vendornote'}, + listincgst => $bookseller->listincgst, + invoiceincgst => $bookseller->invoiceincgst, + cur_active_sym => $active_currency->symbol, + cur_active => $active_currency->currency, + currencies => Koha::Acquisition::Currencies->search, + currency => $data->{currency}, + vendor_currency => $bookseller->listprice, + orderexists => ( $new eq 'yes' ) ? 0 : 1, + title => $data->{'title'}, + author => $data->{'author'}, + publicationyear => $data->{'publicationyear'} ? $data->{'publicationyear'} : $data->{'copyrightdate'}, + editionstatement => $data->{'editionstatement'}, + budget_loop => $budget_loop, + isbn => $data->{'isbn'}, + ean => $data->{'ean'}, + seriestitle => $data->{'seriestitle'}, + itemtypeloop => \@itemtypes, + quantity => $quantity, + quantityrec => $quantity, + quantitysugg => $data->{quantitysugg}, + rrp => $data->{'rrp'}, + replacementprice => $data->{'replacementprice'}, + gst_values => \@gst_values, + tax_rate => $data->{tax_rate_on_ordering} ? $data->{tax_rate_on_ordering} + 0.0 : $bookseller->tax_rate ? $bookseller->tax_rate + 0.0 : 0, listprice => sprintf( "%.2f", $data->{listprice} || $data->{price} || $listprice ), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 782f0dc2d94..52e98784ae9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -143,7 +143,7 @@ cloneItemBlock(0, '[% UniqueItemFields | html %]'); [% END %] - [% IF ( suggestionid ) %]updateCosts();[% END %] + [% IF ( suggestion ) %]updateCosts();[% END %] $("#quantity").change(function() { updateCosts(); }); @@ -348,7 +348,7 @@ - + [% FOREACH c IN currencies %] @@ -466,14 +466,15 @@ [% END %] - [% IF ( suggestionid ) %] + [% IF ( suggestion ) %]
Suggestion
  1. Suggested by: - [% surnamesuggestedby | html %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby | html %][% END %] (suggestion #[% suggestionid | html %]suggestion #[% suggestion.suggestionid | html %])
@@ -743,7 +744,7 @@ - [% IF (suggestionid) %] + [% IF (suggestion) %] Cancel [% ELSE %] [% IF subscriptionid %] -- 2.43.0