From 266657fab5bd31f330b4a18bfbbf66dc238bf5a5 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Tue, 25 Jun 2024 08:35:11 -0300 Subject: [PATCH] Fix total difference --- src/pages/Ticket/Card/BasicData/BasicDataTable.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pages/Ticket/Card/BasicData/BasicDataTable.vue b/src/pages/Ticket/Card/BasicData/BasicDataTable.vue index ef7d10a46..6faf7c9e5 100644 --- a/src/pages/Ticket/Card/BasicData/BasicDataTable.vue +++ b/src/pages/Ticket/Card/BasicData/BasicDataTable.vue @@ -106,10 +106,7 @@ const totalNewPrice = computed(() => { }); const totalDifference = computed(() => { - return rows.value.reduce( - (acc, item) => acc + item.component.difference * item.quantity, - 0 - ); + return rows.value.reduce((acc, item) => acc + item.component?.difference || 0, 0); }); const ticketHaveNegatives = () => {