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 <michaela.sieber@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 140bad214c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2023-05-30 14:37:33 +02:00 committed by Martin Renvoize
parent 7eabb2350b
commit 632840add0
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -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);