From f15efc543bc014ee0610a59c035bc43f92f47e92 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Thu, 11 Dec 2025 16:09:22 +0530 Subject: [PATCH] feat: supplier invoice date in opening invoice creation tool (#50835) --- .../opening_invoice_creation_tool.py | 3 +++ .../opening_invoice_creation_tool_item.json | 12 ++++++++++-- .../opening_invoice_creation_tool_item.py | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py index 7555e6d957f..2f3a893a73f 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py @@ -214,6 +214,9 @@ class OpeningInvoiceCreationTool(Document): } ) + if self.invoice_type == "Purchase" and row.supplier_invoice_date: + invoice.update({"bill_date": row.supplier_invoice_date}) + accounting_dimension = get_accounting_dimensions() for dimension in accounting_dimension: invoice.update({dimension: self.get(dimension) or item.get(dimension)}) diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.json b/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.json index bc9229d0701..29daab42439 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.json +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.json @@ -12,6 +12,7 @@ "column_break_3", "posting_date", "due_date", + "supplier_invoice_date", "section_break_5", "item_name", "outstanding_amount", @@ -111,19 +112,26 @@ "fieldname": "invoice_number", "fieldtype": "Data", "label": "Invoice Number" + }, + { + "depends_on": "eval: parent.invoice_type == \"Purchase\"", + "fieldname": "supplier_invoice_date", + "fieldtype": "Date", + "label": "Supplier Invoice Date" } ], "istable": 1, "links": [], - "modified": "2024-03-27 13:10:06.703006", + "modified": "2025-12-01 16:18:07.997594", "modified_by": "Administrator", "module": "Accounts", "name": "Opening Invoice Creation Tool Item", "owner": "Administrator", "permissions": [], "quick_entry": 1, + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.py b/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.py index bc48300286f..1ea025322b4 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.py +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.py @@ -26,6 +26,7 @@ class OpeningInvoiceCreationToolItem(Document): party_type: DF.Link | None posting_date: DF.Date | None qty: DF.Data | None + supplier_invoice_date: DF.Date | None temporary_opening_account: DF.Link | None # end: auto-generated types