Monitoring COGS From Brewhouse to Finished Goods
Created by: Zach Hill
Query Name: COGS Monitor
Summary: Monitor the price of an item(s) as it moves through production
Business case: When unit costs deviate for an item(s) it can become a huge problem. If those errors are not immediately fixed your inventory numbers will be grossly inflated and calculating profitability will be way off. This query can help you find those errors quickly so you can fix them before other processes push bad data through your db. Don't let a COGS error become a bookkeeping travesty. Cheers!
WHEN T2.[AvgPrice] = 0
END AS 'Δ in %'
, (T2.[AvgPrice]-T0.[Price]) AS 'Δ in $'
FROM IGN1 T0
INNER JOIN OITM T1 ON T0.[ItemCode] = T1.[ItemCode]
INNER JOIN OITW T2 ON T1.[ItemCode] = T2.[ItemCode]
WHERE T2.[WhsCode] = T0.[WhsCode]
T0.[DocDate] = [%1]