diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index b73395df2..fa0a14f45 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -277,6 +277,7 @@ globals: medical: Mutual RouteExtendedList: Router wasteRecalc: Waste recaclulate + operator: Operator supplier: Supplier created: Created worker: Worker @@ -743,6 +744,7 @@ worker: locker: Locker balance: Balance medical: Medical + operator: Operator list: name: Name email: Email @@ -840,6 +842,18 @@ worker: debit: Debt credit: Have concept: Concept + operator: + numberOfWagons: Number of wagons + train: Train + itemPackingType: Item packing type + warehouse: Warehouse + sector: Sector + labeler: Printer + linesLimit: Lines limit + volumeLimit: Volume limit + sizeLimit: Size limit + isOnReservationMode: Reservation mode + machine: Machine wagon: pageTitles: wagons: Wagons diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 2552c9549..5dfe90e98 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -281,6 +281,7 @@ globals: serial: Facturas por serie medical: Mutua wasteRecalc: Recalcular mermas + operator: Operario supplier: Proveedor created: Fecha creación worker: Trabajador @@ -750,6 +751,7 @@ worker: balance: Balance formation: Formación medical: Mutua + operator: Operario list: name: Nombre email: Email @@ -838,6 +840,19 @@ worker: debit: Debe credit: Haber concept: Concepto + operator: + numberOfWagons: Número de vagones + train: tren + itemPackingType: Tipo de embalaje + warehouse: Almacén + sector: Sector + labeler: Impresora + linesLimit: Líneas límite + volumeLimit: Volumen límite + sizeLimit: Tamaño límite + isOnReservationMode: Modo de reserva + machine: Máquina + wagon: pageTitles: wagons: Vagones diff --git a/src/pages/Customer/components/CustomerSummaryTable.vue b/src/pages/Customer/components/CustomerSummaryTable.vue index 946296e67..f6013dea9 100644 --- a/src/pages/Customer/components/CustomerSummaryTable.vue +++ b/src/pages/Customer/components/CustomerSummaryTable.vue @@ -6,7 +6,7 @@ import { useRoute, useRouter } from 'vue-router'; import { date } from 'quasar'; import { toDateFormat } from 'src/filters/date.js'; -import { toCurrency } from 'src/filters'; +import { dashIfEmpty, toCurrency } from 'src/filters'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import TicketSummary from 'src/pages/Ticket/Card/TicketSummary.vue'; @@ -32,6 +32,16 @@ const filter = { }, { relation: 'invoiceOut', scope: { fields: ['id'] } }, { relation: 'agencyMode', scope: { fields: ['name'] } }, + { + relation: 'ticketSales', + scope: { + fields: ['id', 'concept', 'itemFk'], + include: { relation: 'item' }, + scope: { + fields: ['id', 'name', 'itemPackingTypeFk'], + }, + }, + }, ], where: { clientFk: route.params.id }, order: ['shipped DESC', 'id'], @@ -87,7 +97,12 @@ const columns = computed(() => [ label: t('Total'), name: 'total', }, - + { + align: 'left', + name: 'itemPackingTypeFk', + label: t('ticketSale.packaging'), + format: (row) => getItemPackagingType(row), + }, { align: 'right', label: '', @@ -135,6 +150,15 @@ const setShippedColor = (date) => { if (difference == 0) return 'warning'; if (difference < 0) return 'success'; }; + +const getItemPackagingType = (row) => { + const packagingType = row?.ticketSales + .map((sale) => sale.item?.itemPackingTypeFk || '-') + .filter((value) => value !== '-') + .join(', '); + + return dashIfEmpty(packagingType); +}; @@ -577,16 +579,16 @@ function setReference(data) { {{ row.state }} + + + {{ row.refFk }} + + + {{ row.state }} -