diff --git a/src/pages/Supplier/Card/SupplierBasicData.vue b/src/pages/Supplier/Card/SupplierBasicData.vue index b73ce9346..747784943 100644 --- a/src/pages/Supplier/Card/SupplierBasicData.vue +++ b/src/pages/Supplier/Card/SupplierBasicData.vue @@ -48,6 +48,13 @@ const workersOptions = ref([]); map-options :rules="validate('supplier.workerFk')" > + + + {{ + t('Responsible for approving invoices') + }} + + @@ -95,3 +102,8 @@ const workersOptions = ref([]); + + +es: + Responsible for approving invoices: Responsable de aprobar las facturas + diff --git a/src/pages/Supplier/Card/SupplierBillingData.vue b/src/pages/Supplier/Card/SupplierBillingData.vue index 1237a0403..bf5ccb115 100644 --- a/src/pages/Supplier/Card/SupplierBillingData.vue +++ b/src/pages/Supplier/Card/SupplierBillingData.vue @@ -13,6 +13,13 @@ const { t } = useI18n(); const paymethodsOptions = ref([]); const payDemsOptions = ref([]); + +const formatPayDems = (data) => { + payDemsOptions.value = data.map(({ id, payDem }) => ({ + id: id, + payDem: payDem || '0', + })); +}; (paymethodsOptions = data)" auto-load /> - (payDemsOptions = data)" auto-load /> + formatPayDems(data)" auto-load /> @@ -49,7 +55,6 @@ const payDemsOptions = ref([]); option-value="id" option-label="payDem" hide-selected - map-options :rules="validate('supplier.payDemFk')" /> diff --git a/src/pages/Supplier/Card/SupplierConsumption.vue b/src/pages/Supplier/Card/SupplierConsumption.vue index 0cf66fe25..7baa8ded5 100644 --- a/src/pages/Supplier/Card/SupplierConsumption.vue +++ b/src/pages/Supplier/Card/SupplierConsumption.vue @@ -8,7 +8,7 @@ import FetchedTags from 'components/ui/FetchedTags.vue'; import SendEmailDialog from 'components/common/SendEmailDialog.vue'; import SupplierConsumptionFilter from './SupplierConsumptionFilter.vue'; -import { toDate, toDateString } from 'src/filters'; +import { toDate } from 'src/filters'; import { dashIfEmpty } from 'src/filters'; import { usePrintService } from 'composables/usePrintService'; import useNotify from 'src/composables/useNotify.js'; @@ -31,23 +31,26 @@ const arrayData = useArrayData('SupplierConsumption', { const store = arrayData.store; -const userParams = computed(() => { - const minDate = Date.vnNew(); - minDate.setHours(0, 0, 0, 0); - minDate.setMonth(minDate.getMonth() - 2); - - const maxDate = Date.vnNew(); - maxDate.setHours(23, 59, 59, 59); - - return { - from: toDateString(minDate), - to: toDateString(maxDate), +const dateRanges = computed(() => { + const ranges = { + from: null, + to: null, }; + + if (route.query && route.query.params) { + const params = JSON.parse(route.query.params); + if (params.from && params.to) { + ranges.from = params.from; + ranges.to = params.to; + } + } + + return ranges; }); const reportParams = computed(() => ({ recipientId: Number(route.params.id), - ...userParams.value, + ...dateRanges.value, })); async function getSupplierConsumptionData() { @@ -113,10 +116,10 @@ onMounted(async () => { - + { (itemCategoriesOptions = data)" auto-load /> - + {{ t(`params.${tag.label}`) }}: {{ formatFn(tag.value) }} - + @@ -149,8 +149,9 @@ const itemCategoriesOptions = ref([]); diff --git a/src/pages/Supplier/Card/SupplierDescriptor.vue b/src/pages/Supplier/Card/SupplierDescriptor.vue index 43857fd1e..5187708e4 100644 --- a/src/pages/Supplier/Card/SupplierDescriptor.vue +++ b/src/pages/Supplier/Card/SupplierDescriptor.vue @@ -1,10 +1,14 @@ @@ -87,8 +117,46 @@ const setData = (entity) => { + + + + {{ t('All entries with current supplier') }} + + + {{ t('Go to client') }} + + + {{ t('Create invoiceIn') }} + + + - + +es: + All entries with current supplier: Todas las entradas con proveedor actual + Go to client: Ir a cliente + Create invoiceIn: Crear factura recibida diff --git a/src/pages/Supplier/SupplierCreate.vue b/src/pages/Supplier/SupplierCreate.vue index ebe0518f2..8424ae68c 100644 --- a/src/pages/Supplier/SupplierCreate.vue +++ b/src/pages/Supplier/SupplierCreate.vue @@ -1,6 +1,8 @@ @@ -34,6 +41,7 @@ const newSupplierForm = reactive({ url-create="Suppliers/newSupplier" model="supplier" :form-initial-data="newSupplierForm" + @on-data-saved="redirectToSupplierFiscalData" > diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue index d504e127a..f4875fc99 100644 --- a/src/pages/Supplier/SupplierList.vue +++ b/src/pages/Supplier/SupplierList.vue @@ -1,13 +1,16 @@ + + + (provincesOptions = data)" + auto-load + /> + (countriesOptions = data)" + auto-load + /> + + + + {{ t(`params.${tag.label}`) }}: + {{ formatFn(tag.value) }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +en: + params: + search: General search + nickname: Alias + nif: Tax number + provinceFk: Province + countryFk: Country +es: + params: + search: Búsqueda general + nickname: Alias + nif: NIF/CIF + provinceFk: Provincia + countryFk: País +