diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2026-02-10 21:01:05 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2026-02-10 21:01:05 +0700 |
| commit | eef5f526c90a472e567d94b2e88ef9b051c79210 (patch) | |
| tree | 6cdbe11b0d36a3cbb88c6b6ea851d5b35f8fd798 | |
| parent | 017d0b4ec1f664bec8446259f7b95f4f4879e3e8 (diff) | |
<MIqdad> try fix 1 0 0 0
| -rw-r--r-- | src/app/api/stock-opname/route.tsx | 4 |
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 ec943c5..8e09351 100644 --- a/src/app/api/stock-opname/route.tsx +++ b/src/app/api/stock-opname/route.tsx @@ -181,7 +181,7 @@ const computeIsDifferent = async ({ companyId, productId }: { companyId: number; // Jika tidak ada qty verifikasi, cek kondisi tim 1/2/3 const conditional = { // anyCountEqWithOnhand: [totalQty['COUNT1'], totalQty['COUNT2'], totalQty['COUNT3']].includes(onhandQty), - anyCountEqWithOnhand: (totalQty["COUNT1"] === onhandQty && zeroCount2 && zeroCount3) || (totalQty["COUNT2"] === onhandQty && zeroCount3 && onhandQty!== 0) || (totalQty["COUNT3"] === onhandQty && onhandQty!== 0), + anyCountEqWithOnhand: (totalQty["COUNT1"] === onhandQty && zeroCount2 && zeroCount3) || (totalQty["COUNT2"] === onhandQty && zeroCount3) || (totalQty["COUNT3"] === onhandQty), 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"], @@ -206,7 +206,7 @@ const computeIsDifferent = async ({ companyId, productId }: { companyId: number; const detailCondition = { verificationCheckAll: _.isNumber(VERIFICATION.quantity), - anyCountEqWithOnhand: (totalQty["COUNT1"] === onhandQty && zeroCount2 && zeroCount3) || (totalQty["COUNT2"] === onhandQty && zeroCount3 && onhandQty!== 0) || (totalQty["COUNT3"] === onhandQty && onhandQty!== 0), + anyCountEqWithOnhand: (totalQty["COUNT1"] === onhandQty && zeroCount2 && zeroCount3) || (totalQty["COUNT2"] === onhandQty && zeroCount3) || (totalQty["COUNT3"] === onhandQty), count1EqWithCount2: totalQty["COUNT3"] === 0 && count1 === count2, // count1EqWithCount3: count1 === count3, count1EqWithCount3: count1 != 0 && count1 === count3, |
