summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-12-09 12:50:39 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-12-09 12:50:39 +0700
commit790e36ebb2e4a669f7c95f431cfaadf9b18654a3 (patch)
tree14803d92ccd950cb4c57f02e2b65dfd6f42056ee /src
parent828e0b2301bfe7ff95b776dacf5f844dd10756d0 (diff)
Fix compute different product stock opname
Diffstat (limited to 'src')
-rw-r--r--src/app/api/company/[companyId]/product/[productId]/compute-different/route.tsx6
-rw-r--r--src/app/api/stock-opname/route.tsx6
2 files changed, 6 insertions, 6 deletions
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 33cd55d..ff9cd74 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
@@ -73,9 +73,9 @@ export async function POST(request: NextRequest, { params }: PostParams) {
const detailCondition = {
verificationCheckAll: _.isNumber(VERIFICATION.quantity),
- count1EqWithCount2: COUNT1.quantity !== null && COUNT2.quantity !== null && COUNT1.quantity === COUNT2.quantity,
- count1EqWithCount3: COUNT1.quantity !== null && COUNT3.quantity !== null && COUNT1.quantity === COUNT3.quantity,
- count2EqWithCount3: COUNT2.quantity !== null && COUNT3.quantity !== null && COUNT2.quantity === COUNT3.quantity,
+ count1EqWithCount2: COUNT1.quantity === COUNT2.quantity,
+ count1EqWithCount3: COUNT1.quantity === COUNT3.quantity,
+ count2EqWithCount3: COUNT2.quantity === COUNT3.quantity,
}
isDifferent = !(
diff --git a/src/app/api/stock-opname/route.tsx b/src/app/api/stock-opname/route.tsx
index 38284bf..154ed14 100644
--- a/src/app/api/stock-opname/route.tsx
+++ b/src/app/api/stock-opname/route.tsx
@@ -202,9 +202,9 @@ const computeIsDifferent = async ({
const detailCondition = {
verificationCheckAll: _.isNumber(VERIFICATION.quantity),
- count1EqWithCount2: COUNT1.quantity !== null && COUNT2.quantity !== null && COUNT1.quantity === COUNT2.quantity,
- count1EqWithCount3: COUNT1.quantity !== null && COUNT3.quantity !== null && COUNT1.quantity === COUNT3.quantity,
- count2EqWithCount3: COUNT2.quantity !== null && COUNT3.quantity !== null && COUNT2.quantity === COUNT3.quantity,
+ count1EqWithCount2: COUNT1.quantity === COUNT2.quantity,
+ count1EqWithCount3: COUNT1.quantity === COUNT3.quantity,
+ count2EqWithCount3: COUNT2.quantity === COUNT3.quantity,
}
isDifferent = !(