mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
Merge branch 'wsgi' of github.com:webnotes/erpnext into wsgi
This commit is contained in:
@@ -8,6 +8,9 @@ import webnotes
|
||||
|
||||
class TestPeriodClosingVoucher(unittest.TestCase):
|
||||
def test_closing_entry(self):
|
||||
# clear GL Entries
|
||||
webnotes.conn.sql("""delete from `tabGL Entry`""")
|
||||
|
||||
from accounts.doctype.journal_voucher.test_journal_voucher import test_records as jv_records
|
||||
jv = webnotes.bean(copy=jv_records[2])
|
||||
jv.insert()
|
||||
|
||||
@@ -434,7 +434,7 @@ class DocType(BuyingController):
|
||||
def update_raw_material_cost(self):
|
||||
if self.sub_contracted_items:
|
||||
for d in self.doclist.get({"parentfield": "entries"}):
|
||||
rm_cost = webnotes.conn.sql(""" select raw_material_cost / quantity
|
||||
rm_cost = webnotes.conn.sql("""select raw_material_cost / quantity
|
||||
from `tabBOM` where item = %s and is_default = 1 and docstatus = 1
|
||||
and is_active = 1 """, (d.item_code,))
|
||||
rm_cost = rm_cost and flt(rm_cost[0][0]) or 0
|
||||
|
||||
Reference in New Issue
Block a user