From b32b52f1fb38f0c6628a1f53e5583c0ee275b370 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) --- .../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 addccd2bd9f..619c08e6ff5 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.25.1