fix: Naming Series preview when no previous transaction present
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 9102e0a..80e54cb 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -1118,7 +1118,7 @@
 		else:
 			date = getdate()
 			company = None
-		return get_fiscal_year(date=date, company=doc.get("company"))[0]
+		return get_fiscal_year(date=date, company=company)[0]
 
 
 @frappe.whitelist()