test(reporting): more reporting tables for different reports
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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 };
|
||||
};
|
||||
Reference in New Issue
Block a user