From 7acb16ceb25841796a57449b71acf02150f52ff5 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Sat, 6 Jul 2024 09:57:43 +0700 Subject: update logic --- .../company/[companyId]/product/[productId]/compute-different/route.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/app/api/company') diff --git a/src/app/api/company/[companyId]/product/[productId]/compute-different/route.tsx b/src/app/api/company/[companyId]/product/[productId]/compute-different/route.tsx index acfb413..57bc5d6 100644 --- a/src/app/api/company/[companyId]/product/[productId]/compute-different/route.tsx +++ b/src/app/api/company/[companyId]/product/[productId]/compute-different/route.tsx @@ -79,7 +79,7 @@ export async function POST(request: NextRequest, { params }: PostParams) { anyCountEqWithOnhand: (totalQty["COUNT1"] === onhandQty && zeroCount2 && zeroCount3) || (totalQty["COUNT2"] === onhandQty && zeroCount3) || totalQty["COUNT3"] === onhandQty, count1EqWithCount2: totalQty["COUNT3"] === 0 && COUNT1.quantity === COUNT2.quantity && totalQty["COUNT1"] !== onhandQty, 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) }; -- cgit v1.2.3