summaryrefslogtreecommitdiff
path: root/src/app/api/stock-opname
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/api/stock-opname')
-rw-r--r--src/app/api/stock-opname/route.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app/api/stock-opname/route.tsx b/src/app/api/stock-opname/route.tsx
index 69caca0..5ecdb89 100644
--- a/src/app/api/stock-opname/route.tsx
+++ b/src/app/api/stock-opname/route.tsx
@@ -177,7 +177,7 @@ const computeIsDifferent = async ({ companyId, productId }: { companyId: number;
anyCountEqWithAllQty: [totalQty["COUNT1"], totalQty["COUNT2"], totalQty["COUNT3"]].includes(allQty),
count1EqWithCount2: totalQty["COUNT1"] !== null && totalQty["COUNT2"] !== null && totalQty["COUNT1"] === totalQty["COUNT2"] && totalQty["COUNT3"] === null,
count1EqWithCount3: totalQty["COUNT1"] !== null && totalQty["COUNT3"] !== null && totalQty["COUNT1"] === totalQty["COUNT3"],
- count2EqWithCount3: totalQty["COUNT2"] !== null && totalQty["COUNT3"] !== null && totalQty["COUNT2"] === totalQty["COUNT3"],
+ count2EqWithCount3: totalQty["COUNT2"] !== 0 && totalQty["COUNT3"] !== 0 && totalQty["COUNT2"] === totalQty["COUNT3"],
};
if (conditional.verificationCheckAll || conditional.anyCountEqWithOnhand || conditional.count1EqWithCount2 || conditional.count1EqWithCount3 || conditional.count2EqWithCount3) {
@@ -194,7 +194,7 @@ const computeIsDifferent = async ({ companyId, productId }: { companyId: number;
anyCountEqWithOnhand: totalQty["COUNT1"] === onhandQty || totalQty["COUNT2"] === onhandQty || totalQty["COUNT3"] === onhandQty,
count1EqWithCount2: totalQty["COUNT3"] === 0 && COUNT1.quantity === COUNT2.quantity,
count1EqWithCount3: COUNT1.quantity === COUNT3.quantity,
- count2EqWithCount3: totalQty["COUNT2"] !== null && totalQty["COUNT3"] !== null && totalQty["COUNT2"] === totalQty["COUNT3"],
+ count2EqWithCount3: totalQty["COUNT2"] !== 0 && totalQty["COUNT3"] !== 0 && totalQty["COUNT2"] === totalQty["COUNT3"],
// count3EqWithCount1_2: (COUNT3.quantity !== COUNT1.quantity) && (COUNT3.quantity !== COUNT2.quantity) && (COUNT1.quantity === COUNT2.quantity) && (COUNT3.quantity !== onhandQty)
};