This commit is contained in:
patilsangram
2016-02-23 19:04:29 +05:30
parent bf2b511988
commit a812d67837
5 changed files with 8 additions and 8 deletions

View File

@@ -92,7 +92,7 @@ def get_reserved_qty(item_code, warehouse):
and parenttype="Sales Order"
and item_code != parent_item
and exists (select * from `tabSales Order` so
where name = dnpi_in.parent and docstatus = 1 and status not in ('Closed'))
where name = dnpi_in.parent and docstatus = 1 and status != 'Closed')
) dnpi)
union
(select qty as dnpi_qty, qty as so_item_qty,
@@ -102,7 +102,7 @@ def get_reserved_qty(item_code, warehouse):
and (so_item.delivered_by_supplier is null or so_item.delivered_by_supplier = 0)
and exists(select * from `tabSales Order` so
where so.name = so_item.parent and so.docstatus = 1
and so.status not in ('Closed')))
and so.status != 'Closed'))
) tab
where
so_item_qty >= so_item_delivered_qty