From 1117d3d07a202dadd520f25dba748389885f8765 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 28 Mar 2025 09:49:44 +0100 Subject: [PATCH] feat: refs #8277 add invoice confirmation dialog and total amount calculation in EntryControl --- src/pages/Entry/EntryControl.vue | 81 ++++++++++++++++++++++++-------- src/pages/Entry/locale/en.yml | 1 + src/pages/Entry/locale/es.yml | 1 + 3 files changed, 64 insertions(+), 19 deletions(-) diff --git a/src/pages/Entry/EntryControl.vue b/src/pages/Entry/EntryControl.vue index 96778ba25..be8faa593 100644 --- a/src/pages/Entry/EntryControl.vue +++ b/src/pages/Entry/EntryControl.vue @@ -1,5 +1,5 @@ @@ -328,9 +355,9 @@ async function createInvoice(isAgricultural) { v-model:selected="selectedRows" :data-key :columns + :url :search-url="dataKey" ref="table" - :url :disable-option="{ card: true }" redirect="Entry" :order="['landed DESC']" @@ -338,6 +365,11 @@ async function createInvoice(isAgricultural) { :user-params="{ daysAgo, isBooked }" :row-click="false" :table="{ selection: 'multiple' }" + :limit="0" + :footer="true" + @on-fetch=" + (data) => (totalAmount = data.reduce((acc, entry) => acc + entry.amount, 0)) + " > + + - diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index 259c9e476..343db7a9c 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -140,6 +140,7 @@ entry: search: Search searchInfo: You can search by supplier name or nickname preAccount: Pre-account + hasInvoice: This entry has already an invoice in dialog: title: Pre-account entries message: Do you want the invoice to inherit the entry document? diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index 1b7d4701e..fcc2efce3 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -91,6 +91,7 @@ entry: search: Buscar searchInfo: Puedes buscar por nombre o alias de proveedor preAccount: Precontabilizar + hasInvoice: Esta entrada ya tiene una f. recibida dialog: title: Precontabilizar entradas message: ¿Desea que la factura herede el documento de la entrada?