Dear
I need a option to make a query report. I can write a multi queries.
select `tabItem`.barcode as "Bar Code",
`tabItem`.item_code as "Item Code",
`tabItem`.item_name as "Item Name",
`tabItem`.item_group as "Group",
`tabItem`.brand as "Brand",
(select sum(`tabPurchase Receipt Item`.qty)
from `tabPurchase Receipt Item`
where `tabPurchase Receipt Item`.item_code=`tabItem`.item_code
and `tabPurchase Receipt Item`.warehouse='DIP Warehouse'
) as "GRN Qty",
(select sum(`tabStock Entry Detail`.qty)
from `tabStock Entry`,`tabStock Entry Detail`
where `tabStock Entry`.name=`tabStock Entry Detail`.parent
and `tabStock Entry Detail`.item_code=`tabItem` .item_code
and `tabStock Entry`.purpose='Material Transfer'
and `tabStock Entry`.docstatus='1'
and `tabStock Entry`.from_warehouse='DIP Warehouse'
group by `tabStock Entry Detail`.item_code
) as "Transfer To Van",
(select sum(`tabStock Entry Detail`.qty)
from `tabStock Entry`,`tabStock Entry Detail`
where `tabStock Entry`.name=`tabStock Entry Detail`.parent
and `tabStock Entry Detail`.item_code=`tabItem` .item_code
and `tabStock Entry`.purpose in ('Material Receipt','Material Transfer')
and `tabStock Entry`.docstatus='1'
and `tabStock Entry`.to_warehouse='DIP Warehouse'
group by `tabStock Entry Detail`.item_code
) as "Return from Van",
(select sum(`tabStock Entry Detail`.qty)
from `tabStock Entry`,`tabStock Entry Detail`
where `tabStock Entry`.name=`tabStock Entry Detail`.parent
and `tabStock Entry Detail`.item_code=`tabItem` .item_code
and `tabStock Entry`.purpose='Material Issue'
and `tabStock Entry`.docstatus='1'
and `tabStock Entry`.from_warehouse='DIP Warehouse'
group by `tabStock Entry Detail`.item_code
) as "Stock Issue",
(select sum(`tabStock Entry Detail`.qty)
from `tabStock Entry`,`tabStock Entry Detail`
where `tabStock Entry`.name=`tabStock Entry Detail`.parent
and `tabStock Entry Detail`.item_code=`tabItem` .item_code
and `tabStock Entry`.purpose='Sales Return'
and `tabStock Entry`.docstatus='1'
and `tabStock Entry`.to_warehouse='DIP Warehouse'
group by `tabStock Entry Detail`.item_code
) as "Sales Return"
from `tabItem`
where `tabItem`.is_sales_item='Yes'
order by `tabItem`.item_code