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);
+};
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index ad97e75c1..fe9667bea 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -95,6 +95,7 @@ const columns = computed(() => [
columnField: {
component: null,
},
+ columnClass: 'expand',
format: (row, dashIfEmpty) => dashIfEmpty(row.salesPerson),
},
{
@@ -153,11 +154,6 @@ const columns = computed(() => [
},
columnClass: 'expand',
},
- {
- align: 'left',
- name: 'refFk',
- label: t('ticketList.ref'),
- },
{
align: 'left',
name: 'zoneFk',
@@ -191,6 +187,12 @@ const columns = computed(() => [
},
format: (row) => toCurrency(row.totalWithVat),
},
+ {
+ align: 'left',
+ name: 'packing',
+ label: t('ticketSale.packaging'),
+ format: (row, dashIfEmpty) => dashIfEmpty(row.packing),
+ },
{
align: 'right',
name: 'tableActions',
@@ -548,7 +550,7 @@ function setReference(data) {
- {{ row.salesPerson }}
+ {{ dashIfEmpty(row.salesPerson) }}
@@ -577,16 +579,16 @@ function setReference(data) {
{{ row.state }}
+
+
+ {{ row.refFk }}
+
+
+
{{ row.state }}
-
-
- {{ dashIfEmpty(row.refFk) }}
-
-
-
{{ dashIfEmpty(row.zoneName) }}