fix: Budget test cases
diff --git a/erpnext/accounts/doctype/budget/test_budget.py b/erpnext/accounts/doctype/budget/test_budget.py
index 61c48c7..f00ffd9 100644
--- a/erpnext/accounts/doctype/budget/test_budget.py
+++ b/erpnext/accounts/doctype/budget/test_budget.py
@@ -158,8 +158,11 @@
set_total_expense_zero(nowdate(), "cost_center")
budget = make_budget(budget_against="Cost Center")
+ month = now_datetime().month
+ if month > 10:
+ month = 10
- for i in range(now_datetime().month):
+ for i in range(month):
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 20000, "_Test Cost Center - _TC", posting_date=nowdate(), submit=True)
@@ -177,8 +180,11 @@
set_total_expense_zero(nowdate(), "project")
budget = make_budget(budget_against="Project")
+ month = now_datetime().month
+ if month > 10:
+ month = 10
- for i in range(now_datetime().month):
+ for i in range(month):
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 20000, "_Test Cost Center - _TC", posting_date=nowdate(), submit=True, project="_Test Project")
@@ -253,6 +259,7 @@
args[budget_against_field] = budget_against
existing_expense = get_actual_expense(args)
+ print(existing_expense)
if existing_expense:
if budget_against_field == "cost_center":