From 314644ed6d7d7eafad445bd319c2eab36a6a8603 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 16 Jan 2023 22:51:31 +0100 Subject: [PATCH] Bug 25655: Select currency and prefill unitprice with previous receipt In case of partial order we want to prefill the unit price and the currency with the value of the previous receipt. Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Michaela Sieber --- .../prog/en/modules/acqui/orderreceive.tt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index d06b3e3e37..dd2151ba29 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -429,12 +429,20 @@
  • - + [% IF currencies.count %] [% END %] @@ -607,6 +615,10 @@ } }).change(); + [% IF order.invoice_unitprice %] + $("input[name='change_currency']").click().trigger('change'); + [% END %] + function update_unitprice() { var rate = Number($("select[name='invoice_currency'] option:selected").data('rate')); var unitprice = $("#invoice_unitprice").val(); -- 2.30.2