I want to get the stock balance in all UOMs. I created the following query report, but it is not working. Can anyone help?
SELECT
a.item_code AS “Item:Link/Item:120”,
a.item_name AS “Item Name::150”,
b.actual_qty AS “Balance Qty (Base UOM):Float:140”, – Balance in base UOM
COALESCE(p_std.price_list_rate, 0) AS “Standard Selling Price:Currency:180”, – Standard Selling Price
(COALESCE(p_std.price_list_rate, 0) * b.actual_qty) AS “Total Value (Base UOM):Currency:140”, – Total value in base UOM
-- Balance in Other UOMs (converted)
COALESCE(uc.conversion_factor, 0) * b.actual_qty AS "Balance Qty (Other UOM):Float:140", -- Balance in Other UOM
-- UOM being converted to
uc.uom AS "Converted UOM::150"
FROM
tabItem
a
LEFT JOIN
tabBin
b ON a.item_code = b.item_code
LEFT JOIN
tabWarehouse
w ON b.warehouse = w.name
LEFT JOIN
tabItem Price
p_std ON a.item_code = p_std.item_code AND p_std.price_list = ‘Standard Selling’
LEFT JOIN
tabUOM Conversion
uc ON a.item_code = uc.item_code – Join UOM conversion to get other UOMs
WHERE
b.actual_qty > 0 – Only show items with stock (you can modify this as per your needs)