From 83c657603394fb07e4152ce8a6505b7a3e1a1086 Mon Sep 17 00:00:00 2001 From: yogesh_gohil Date: Wed, 8 Dec 2021 18:53:26 +0530 Subject: [PATCH] fix: allow 0 value for quantity --- .../components/estimate-invoice-common/CreateItemRow.vue | 4 ++-- resources/scripts/views/payments/Create.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/scripts/components/estimate-invoice-common/CreateItemRow.vue b/resources/scripts/components/estimate-invoice-common/CreateItemRow.vue index 6d695c2a..3ecc3ae4 100644 --- a/resources/scripts/components/estimate-invoice-common/CreateItemRow.vue +++ b/resources/scripts/components/estimate-invoice-common/CreateItemRow.vue @@ -53,7 +53,7 @@ :content-loading="loading" type="number" small - min="0.1" + min="0" step="any" @change="syncItemToStore()" @input="v$.quantity.$touch()" @@ -352,7 +352,7 @@ const rules = { required: helpers.withMessage(t('validation.required'), required), minValue: helpers.withMessage( t('validation.qty_must_greater_than_zero'), - minValue(0.1) + minValue(0) ), maxLength: helpers.withMessage( t('validation.amount_maxlength'), diff --git a/resources/scripts/views/payments/Create.vue b/resources/scripts/views/payments/Create.vue index 8a40ccde..d7bbf702 100644 --- a/resources/scripts/views/payments/Create.vue +++ b/resources/scripts/views/payments/Create.vue @@ -347,7 +347,7 @@ const rules = computed(() => { required: helpers.withMessage(t('validation.required'), required), between: helpers.withMessage( t('validation.payment_greater_than_due_amount'), - between(1, paymentStore.currentPayment.maxPayableAmount) + between(0, paymentStore.currentPayment.maxPayableAmount) ), }, exchange_rate: {