[enhance] close purchase order

This commit is contained in:
Saurabh
2015-10-19 15:16:17 +05:30
parent c6dbe70256
commit 98b287565a
6 changed files with 36 additions and 19 deletions

View File

@@ -122,7 +122,7 @@ def get_ordered_qty(item_code, warehouse):
from `tabPurchase Order Item` po_item, `tabPurchase Order` po
where po_item.item_code=%s and po_item.warehouse=%s
and po_item.qty > ifnull(po_item.received_qty, 0) and po_item.parent=po.name
and po.status!='Stopped' and po.docstatus=1""", (item_code, warehouse))
and po.status not in ('Stopped', 'Closed') and po.docstatus=1""", (item_code, warehouse))
return flt(ordered_qty[0][0]) if ordered_qty else 0