1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Check for currency id on payment.edit

This commit is contained in:
Hillel Coren 2018-03-04 20:49:52 +02:00
parent 6df518d8f1
commit 84dd416ed6

View File

@ -309,7 +309,8 @@
};
self.exchangeCurrencyCode = ko.computed(function() {
return self.getCurrency(self.exchange_currency_id()).code;
var currency = self.getCurrency(self.exchange_currency_id());
return currency ? currency.code : '';
});
self.paymentCurrencyCode = ko.computed(function() {
@ -319,7 +320,8 @@
} else {
var currencyId = self.account_currency_id();
}
return self.getCurrency(currencyId).code;
var currency = self.getCurrency(currencyId);
return currency ? currency.code : '';
});
self.enableExchangeRate = ko.computed(function() {