mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
Patch to update old accounts property
This commit is contained in:
@@ -11,10 +11,8 @@ def execute():
|
|||||||
frappe.db.sql("""update tabAccount set account_type='Fixed Asset'
|
frappe.db.sql("""update tabAccount set account_type='Fixed Asset'
|
||||||
where account_type='Fixed Asset Account'""")
|
where account_type='Fixed Asset Account'""")
|
||||||
|
|
||||||
for d in (('Asset', 'Debit', 'No'), ('Liability', 'Credit', 'No'), ('Expense', 'Debit', 'Yes'),
|
frappe.db.sql("""update `tabAccount` set report_type =
|
||||||
('Income', 'Credit', 'Yes')):
|
if(is_pl_account=='Yes', 'Profit and Loss', 'Balance Sheet')""")
|
||||||
frappe.db.sql("""update `tabAccount` set root_type = %s
|
|
||||||
where debit_or_credit=%s and is_pl_account=%s""", d)
|
|
||||||
|
|
||||||
frappe.db.sql("""update `tabAccount` set balance_must_be=debit_or_credit
|
frappe.db.sql("""update `tabAccount` set balance_must_be=debit_or_credit
|
||||||
where ifnull(allow_negative_balance, 0) = 0""")
|
where ifnull(allow_negative_balance, 0) = 0""")
|
||||||
Reference in New Issue
Block a user