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; }