Optimize edit invoice page

This commit is contained in:
Hillel Coren 2018-03-27 15:12:10 +03:00
parent ff05d41ca3
commit dd96ce4f21

View File

@ -374,8 +374,15 @@ function InvoiceModel(data) {
}
self.formatMoney = function(amount) {
/*
var client = $.parseJSON(ko.toJSON(self.client()));
return formatMoneyAccount(amount, self.account, client);
*/
var currencyId = (self.client().currency_id() || account.currency_id) || {{ DEFAULT_CURRENCY }};
var countryId = (self.client().country_id() || account.country_id) || {{ DEFAULT_COUNTRY }};
var decorator = parseInt(account.show_currency_code) ? 'code' : 'symbol';
return formatMoney(amount, currencyId, countryId, decorator);
}
self.totals = ko.observable();