[fix] [minor] recreate gl entries when using auto inventory accounting to fix bug introduced due to commit - 5dd6b1d082d180133813c1c661d5e72076a19491

This commit is contained in:
Anand Doshi 2013-09-02 17:03:38 +05:30
parent 9bb928f595
commit dc30890b79

View File

@ -32,7 +32,7 @@ def recreate_gl_entries(doctype, name, parentfield):
from `tab%s` child where docstatus=1 and item_code=%s and from `tab%s` child where docstatus=1 and item_code=%s and
ifnull(expense_account, '')!='' and ifnull(cost_center, '')!='' and ifnull(expense_account, '')!='' and ifnull(cost_center, '')!='' and
(select company from `tabAccount` ac where ac.name=child.expense_account)=%s and (select company from `tabAccount` ac where ac.name=child.expense_account)=%s and
(select company from `tabCost Center` cc where cc.name=child.cost_center)=%s and (select company from `tabCost Center` cc where cc.name=child.cost_center)=%s
order by creation desc limit 1""" % (item.doctype, "%s", "%s", "%s"), order by creation desc limit 1""" % (item.doctype, "%s", "%s", "%s"),
(item.item_code, bean.doc.company, bean.doc.company)) (item.item_code, bean.doc.company, bean.doc.company))
if res: if res: