diff --git a/src/components/common/VnCurrency.vue b/src/components/common/VnCurrency.vue
index 9e08f4500..a97eb196a 100644
--- a/src/components/common/VnCurrency.vue
+++ b/src/components/common/VnCurrency.vue
@@ -1,33 +1,45 @@
{
- if (value.includes(',')) amount.value = amount.replace(',', '.');
- }
- "
- :rules="[(val) => isValidNumber(val) || !val || 'Please type a number']"
- lazy-rules
>
-
-
+
+
-
+
es:
amount: importe
diff --git a/src/composables/useValidNumber.js b/src/composables/useValidNumber.js
new file mode 100644
index 000000000..32b1aba04
--- /dev/null
+++ b/src/composables/useValidNumber.js
@@ -0,0 +1,3 @@
+export function useValidNumber(value) {
+ return /^(\d|\d+(\.)?\d+)$/.test(value);
+}
diff --git a/src/pages/Customer/Payments/CustomerPaymentsFilter.vue b/src/pages/Customer/Payments/CustomerPaymentsFilter.vue
index a45bc4f8c..b49fccce0 100644
--- a/src/pages/Customer/Payments/CustomerPaymentsFilter.vue
+++ b/src/pages/Customer/Payments/CustomerPaymentsFilter.vue
@@ -12,10 +12,6 @@ const props = defineProps({
required: true,
},
});
-
-function isValidNumber(value) {
- return /^(\d|\d+(\.|,)?\d+)$/.test(value);
-}
diff --git a/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue b/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue
index e240e9a8c..48c166191 100644
--- a/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue
+++ b/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue
@@ -158,7 +158,12 @@ async function insert() {
-
+
diff --git a/src/pages/InvoiceIn/InvoiceInFilter.vue b/src/pages/InvoiceIn/InvoiceInFilter.vue
index 8bf007235..ae7f6a3a5 100644
--- a/src/pages/InvoiceIn/InvoiceInFilter.vue
+++ b/src/pages/InvoiceIn/InvoiceInFilter.vue
@@ -8,6 +8,7 @@ import FetchData from 'components/FetchData.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnInputDate from 'components/common/VnInputDate.vue';
import { useCapitalize } from 'src/composables/useCapitalize';
+import VnCurrency from 'src/components/common/VnCurrency.vue';
const { t } = useI18n();
const props = defineProps({
@@ -137,16 +138,7 @@ const suppliersRef = ref();
-
-
-
-
-
+
diff --git a/src/pages/InvoiceOut/InvoiceOutFilter.vue b/src/pages/InvoiceOut/InvoiceOutFilter.vue
index f8a430b51..306200a93 100644
--- a/src/pages/InvoiceOut/InvoiceOutFilter.vue
+++ b/src/pages/InvoiceOut/InvoiceOutFilter.vue
@@ -6,6 +6,7 @@ import FetchData from 'components/FetchData.vue';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnInputDate from 'components/common/VnInputDate.vue';
+import VnCurrency from 'src/components/common/VnCurrency.vue';
const { t } = useI18n();
const props = defineProps({
@@ -57,7 +58,12 @@ function setWorkers(data) {
-
+
diff --git a/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue b/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue
index 3adfa1d13..5d6752d1b 100644
--- a/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue
+++ b/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue
@@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnInputDate from 'components/common/VnInputDate.vue';
+import VnCurrency from 'src/components/common/VnCurrency.vue';
const { t } = useI18n();
const props = defineProps({
@@ -84,10 +85,10 @@ const props = defineProps({
-