diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index ad20c8ae2e7..e4f659b48be 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -98,7 +98,7 @@ "payment_request_settings", "create_pr_in_draft_status", "budget_settings", - "use_new_budget_controller" + "use_legacy_budget_controller" ], "fields": [ { @@ -598,12 +598,6 @@ "fieldtype": "Tab Break", "label": "Budget" }, - { - "default": "1", - "fieldname": "use_new_budget_controller", - "fieldtype": "Check", - "label": "Use New Budget Controller" - }, { "default": "1", "description": "If enabled, user will be alerted before resetting posting date to current date in relevant transactions", @@ -651,6 +645,12 @@ "fieldname": "fetch_valuation_rate_for_internal_transaction", "fieldtype": "Check", "label": "Fetch Valuation Rate for Internal Transaction" + }, + { + "default": "0", + "fieldname": "use_legacy_budget_controller", + "fieldtype": "Check", + "label": "Use Legacy Budget Controller" } ], "grid_page_length": 50, @@ -659,7 +659,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-07-18 13:56:47.192437", + "modified": "2025-09-24 16:08:08.515254", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts Settings", diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index f7c5dfa396f..420e2fa3870 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -74,7 +74,7 @@ class AccountsSettings(Document): submit_journal_entries: DF.Check unlink_advance_payment_on_cancelation_of_order: DF.Check unlink_payment_on_cancellation_of_invoice: DF.Check - use_new_budget_controller: DF.Check + use_legacy_budget_controller: DF.Check # end: auto-generated types def validate(self): diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 1a5789d6f93..6d9de1bf382 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -35,7 +35,7 @@ def make_gl_entries( ): if gl_map: if ( - frappe.get_single_value("Accounts Settings", "use_new_budget_controller") + not cint(frappe.get_single_value("Accounts Settings", "use_legacy_budget_controller")) and gl_map[0].voucher_type != "Period Closing Voucher" ): bud_val = BudgetValidation(gl_map=gl_map) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 1eda382eab2..16cc900be2b 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -875,7 +875,7 @@ class BuyingController(SubcontractingController): self.update_fixed_asset(field, delete_asset=True) def validate_budget(self): - if frappe.get_single_value("Accounts Settings", "use_new_budget_controller"): + if not frappe.get_single_value("Accounts Settings", "use_legacy_budget_controller"): from erpnext.controllers.budget_controller import BudgetValidation val = BudgetValidation(doc=self)