Fix for JS errors

This commit is contained in:
Hillel Coren 2018-02-19 09:33:43 +02:00
parent ae100a54dd
commit 4499fb7a19

View File

@ -345,6 +345,7 @@ function InvoiceModel(data) {
return self.tax_rate1IsInclusive() + ' ' + self.tax_rate1() + ' ' + self.tax_name1(); return self.tax_rate1IsInclusive() + ' ' + self.tax_rate1() + ' ' + self.tax_name1();
}, },
write: function(value) { write: function(value) {
value = value || '';
var parts = value.split(' '); var parts = value.split(' ');
self.tax_rate1IsInclusive(parts.shift()); self.tax_rate1IsInclusive(parts.shift());
self.tax_rate1(parts.shift()); self.tax_rate1(parts.shift());
@ -357,6 +358,7 @@ function InvoiceModel(data) {
return self.tax_rate2IsInclusive() + ' ' + self.tax_rate2() + ' ' + self.tax_name2(); return self.tax_rate2IsInclusive() + ' ' + self.tax_rate2() + ' ' + self.tax_name2();
}, },
write: function(value) { write: function(value) {
value = value || '';
var parts = value.split(' '); var parts = value.split(' ');
self.tax_rate2IsInclusive(parts.shift()); self.tax_rate2IsInclusive(parts.shift());
self.tax_rate2(parts.shift()); self.tax_rate2(parts.shift());
@ -844,6 +846,7 @@ function ItemModel(data) {
return self.tax_rate1IsInclusive() + ' ' + self.tax_rate1() + ' ' + self.tax_name1(); return self.tax_rate1IsInclusive() + ' ' + self.tax_rate1() + ' ' + self.tax_name1();
}, },
write: function(value) { write: function(value) {
value = value || '';
var parts = value.split(' '); var parts = value.split(' ');
self.tax_rate1IsInclusive(parts.shift()); self.tax_rate1IsInclusive(parts.shift());
self.tax_rate1(parts.shift()); self.tax_rate1(parts.shift());
@ -856,6 +859,7 @@ function ItemModel(data) {
return self.tax_rate2IsInclusive() + ' ' + self.tax_rate2() + ' ' + self.tax_name2(); return self.tax_rate2IsInclusive() + ' ' + self.tax_rate2() + ' ' + self.tax_name2();
}, },
write: function(value) { write: function(value) {
value = value || '';
var parts = value.split(' '); var parts = value.split(' ');
self.tax_rate2IsInclusive(parts.shift()); self.tax_rate2IsInclusive(parts.shift());
self.tax_rate2(parts.shift()); self.tax_rate2(parts.shift());