From f077f60344782ead1607d07f3e8b7b864acf43cf Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 22 May 2025 14:03:43 +0530 Subject: [PATCH] refactor(test): utlity method to set cumulative actions --- erpnext/accounts/doctype/budget/test_budget.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/accounts/doctype/budget/test_budget.py b/erpnext/accounts/doctype/budget/test_budget.py index 32fd27e0858..f9349a28793 100644 --- a/erpnext/accounts/doctype/budget/test_budget.py +++ b/erpnext/accounts/doctype/budget/test_budget.py @@ -479,6 +479,15 @@ def make_budget(**args): args.action_if_accumulated_monthly_budget_exceeded_on_po or "Warn" ) + if args.applicable_on_cumulative_expense: + budget.applicable_on_cumulative_expense = 1 + budget.action_if_annual_exceeded_on_cumulative_expense = ( + args.action_if_annual_exceeded_on_cumulative_expense or "Warn" + ) + budget.action_if_accumulated_monthly_exceeded_on_cumulative_expense = ( + args.action_if_accumulated_monthly_exceeded_on_cumulative_expense or "Warn" + ) + budget.insert() budget.submit()