From 659285e2cde83acc6c66eaf5aebd701e8235092b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 9 Sep 2020 14:52:13 +0300 Subject: [PATCH] refs #1594 invoice/bill edit items --- resources/assets/js/views/purchases/bills.js | 6 +++--- resources/assets/js/views/sales/invoices.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/assets/js/views/purchases/bills.js b/resources/assets/js/views/purchases/bills.js index 0e389181d..3f8153649 100644 --- a/resources/assets/js/views/purchases/bills.js +++ b/resources/assets/js/views/purchases/bills.js @@ -46,7 +46,7 @@ const app = new Vue({ edit: { status: false, currency: false, - items: false, + items: 0, }, } }, @@ -291,8 +291,8 @@ const app = new Vue({ }, onSelectItem(item, index) { - if (this.edit.status && !this.edit.items) { - this.edit.items = true; + if (this.edit.status && this.edit.items < this.form.items.length) { + this.edit.items += 1; return; } diff --git a/resources/assets/js/views/sales/invoices.js b/resources/assets/js/views/sales/invoices.js index d92434d30..dfc62fdcd 100644 --- a/resources/assets/js/views/sales/invoices.js +++ b/resources/assets/js/views/sales/invoices.js @@ -46,7 +46,7 @@ const app = new Vue({ edit: { status: false, currency: false, - items: false, + items: 0, }, } }, @@ -291,8 +291,8 @@ const app = new Vue({ }, onSelectItem(item, index) { - if (this.edit.status && !this.edit.items) { - this.edit.items = true; + if (this.edit.status && this.edit.items < this.form.items.length) { + this.edit.items += 1; return; }