From b58ed78929ee01004aba9be292cf2c537347aaf3 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Thu, 24 Oct 2024 11:38:41 +0700 Subject: [PATCH] fix(05): total padi remain display condition --- src/pages/05_quotation/ReceiptDialog.vue | 41 +++++------------------- 1 file changed, 8 insertions(+), 33 deletions(-) diff --git a/src/pages/05_quotation/ReceiptDialog.vue b/src/pages/05_quotation/ReceiptDialog.vue index 802a5b63..a67ceba4 100644 --- a/src/pages/05_quotation/ReceiptDialog.vue +++ b/src/pages/05_quotation/ReceiptDialog.vue @@ -448,22 +448,14 @@ watch( {{ $t('quotation.receiptDialog.remain') }} {{ - data.payCondition === 'BillSplit' || - data.payCondition === 'Split' - ? formatNumberDecimal( - paymentData.reduce( - (c, i) => - i.paymentStatus !== 'PaymentSuccess' - ? c + i.amount - : c, - 0, - ), - 2, - ) - : data.quotationStatus === 'PaymentPending' - ? paymentData[0]?.amount && - formatNumberDecimal(paymentData[0]?.amount, 2) - : '0.00' + formatNumberDecimal( + paymentData.reduce( + (c, i) => + i.paymentStatus !== 'PaymentSuccess' ? c + i.amount : c, + 0, + ), + 2, + ) }} @@ -516,23 +508,6 @@ watch( }} -