diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index 205f67cd4..728ba9442 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -31,17 +31,24 @@ const MODEL = 'InvoiceOuts'; const { openReport } = usePrintService(); const addressOptions = ref([]); const selectedOption = ref('ticket'); - async function fetchClientAddress(id) { - const { data } = await axios.get(`Clients/${id}/addresses`); + const { data } = await axios.get( + `Clients/${id}/addresses?filter[order]=isActive DESC` + ); addressOptions.value = data; } +const exprBuilder = (_, value) => { + return { + or: [{ code: value }, { description: { like: `%${value}%` } }], + }; +}; + const columns = computed(() => [ { align: 'center', name: 'id', - label: t('invoiceOutList.tableVisibleColumns.id'), + label: t('invoice id'), chip: { condition: () => true }, isId: true, columnFilter: { name: 'search' }, @@ -49,7 +56,7 @@ const columns = computed(() => [ { align: 'left', name: 'ref', - label: t('invoiceOutList.tableVisibleColumns.ref'), + label: t('invoiceOut.list.ref'), isTitle: true, component: 'select', attrs: { url: MODEL, optionLabel: 'ref', optionValue: 'id' }, @@ -57,8 +64,8 @@ const columns = computed(() => [ }, { align: 'left', - name: 'Issued', - label: t('invoiceOutList.tableVisibleColumns.issued'), + name: 'issued', + label: t('invoiceOut.list.issued'), component: 'date', format: (row) => toDate(row.issued), columnField: { component: null }, @@ -66,7 +73,7 @@ const columns = computed(() => [ { align: 'left', name: 'clientFk', - label: t('invoiceOutModule.customer'), + label: t('invoiceOut.list.client'), cardVisible: true, component: 'select', attrs: { url: 'Clients', fields: ['id', 'name'] }, @@ -75,7 +82,7 @@ const columns = computed(() => [ { align: 'left', name: 'companyCode', - label: t('invoiceOutModule.company'), + label: t('invoiceOut.list.company'), cardVisible: true, component: 'select', attrs: { url: 'Companies', optionLabel: 'code', optionValue: 'id' }, @@ -84,14 +91,14 @@ const columns = computed(() => [ { align: 'left', name: 'amount', - label: t('invoiceOutModule.amount'), + label: t('invoiceOut.list.amount'), cardVisible: true, format: (row) => toCurrency(row.amount), }, { align: 'left', name: 'created', - label: t('invoiceOutList.tableVisibleColumns.created'), + label: t('invoiceOut.list.created'), component: 'date', columnField: { component: null }, format: (row) => toDate(row.created), @@ -99,7 +106,7 @@ const columns = computed(() => [ { align: 'left', name: 'dued', - label: t('invoiceOutList.tableVisibleColumns.dueDate'), + label: t('invoiceOut.list.dued'), component: 'date', columnField: { component: null }, format: (row) => toDate(row.dued), @@ -109,12 +116,12 @@ const columns = computed(() => [ name: 'tableActions', actions: [ { - title: t('components.smartCard.viewSummary'), + title: t('view summary'), icon: 'preview', action: (row) => viewSummary(row.id, InvoiceOutSummary), }, { - title: t('DownloadPdf'), + title: t('download pdf'), icon: 'vn:ticket', isPrimary: true, action: (row) => openPdf(row.id), @@ -163,8 +170,8 @@ watchEffect(selectedRows); @@ -190,7 +197,7 @@ watchEffect(selectedRows); :url="`${MODEL}/filter`" :create="{ urlCreate: 'InvoiceOuts/createManualInvoice', - title: t('createManualInvoice'), + title: t('create manual invoice'), onDataSaved: ({ id }) => tableRef.redirect(id), formInitialData: { active: true }, }" @@ -240,7 +247,21 @@ watchEffect(selectedRows); option-value="id" @update:model-value="fetchClientAddress" style="flex: 1" - /> + > + + + > + +
+ > + +
@@ -287,31 +367,36 @@ watchEffect(selectedRows); - + option-filter + :expr-builder="exprBuilder" + > + + + - + @@ -332,3 +417,24 @@ watchEffect(selectedRows); flex: 0.75; } + + en: + invoice id: Invoice ID + view summary: View Summary + download pdf: Download PDF + you can search by invoice reference: You can search by invoice reference + search invoice: Search Invoice + create manual invoice: Create Manual Invoice + invoice serial: Invoice Serial + tax area: Tax Area + + es: + invoice id: ID de factura + view summary: Ver resumen + download pdf: Descargar PDF + you can search by invoice reference: Puedes buscar por referencia de la factura + search invoice: Buscar factura + create manual invoice: Crear factura manual + invoice serial: Serie de factura + tax area: Área fiscal +