mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-24 13:42:10 +01:00
fix: date in master document for dictionary condition
(cherry picked from commit d96a777edd)
This commit is contained in:
@@ -1263,12 +1263,12 @@ 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":
|
||||||
if doc:
|
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")
|
company = doc.get("company")
|
||||||
else:
|
else:
|
||||||
date = getdate()
|
date = getdate()
|
||||||
company = None
|
company = None
|
||||||
return get_fiscal_year(date=date, company=company).name
|
return get_fiscal_year(date=date, company=company)[0]
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
|
|||||||
Reference in New Issue
Block a user