summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app/api/company/[companyId]/product/[productId]/compute-different/route.tsx22
1 files changed, 2 insertions, 20 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 7bf44cf..acfb413 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
@@ -22,9 +22,7 @@ export async function POST(request: NextRequest, { params }: PostParams) {
});
const stockOpnamesFetch = await fetch(`${SELF_HOST}/api/stock-opname/location?${searchParams}`);
- console.log("stockOpnamesFetch", stockOpnamesFetch);
const stockOpnames: StockOpnameLocationRes[] = await stockOpnamesFetch.json();
- console.log("stockOpnames", stockOpnames);
let isDifferent: boolean = false;
let verificationCounter: number = 0;
@@ -67,14 +65,6 @@ export async function POST(request: NextRequest, { params }: PostParams) {
count2EqWithCount3: totalQty["COUNT2"] !== 0 && totalQty["COUNT3"] !== 0 && totalQty["COUNT2"] === totalQty["COUNT3"],
};
- // isDifferent = !(
- // conditional.verificationCheckAll ||
- // conditional.anyCountEqWithOnhand ||
- // conditional.anyCountEqWithAllQty ||
- // conditional.count1EqWithCount2 ||
- // conditional.count1EqWithCount3 ||
- // conditional.count2EqWithCount3
- // );
if (conditional.verificationCheckAll || conditional.anyCountEqWithOnhand || conditional.count1EqWithCount2 || conditional.count1EqWithCount3 || conditional.count2EqWithCount3) {
isDifferent = false;
} else {
@@ -99,17 +89,9 @@ export async function POST(request: NextRequest, { params }: PostParams) {
isDifferent = true;
break;
}
- console.log("----------------------------------BATAS SUCI ATAS RECOMPUTE------------------------------");
- console.log("opname:", opname);
- console.log("Is Different2222:", isDifferent);
- console.log("Conditions:", detailCondition);
+
}
- console.log("Total Quantity:", totalQty);
- console.log("Onhand Quantity:", onhandQty);
- console.log("Difference Quantity:", differenceQty);
- console.log("Conditions:", conditional);
- console.log("Is Different:", isDifferent);
- console.log("----------------------------------BATAS SUCI BAWAH RECOMPUTE------------------------------");
+
const payload = {
where: { id: product.id },