Stock report issue

Please try it. Use the Bin doctype for get the stock qty.

SELECT 
    a.item_code AS "Item:Link/Item:120",
    a.item_name AS "Item Name::150",
    a.item_group AS "Item Group:Link/Item Group:120",
    a.description AS "Description::150",
    b.warehouse AS "Warehouse:Link/Warehouse:120",
    b.actual_qty AS "Balance Qty:Float:140",
    w.company AS "Company:Link/Company:120"

FROM 
    `tabItem` a

LEFT JOIN `tabBin` b ON a.item_code = b.item_code
LEFT JOIN `tabWarehouse` w ON b.warehouse = w.name

WHERE
    w.company = %(company)s

Output:

(Only available in v14 or v13)

3 Likes