diff options
Diffstat (limited to 'src/app')
| -rw-r--r-- | src/app/api/stock-opname/route.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/app/api/stock-opname/route.tsx b/src/app/api/stock-opname/route.tsx index 406981b..3aa9d06 100644 --- a/src/app/api/stock-opname/route.tsx +++ b/src/app/api/stock-opname/route.tsx @@ -183,6 +183,10 @@ const computeIsDifferent = async ({ if (_.isNumber(totalQty['COUNT2']) && _.isNumber(COUNT2.quantity)) totalQty['COUNT2'] += COUNT2.quantity if (_.isNumber(totalQty['COUNT3']) && _.isNumber(COUNT3.quantity)) totalQty['COUNT3'] += COUNT3.quantity if (_.isNumber(totalQty['VERIFICATION']) && _.isNumber(VERIFICATION.quantity)) totalQty['VERIFICATION'] += VERIFICATION.quantity + + if (_.isNumber(COUNT1.quantity) && _.isNumber(COUNT2.quantity) && COUNT1.quantity !== COUNT2.quantity) isDifferent = true + if (_.isNumber(COUNT1.quantity) && _.isNumber(COUNT3.quantity) && COUNT1.quantity !== COUNT3.quantity) isDifferent = true + if (_.isNumber(COUNT2.quantity) && _.isNumber(COUNT3.quantity) && COUNT2.quantity !== COUNT3.quantity) isDifferent = true } const product = await prisma.product.findFirst({ where: { id: productId } }) @@ -206,10 +210,6 @@ const computeIsDifferent = async ({ conditional.count1EqWithCount3 || conditional.count2EqWithCount3 ) - - // if (isCount2Counted && totalQty['COUNT1'] != onhandQty) { - // isDifferent = true - // } } await prisma.product.update({ |
