diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py index befc9189016..38f3a91c8fe 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py @@ -89,30 +89,6 @@ class FiscalYear(Document): ) -<<<<<<< HEAD -@frappe.whitelist() -<<<<<<< HEAD -def check_duplicate_fiscal_year(doc): - year_start_end_dates = frappe.db.sql( - """select name, year_start_date, year_end_date from `tabFiscal Year` where name!=%s""", - (doc.name), - ) - for fiscal_year, ysd, yed in year_start_end_dates: - if (getdate(doc.year_start_date) == ysd and getdate(doc.year_end_date) == yed) and ( - not frappe.flags.in_test - ): - frappe.throw( - _( - "Fiscal Year Start Date and Fiscal Year End Date are already set in Fiscal Year {0}" - ).format(fiscal_year) - ) - - -@frappe.whitelist() -======= ->>>>>>> 74ac28fc70 (refactor: `Fiscal Year` DocType cleanup) -======= ->>>>>>> 4c76786ce4 (fix(`fiscal_year`): `Fiscal Year` auto-generation and notification) def auto_create_fiscal_year(): fy = frappe.qb.DocType("Fiscal Year") diff --git a/erpnext/accounts/doctype/fiscal_year_company/fiscal_year_company.json b/erpnext/accounts/doctype/fiscal_year_company/fiscal_year_company.json index 4dc16a782bc..d1f1ecc0a09 100644 --- a/erpnext/accounts/doctype/fiscal_year_company/fiscal_year_company.json +++ b/erpnext/accounts/doctype/fiscal_year_company/fiscal_year_company.json @@ -22,22 +22,13 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2021-09-28 18:01:53.495929", -======= "modified": "2026-02-20 23:02:26.193606", ->>>>>>> 94fb7e11b4 (fix(`fiscal_year_company`): made `company` field mandatory) "modified_by": "Administrator", "module": "Accounts", "name": "Fiscal Year Company", "owner": "Administrator", "permissions": [], -<<<<<<< HEAD "sort_field": "modified", -======= - "row_format": "Dynamic", - "sort_field": "creation", ->>>>>>> 94fb7e11b4 (fix(`fiscal_year_company`): made `company` field mandatory) "sort_order": "DESC", "track_changes": 1 } diff --git a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.json b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.json index abcbb790a12..9160ebbae3e 100644 --- a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.json +++ b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.json @@ -2,7 +2,6 @@ "attach_print": 0, "channel": "Email", "condition": "doc.auto_created == 1", - "condition_type": "Python", "creation": "2018-04-25 14:19:05.440361", "days_in_advance": 0, "docstatus": 0, @@ -12,33 +11,22 @@ "event": "New", "idx": 0, "is_standard": 1, -<<<<<<< HEAD - "message": "

{{_(\"Fiscal Year\")}}

\n\n

{{ _(\"New fiscal year created :- \") }} {{ doc.name }}

", - "modified": "2018-04-25 14:30:38.588534", -======= "message": "

{{ _(\"New Fiscal Year - {0}\").format(doc.name) }}

\n\n

{{ _(\"A new fiscal year has been automatically created.\") }}

\n\n

{{ _(\"Fiscal Year Details\") }}

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n {% if doc.companies|length > 0 %}\n \n \n \n \n {% for idx in range(1, doc.companies|length) %}\n \n \n \n {% endfor %}\n {% endif %}\n
{{ _(\"Year Name\") }}{{ doc.name }}
{{ _(\"Start Date\") }}{{ frappe.format_value(doc.year_start_date) }}
{{ _(\"End Date\") }}{{ frappe.format_value(doc.year_end_date) }}
\n {% if doc.companies|length < 2 %}\n {{ _(\"Company\") }}\n {% else %}\n {{ _(\"Companies\") }}\n {% endif %}\n {{ doc.companies[0].company }}
{{ doc.companies[idx].company }}
\n\n{% if doc.disabled %}\n

{{ _(\"The fiscal year has been automatically created in a Disabled state to maintain consistency with the previous fiscal year's status.\") }}

\n{% endif %}\n\n

{{ _(\"Please review the {0} configuration and complete any required financial setup activities.\").format(frappe.utils.get_link_to_form(\"Fiscal Year\", doc.name, frappe.bold(\"Fiscal Year\"))) }}

", "message_type": "HTML", - "minutes_offset": 0, - "modified": "2026-02-21 12:14:54.736795", ->>>>>>> 4c76786ce4 (fix(`fiscal_year`): `Fiscal Year` auto-generation and notification) + "modified": "2026-02-21 15:59:07.775679", "modified_by": "Administrator", "module": "Accounts", "name": "Notification for new fiscal year", "owner": "Administrator", "recipients": [ { - "email_by_role": "Accounts User" + "receiver_by_role": "Accounts Manager" }, { - "email_by_role": "Accounts Manager" + "receiver_by_role": "Accounts User" } ], -<<<<<<< HEAD - "subject": "Notification for new fiscal year {{ doc.name }}" -} -======= "send_system_notification": 0, "send_to_all_assignees": 0, "subject": "{{ _(\"New Fiscal Year {0} - Review Required\").format(doc.name) }}" -} ->>>>>>> 4c76786ce4 (fix(`fiscal_year`): `Fiscal Year` auto-generation and notification) +} \ No newline at end of file