diff --git a/src/locales/en.json b/src/locales/en.json index 7f8859dd..cdf5fd7d 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -31,6 +31,7 @@ "Logging out": "Logging out", "Logout": "Logout", "Make sure you've reviewed the products and their counts before uploading them for review": "Make sure you've reviewed the products and their counts before uploading them for review", + "Negative stock count cannot be accepted": "Negative stock count cannot be accepted", "No results found": "No results found", "No time zone found": "No time zone found", "Ok": "Ok", diff --git a/src/views/count.vue b/src/views/count.vue index 61c21e5b..5e5c6dc2 100644 --- a/src/views/count.vue +++ b/src/views/count.vue @@ -216,7 +216,7 @@ await picker.present(); }, updateProductInventoryCount() { - if (this.quantity) { + if (this.quantity > 0) { this.product.quantity = this.quantity; this.product.availableQOH = this.availableQOH; this.store.dispatch('product/updateInventoryCount', { ...this.product, locationId: this.product.locationId }); @@ -228,6 +228,8 @@ } }]) this.router.push('/search') + } else if(this.quantity < 0) { + showToast(translate("Negative stock count cannot be accepted")) } else { showToast(translate("Enter the stock count for the product")) }