From 632840add0776cea1dd8bc12bdb4bb237a1b6961 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 30 May 2023 14:37:33 +0200 Subject: [PATCH] Bug 33863: (bug 25655 follow-up) Check "Change currency" only if checked before We should not check "Change currency" if it has not modified in the original order. Test plan: Create an order with 3+ items Receive 1 item, don't check "change currency" Receive an other item => "Change currency" is not checked Check "Change currency", modify the currency and the price Receive a third item => Change currency is checked, invoice currency and price are set correctly to the previous values Signed-off-by: Michaela Sieber Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 140bad214c86531c57ecf1ec804697ac1be4895a) Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6a0091244e..40fb1ba879 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -1242,7 +1242,7 @@ $('#modal-order-main #items-panel').removeClass('show').addClass('hide'); } } - if(row.invoice_unit_price) { + if(row.invoice_currency && row.invoice_currency != active_currency) { $("#select_currency").show(); $("#unitprice").prop("readonly", true); $("input[name='change_currency']").prop('checked', true); -- 2.39.5