patch to delete mis control and financial statements and set bank/cash account
This commit is contained in:
parent
19dadb4a82
commit
155c96b410
@ -161,11 +161,6 @@ data = [
|
|||||||
"label": _("Trial Balance"),
|
"label": _("Trial Balance"),
|
||||||
"icon": "icon-table"
|
"icon": "icon-table"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "page",
|
|
||||||
"name":"Financial Statements",
|
|
||||||
"icon": "icon-table"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "report",
|
"type": "report",
|
||||||
"name": "Accounts Receivable",
|
"name": "Accounts Receivable",
|
||||||
|
@ -30,3 +30,5 @@ erpnext.patches.4_0.split_email_settings
|
|||||||
erpnext.patches.4_0.fix_employee_user_id
|
erpnext.patches.4_0.fix_employee_user_id
|
||||||
erpnext.patches.4_0.import_country_codes
|
erpnext.patches.4_0.import_country_codes
|
||||||
execute:patches.4_0.countrywise_coa
|
execute:patches.4_0.countrywise_coa
|
||||||
|
execute:frappe.delete_doc("DocType", "MIS Control")
|
||||||
|
execute:frappe.delete_doc("Page", "Financial Statements")
|
||||||
|
@ -8,8 +8,13 @@ def execute():
|
|||||||
frappe.reload_doc("setup", 'doctype', "company")
|
frappe.reload_doc("setup", 'doctype', "company")
|
||||||
frappe.reload_doc("accounts", 'doctype', "account")
|
frappe.reload_doc("accounts", 'doctype', "account")
|
||||||
|
|
||||||
frappe.db.sql("""update tabAccount set account_type='Fixed Asset'
|
frappe.db.sql("""update tabAccount set account_type='Cash'
|
||||||
where account_type='Fixed Asset Account'""")
|
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:
|
||||||
|
frappe.db.sql("""update tabAccount set account_type=%s
|
||||||
|
where account_type=%s""", (new, old))
|
||||||
|
|
||||||
frappe.db.sql("""update `tabAccount` set report_type =
|
frappe.db.sql("""update `tabAccount` set report_type =
|
||||||
if(is_pl_account=='Yes', 'Profit and Loss', 'Balance Sheet')""")
|
if(is_pl_account=='Yes', 'Profit and Loss', 'Balance Sheet')""")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user