mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-21 07:38:29 +00:00
Merge pull request #49302 from aerele/fix/budget-warning
fix(budget): fiscal year assignment and approver role in budget
This commit is contained in:
@@ -145,8 +145,10 @@ def validate_expense_against_budget(args, expense_amount=0):
|
||||
if not frappe.db.count("Budget", cache=True):
|
||||
return
|
||||
|
||||
if args.get("company") and not args.fiscal_year:
|
||||
if not args.fiscal_year:
|
||||
args.fiscal_year = get_fiscal_year(args.get("posting_date"), company=args.get("company"))[0]
|
||||
|
||||
if args.get("company"):
|
||||
frappe.flags.exception_approver_role = frappe.get_cached_value(
|
||||
"Company", args.get("company"), "exception_budget_approver_role"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user