test(reporting): more reporting tables for different reports

This commit is contained in:
2025-04-13 08:27:28 -05:00
parent 17b6c0ac66
commit 9325e58551
17 changed files with 434 additions and 122 deletions

View File

@@ -14,13 +14,23 @@ export const lanes: any = [];
export const getLanesToCycleCount = async () => {
const currentTime: any = timeZoneFix();
// store the lanes in memeory
createLog("info", "warehouse", "logistics", "Empty lane triggered update.");
createLog("info", "warehouse", "logistics", "Lane triggered update.");
lastCheck = currentTime;
const ageQuery = cycleCountCheck.replaceAll("[ageOfRow]", `1000`);
const { data: prodLanes, error: pl } = await tryCatch(
query(ageQuery, "Get Stock lane date.")
);
if (pl) {
createLog(
"error",
"warehouse",
"logistics",
`There was an error getting lanes: ${pl}`
);
return;
}
// run the update on the lanes
for (let i = 0; i < prodLanes.length; i++) {
const createLane = {

View File

@@ -0,0 +1,13 @@
import { tryCatch } from "../../../../../globalUtils/tryCatch.js";
import { query } from "../../../../sqlServer/prodSqlServer.js";
import { ppooQuery } from "../../../../sqlServer/querys/warehouse/ppooQuery.js";
export const getPPOO = async () => {
const { data, error } = await tryCatch(query(ppooQuery, "Get PPOO"));
if (error) {
return { success: false, message: "Error getting ppoo", data: error };
}
return { success: true, message: "Current pallets in PPOO.", data: data };
};