From 017d0b4ec1f664bec8446259f7b95f4f4879e3e8 Mon Sep 17 00:00:00 2001
From: FIN-IT_AndriFP <andrifebriyadiputra@gmail.com>
Date: Mon, 2 Feb 2026 15:44:09 +0700
Subject: (andri) fix count2 green when count1 & count3 is null

---
 src/app/api/stock-opname/route.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/app/api/stock-opname/route.tsx')

diff --git a/src/app/api/stock-opname/route.tsx b/src/app/api/stock-opname/route.tsx
index e1adb0f..ec943c5 100644
--- a/src/app/api/stock-opname/route.tsx
+++ b/src/app/api/stock-opname/route.tsx
@@ -208,7 +208,8 @@ const computeIsDifferent = async ({ companyId, productId }: { companyId: number;
       verificationCheckAll: _.isNumber(VERIFICATION.quantity),
       anyCountEqWithOnhand: (totalQty["COUNT1"] === onhandQty && zeroCount2 && zeroCount3) || (totalQty["COUNT2"] === onhandQty && zeroCount3 && onhandQty!== 0) || (totalQty["COUNT3"] === onhandQty && onhandQty!== 0),
       count1EqWithCount2: totalQty["COUNT3"] === 0 && count1 === count2,
-      count1EqWithCount3: count1 === count3,
+      // count1EqWithCount3: count1 === count3,
+      count1EqWithCount3: count1 != 0 && count1 === count3,
       count2EqWithCount3: totalQty["COUNT2"] !== 0 && totalQty["COUNT3"] !== 0 && count2 === count3,
       // count3EqWithCount1_2: (COUNT3.quantity !== COUNT1.quantity) &&  (COUNT3.quantity !== COUNT2.quantity) && (COUNT1.quantity === COUNT2.quantity) && (COUNT3.quantity !== onhandQty)
     };
-- 
cgit v1.2.3

