From a5d214bd789a28bbcb354beedac4bc00ad74ca7f 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../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.39.2