From 5c9df315075fb4d8a7ca4ec95fdf2a3934f79c42 Mon Sep 17 00:00:00 2001 From: Firman Ramdhani <33869609+firmanramdhani@users.noreply.github.com> Date: Thu, 1 Oct 2026 14:43:20 +0700 Subject: [PATCH] refactor: use isClosed variable for shouldCountBill condition --- src/app/(app)/my-orders/[id]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(app)/my-orders/[id]/page.tsx b/src/app/(app)/my-orders/[id]/page.tsx index 22451cf..a448643 100644 --- a/src/app/(app)/my-orders/[id]/page.tsx +++ b/src/app/(app)/my-orders/[id]/page.tsx @@ -506,7 +506,7 @@ function SubmissionRow({ useEffect(() => { if (currentBalance !== undefined) { let balanceBeforeThisOrder = currentBalance - const shouldCountBill = sub.bill != null && (sub.order.status === 'CLOSE' || sub.payment_status === 'LUNAS') + const shouldCountBill = sub.bill != null && (isClosed || sub.payment_status === 'LUNAS') if (shouldCountBill) { const diff = (sub.paid_amount || 0) - (sub.bill || 0) balanceBeforeThisOrder -= diff