[Fixes] Drop Shipping

This commit is contained in:
Saurabh
2015-10-19 14:17:52 +05:30
parent 556536615e
commit c6dbe70256
12 changed files with 337 additions and 95 deletions

View File

@@ -90,7 +90,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 != 'Stopped')
where name = dnpi_in.parent and docstatus = 1 and status not in ('Stopped','Closed'))
) dnpi)
union
(select qty as dnpi_qty, qty as so_item_qty,
@@ -99,7 +99,7 @@ def get_reserved_qty(item_code, warehouse):
where item_code = %s and warehouse = %s
and exists(select * from `tabSales Order` so
where so.name = so_item.parent and so.docstatus = 1
and so.status != 'Stopped'))
and so.status not in ('Stopped','Closed')))
) tab
where
so_item_qty >= so_item_delivered_qty