fix: date in master document for dictionary condition

(cherry picked from commit d96a777edd)

# Conflicts:
#	erpnext/accounts/utils.py
This commit is contained in:
Gursheen Anand
2024-01-10 22:05:02 +05:30
committed by Mergify
parent db3cb5c994
commit 670d61547f

View File

@@ -1222,8 +1222,18 @@ def get_autoname_with_number(number_value, doc_title, company):
def parse_naming_series_variable(doc, variable): def parse_naming_series_variable(doc, variable):
if variable == "FY": if variable == "FY":
<<<<<<< HEAD
date = doc.get("posting_date") or doc.get("transaction_date") or getdate() date = doc.get("posting_date") or doc.get("transaction_date") or getdate()
return get_fiscal_year(date=date, company=doc.get("company"))[0] return get_fiscal_year(date=date, company=doc.get("company"))[0]
=======
if doc:
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)[0]
>>>>>>> d96a777edd (fix: date in master document for dictionary condition)
@frappe.whitelist() @frappe.whitelist()