diff --git a/src/components/VnTable/VnColumn.vue b/src/components/VnTable/VnColumn.vue index 55b2f5fee..ed34e9eee 100644 --- a/src/components/VnTable/VnColumn.vue +++ b/src/components/VnTable/VnColumn.vue @@ -151,7 +151,7 @@ const col = computed(() => { }; } if ( - (newColumn.name.startsWith('is') || newColumn.name.startsWith('has')) && + (/^is[A-Z]/.test(newColumn.name) || /^has[A-Z]/.test(newColumn.name)) && newColumn.component == null ) newColumn.component = 'checkbox'; diff --git a/src/components/common/VnCurrency.vue b/src/components/common/VnCurrency.vue deleted file mode 100644 index b892e5012..000000000 --- a/src/components/common/VnCurrency.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - -es: - amount: importe - diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index d2cd83560..12680d0cb 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -262,6 +262,7 @@ globals: unsavedPopup: title: Unsaved changes will be lost subtitle: Are you sure exit without saving? + createInvoiceIn: Create invoice in errors: statusUnauthorized: Access denied statusInternalServerError: An internal server error has ocurred diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index b926bd50b..747a10d51 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -264,6 +264,8 @@ globals: unsavedPopup: title: Los cambios que no haya guardado se perderán subtitle: ¿Seguro que quiere salir sin guardar? + createInvoiceIn: Crear factura recibida + errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor diff --git a/src/pages/Customer/Payments/CustomerPaymentsFilter.vue b/src/pages/Customer/Payments/CustomerPaymentsFilter.vue index 1b79868c0..8982cba5a 100644 --- a/src/pages/Customer/Payments/CustomerPaymentsFilter.vue +++ b/src/pages/Customer/Payments/CustomerPaymentsFilter.vue @@ -3,7 +3,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'; +import VnInputNumber from 'src/components/common/VnInputNumber.vue'; const { t } = useI18n(); const props = defineProps({ @@ -47,7 +47,11 @@ const props = defineProps({ - + diff --git a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue index da24e50fa..cba2a31d2 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue @@ -130,8 +130,6 @@ onBeforeMount(async () => { }); onBeforeRouteUpdate(async (to, from) => { - invoiceInCorrection.correcting.length = 0; - invoiceInCorrection.corrected = null; if (to.params.id !== from.params.id) { await setInvoiceCorrection(to.params.id); const { data } = await axios.get(`InvoiceIns/${to.params.id}/getTotals`); @@ -140,6 +138,8 @@ onBeforeRouteUpdate(async (to, from) => { }); async function setInvoiceCorrection(id) { + invoiceInCorrection.correcting.length = 0; + invoiceInCorrection.corrected = null; const { data: correctingData } = await axios.get('InvoiceInCorrections', { params: { filter: { where: { correctingFk: id } } }, }); @@ -198,7 +198,6 @@ async function cloneInvoice() { const isAdministrative = () => hasAny(['administrative']); const isAgricultural = () => { - console.error(config); if (!config.value) return false; return ( invoiceIn.value?.supplier?.sageFarmerWithholdingFk === diff --git a/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue b/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue index d2b43c57a..d88996929 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue @@ -8,9 +8,11 @@ import { useArrayData } from 'src/composables/useArrayData'; import CrudModel from 'src/components/CrudModel.vue'; import FetchData from 'src/components/FetchData.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; -import VnCurrency from 'src/components/common/VnCurrency.vue'; import { toCurrency } from 'src/filters'; import useNotify from 'src/composables/useNotify.js'; +import VnInput from 'src/components/common/VnInput.vue'; +import VnInputDate from 'src/components/common/VnInputDate.vue'; +import VnInputNumber from 'src/components/common/VnInputNumber.vue'; const route = useRoute(); const { notify } = useNotify(); @@ -22,9 +24,6 @@ const rowsSelected = ref([]); const banks = ref([]); const invoiceInFormRef = ref(); const invoiceId = +route.params.id; - -const placeholder = 'yyyy/mm/dd'; - const filter = { where: { invoiceInFk: invoiceId } }; const columns = computed(() => [ @@ -104,42 +103,7 @@ const getTotalAmount = (rows) => rows.reduce((acc, { amount }) => acc + +amount, > +