feat(datamart): total inv migrated over

This commit is contained in:
2025-04-02 21:23:42 -05:00
parent 7e484a0f90
commit b2683d0429
6 changed files with 264 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
import { query } from "../../sqlServer/prodSqlServer.js";
import {
totalInvNoRn,
totalInvRn,
} from "../../sqlServer/querys/dataMart/totalINV.js";
export const getINV = async () => {
let inventory: any = [];
let updatedQuery = totalInvNoRn;
try {
inventory = await query(updatedQuery, "Gets Curruent inv");
return { success: true, message: "Current inv", data: inventory };
} catch (error) {
console.log(error);
return {
success: false,
message: "There was an error getting the inventory",
data: error,
};
}
};