From 9aae439b1f773ce634c41fe4d63a57169978b23a Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Wed, 10 Jan 2024 22:05:02 +0530 Subject: [PATCH] fix: date in master document for dictionary condition (cherry picked from commit d96a777edd9cad698b9d9bb90863c1080eacb36f) --- erpnext/accounts/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index af1c3c6d10e..8f899c3e764 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -1263,12 +1263,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()