minor fix in patch

This commit is contained in:
Nabin Hait 2014-03-23 17:35:24 +05:30
parent 96c0afe0f1
commit 221a8fff1c

View File

@ -12,12 +12,15 @@ def execute():
where account_type='Bank or Cash' and account_name in ('Cash', 'Cash In Hand')""")
ac_types = {"Fixed Asset Account": "Fixed Asset", "Bank or Cash": "Bank"}
for old, new in ac_types.items:
for old, new in ac_types.items():
frappe.db.sql("""update tabAccount set account_type=%s
where account_type=%s""", (new, old))
frappe.db.sql("""update `tabAccount` set report_type =
if(is_pl_account=='Yes', 'Profit and Loss', 'Balance Sheet')""")
try:
frappe.db.sql("""update `tabAccount` set report_type =
if(is_pl_account='Yes', 'Profit and Loss', 'Balance Sheet')""")
frappe.db.sql("""update `tabAccount` set balance_must_be=debit_or_credit
where ifnull(allow_negative_balance, 0) = 0""")
frappe.db.sql("""update `tabAccount` set balance_must_be=debit_or_credit
where ifnull(allow_negative_balance, 0) = 0""")
except:
pass