Skip to content

Instantly share code, notes, and snippets.

Last active December 10, 2015 23:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
select as "SO No:Link/Sales Order:100",
so.transaction_date as "SO Date::80",
so_item.item_code as "Item Code:Link/Item:160",
so_item.description as "Description::300",
(so_item.qty - ifnull(so_item.delivered_qty, 0)) as "PEND QTY:Decimal:70",
so_item.reserved_warehouse as "WH::80",
bin.actual_qty as "ACT:Decimal:40",
bin.reserved_qty as "RSVD:Decimal:40",
so.customer as "Customer:Link/Customer:150"
`tabSales Order` so,
`tabSales Order Item` so_item
left join `tabBin` bin on (bin.item_code=so_item.item_code
and bin.warehouse=so_item.reserved_warehouse)
so_item.parent =
and so.docstatus = 1
and so.status != "Stopped"
and so.transaction_date <= curdate()
and so_item.item_code not in (
"CSP000000-000", "HSP000000-000", "JHKG-01", "JHNO-0075-01", "JCNO-01")
and bin.actual_qty > 0
and ifnull(so_item.delivered_qty,0) < ifnull(so_item.qty,0)
order by so.transaction_date asc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment