Query Report - Stock Balance

We have add the following stock report but it show the Quantity is more than what shows available on the warehouse

we need the qty exactly what is available on the warehouse

SELECT
sle.item_code,
item.item_name,
sle.warehouse,
SUM(CASE WHEN sle.actual_qty > 0 THEN sle.actual_qty ELSE 0 END) - SUM(CASE WHEN sle.actual_qty < 0 THEN sle.actual_qty ELSE 0 END) AS available_qty
FROM
tabStock Ledger Entry as sle
JOIN
tabItem as item ON sle.item_code = item.name
WHERE
sle.actual_qty > 0
AND sle.company = %(company)s
GROUP BY
sle.item_code, item.item_name, sle.warehouse;

Hi @Rajkumudu_Rk,

The system offers a standard feature to view the current stock balance of items through a Query Report. Kindly review this functionality and proceed to generate a new report. Simply replicate the existing query and customize it to suit your specific requirements.

I hope this helps.

Thank You!