Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Akhilesh Darjee
2013-09-19 11:31:43 +05:30
8 changed files with 464 additions and 61 deletions

View File

@@ -75,8 +75,8 @@ class DocType(DocListController):
bin_list = webnotes.conn.sql("select * from tabBin where item_code=%s",
self.doc.item_code, as_dict=1)
for bin in bin_list:
if bin.reserved_qty > 0 or bin.ordered_qty > 0 or bin.indented_qty > 0 \
or bin.planned_qty > 0 and cstr(bin.stock_uom) != cstr(self.doc.stock_uom):
if (bin.reserved_qty > 0 or bin.ordered_qty > 0 or bin.indented_qty > 0 \
or bin.planned_qty > 0) and cstr(bin.stock_uom) != cstr(self.doc.stock_uom):
matched = False
break

View File

@@ -886,7 +886,8 @@ def make_return_jv(stock_entry):
"account": r.get("account"),
"against_invoice": r.get("against_invoice"),
"against_voucher": r.get("against_voucher"),
"balance": get_balance_on(r.get("account"), se.doc.posting_date)
"balance": get_balance_on(r.get("account"), se.doc.posting_date) \
if r.get("account") else 0
})
return jv_list