Skip to content

Commit

Permalink
fix: date in master document for dictionary condition
Browse files Browse the repository at this point in the history
  • Loading branch information
GursheenK committed Jan 10, 2024
1 parent f057dc6 commit d96a777
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/accounts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1275,12 +1275,12 @@ def get_autoname_with_number(number_value, doc_title, company):
def parse_naming_series_variable(doc, variable):
if variable == "FY":
if doc:
date = doc.get("posting_date") or doc.get("transaction_date")
date = doc.get("posting_date") or doc.get("transaction_date") or getdate()
company = doc.get("company")
else:
date = getdate()
company = None
return get_fiscal_year(date=date, company=company).name
return get_fiscal_year(date=date, company=company)[0]


@frappe.whitelist()
Expand Down

0 comments on commit d96a777

Please sign in to comment.