[purchase order] tests pass

This commit is contained in:
Rushabh Mehta
2013-07-08 12:37:59 +05:30
parent 886c9ef5d1
commit 436467a5c9
5 changed files with 17 additions and 5 deletions

View File

@@ -68,6 +68,12 @@ class DocType(BuyingController):
msgprint("Rejected Warehouse is necessary if there are rejections.")
raise Exception
if not flt(d.qty) and flt(d.rejected_qty):
d.qty = flt(d.received_qty) - flt(d.rejected_qty)
elif not flt(d.rejected_qty):
d.rejected_qty = flt(d.received_qty) - flt(d.qty)
# Check Received Qty = Accepted Qty + Rejected Qty
if ((flt(d.qty) + flt(d.rejected_qty)) != flt(d.received_qty)):