From 74706ecfd1d1d8e9378b8f176d0dcef26c070765 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 16 Jan 2018 12:36:44 +0200 Subject: [PATCH] =?UTF-8?q?Handle=20=E2=80=98exchange=20rate=E2=80=99=20fi?= =?UTF-8?q?eld=20in=20any=20language?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/invoices/knockout.blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/invoices/knockout.blade.php b/resources/views/invoices/knockout.blade.php index a461f92c2320..582bce73449f 100644 --- a/resources/views/invoices/knockout.blade.php +++ b/resources/views/invoices/knockout.blade.php @@ -1063,16 +1063,16 @@ ko.bindingHandlers.productTypeahead = { from: currencyMap[accountCurrencyId].code, to: currencyMap[clientCurrencyId].code, }); - if ((account.custom_invoice_text_label1 || '').toLowerCase() == 'exchange rate') { + if ((account.custom_invoice_text_label1 || '').toLowerCase() == "{{ strtolower(trans('texts.exchange_rate')) }}") { window.model.invoice().custom_text_value1(roundToFour(rate, true)); - } else if ((account.custom_invoice_text_label2 || '').toLowerCase() == 'exchange rate') { + } else if ((account.custom_invoice_text_label2 || '').toLowerCase() == "{{ strtolower(trans('texts.exchange_rate')) }}") { window.model.invoice().custom_text_value2(roundToFour(rate, true)); } } } @endif - model.cost(roundSignificant(cost, true)); + model.cost(roundToTwo(cost, true)); } } if (!model.qty() && ! model.task_public_id()) {