[minor] fixes in stock balance report, bin uom and sle is_cancelled

This commit is contained in:
Nabin Hait
2013-10-02 16:29:45 +05:30
parent a37ff498fe
commit a1d1c980bc
7 changed files with 24 additions and 6 deletions

View File

@@ -16,7 +16,7 @@ class DocType:
self.doclist = doclist
def validate(self):
if not self.doc.stock_uom:
if self.doc.fields.get("__islocal") or not self.doc.stock_uom:
self.doc.stock_uom = webnotes.conn.get_value('Item', self.doc.item_code, 'stock_uom')
self.validate_mandatory()

View File

@@ -246,6 +246,7 @@ class DocType(StockController):
"stock_uom": webnotes.conn.get_value("Item", row.item_code, "stock_uom"),
"voucher_detail_no": row.voucher_detail_no,
"fiscal_year": self.doc.fiscal_year,
"is_cancelled": "No"
})
args.update(opts)
self.make_sl_entries([args])

View File

@@ -126,10 +126,11 @@ erpnext.StockBalance = erpnext.StockAnalytics.extend({
} else {
item.inflow_value += value_diff;
}
}
item.closing_qty += qty_diff;
item.closing_value += value_diff;
item.closing_qty += qty_diff;
item.closing_value += value_diff;
}
} else {
break;
}