fix: Budget test cases
This commit is contained in:
parent
da878c43fc
commit
c8cc4bfc56
@ -158,8 +158,11 @@ class TestBudget(unittest.TestCase):
|
||||
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 @@ class TestBudget(unittest.TestCase):
|
||||
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 @@ def set_total_expense_zero(posting_date, budget_against_field=None, budget_again
|
||||
args[budget_against_field] = budget_against
|
||||
|
||||
existing_expense = get_actual_expense(args)
|
||||
print(existing_expense)
|
||||
|
||||
if existing_expense:
|
||||
if budget_against_field == "cost_center":
|
||||
|
Loading…
x
Reference in New Issue
Block a user