Fix for 'model not defined' error

This commit is contained in:
Hillel Coren 2016-02-16 23:56:59 +02:00
parent 81f08cdd17
commit aad648b901

View File

@ -787,14 +787,7 @@ function ItemModel(data) {
this.totals.total = ko.computed(function() {
var total = self.totals.rawTotal();
return total ? model.invoice().formatMoney(total) : '';
/*
if (window.hasOwnProperty('model') && model.invoice && model.invoice() && model.invoice().client()) {
return total ? model.invoice().formatMoney(total) : '';
} else {
return total ? model.invoice().formatMoney(total, 1) : '';
}
*/
return window.hasOwnProperty('model') && total ? model.invoice().formatMoney(total) : '';
});
this.hideActions = function() {