Remember discount type setting

This commit is contained in:
Hillel Coren 2017-08-15 18:39:22 +03:00
parent ee0be053d7
commit 3c40cd460e
2 changed files with 1 additions and 3 deletions

View File

@ -876,7 +876,6 @@
// load previous isAmountDiscount setting // load previous isAmountDiscount setting
if (isStorageSupported()) { if (isStorageSupported()) {
var lastIsAmountDiscount = parseInt(localStorage.getItem('last:is_amount_discount')); var lastIsAmountDiscount = parseInt(localStorage.getItem('last:is_amount_discount'));
console.log('lastIsAmountDiscount: ' + lastIsAmountDiscount);
if (lastIsAmountDiscount) { if (lastIsAmountDiscount) {
model.invoice().is_amount_discount(lastIsAmountDiscount); model.invoice().is_amount_discount(lastIsAmountDiscount);
} }

View File

@ -594,8 +594,7 @@ function InvoiceModel(data) {
} }
self.isAmountDiscountChanged = function(obj, event) { self.isAmountDiscountChanged = function(obj, event) {
console.log('onIsAmountDiscountChange... ' + event.originalEvent); if (! event.originalEvent) {
if (event.originalEvent) {
return; return;
} }
if (! isStorageSupported()) { if (! isStorageSupported()) {