fix(demo): Default accounts for demo company

This commit is contained in:
Deepesh Garg
2023-08-24 17:58:51 +05:30
parent 6349b67df4
commit 5f75aea6fa
3 changed files with 18 additions and 5 deletions

View File

@@ -539,6 +539,10 @@ def get_round_off_account_and_cost_center(
"Company", company, ["round_off_account", "round_off_cost_center"]
) or [None, None]
# Use expense account as fallback
if not round_off_account:
round_off_account = frappe.get_cached_value("Company", company, "default_expense_account")
meta = frappe.get_meta(voucher_type)
# Give first preference to parent cost center for round off GLE