Merge pull request #2145 from nabinhait/hotfix
Minor fixes
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
index a411898..2838afa 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
@@ -24,7 +24,8 @@
`tabJournal Voucher` t1, `tabJournal Voucher Detail` t2
where
t2.parent = t1.name and t2.account = %s
- and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1 %s""" %
+ and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1
+ and ifnull(t1.is_opening, 'No') = 'No' %s""" %
('%s', '%s', '%s', condition), (self.bank_account, self.from_date, self.to_date), as_dict=1)
self.set('entries', [])
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json
index 9edb815..5e63794 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.json
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.json
@@ -1,5 +1,5 @@
{
- "allow_copy": 0,
+ "allow_copy": 0,
"allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:",
@@ -577,7 +577,7 @@
"is_submittable": 1,
"issingle": 0,
"max_attachments": 0,
- "modified": "2014-08-12 05:24:41.892586",
+ "modified": "2014-09-03 11:01:23.159584",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Entry",
@@ -644,7 +644,7 @@
],
"read_only": 0,
"read_only_onload": 0,
- "search_fields": "transfer_date, from_warehouse, to_warehouse, purpose, remarks",
+ "search_fields": "posting_date, from_warehouse, to_warehouse, purpose, remarks",
"sort_field": "modified",
"sort_order": "DESC"
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index e4bab8e..cda88a9 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -243,12 +243,12 @@
d.incoming_rate = incoming_rate
d.amount = flt(d.transfer_qty) * flt(d.incoming_rate)
- raw_material_cost += flt(d.amount)
+ if not d.t_warehouse:
+ raw_material_cost += flt(d.amount)
# set incoming rate for fg item
if self.purpose == "Manufacture/Repack":
- number_of_fg_items = len([t.t_warehouse for t in self.get("mtn_details")])
-
+ number_of_fg_items = len([t.t_warehouse for t in self.get("mtn_details") if t.t_warehouse])
for d in self.get("mtn_details"):
if d.bom_no or (d.t_warehouse and number_of_fg_items == 1):
if not flt(d.incoming_rate) or force: