From 3c40cd460e04bb18308f21bcebd44c3c43db2c22 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 15 Aug 2017 18:39:22 +0300 Subject: [PATCH] Remember discount type setting --- resources/views/invoices/edit.blade.php | 1 - resources/views/invoices/knockout.blade.php | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 31afd457d21f..44e77c57f558 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -876,7 +876,6 @@ // load previous isAmountDiscount setting if (isStorageSupported()) { var lastIsAmountDiscount = parseInt(localStorage.getItem('last:is_amount_discount')); - console.log('lastIsAmountDiscount: ' + lastIsAmountDiscount); if (lastIsAmountDiscount) { model.invoice().is_amount_discount(lastIsAmountDiscount); } diff --git a/resources/views/invoices/knockout.blade.php b/resources/views/invoices/knockout.blade.php index 37003463b54c..844be5a6245e 100644 --- a/resources/views/invoices/knockout.blade.php +++ b/resources/views/invoices/knockout.blade.php @@ -594,8 +594,7 @@ function InvoiceModel(data) { } self.isAmountDiscountChanged = function(obj, event) { - console.log('onIsAmountDiscountChange... ' + event.originalEvent); - if (event.originalEvent) { + if (! event.originalEvent) { return; } if (! isStorageSupported()) {