From 9538a9870ce19cf73231ed4192458f8c295325c2 Mon Sep 17 00:00:00 2001 From: Sudharsanan11 Date: Mon, 2 Mar 2026 01:58:52 +0530 Subject: [PATCH 1/2] fix(accounts): add transaction time field --- .../buying/doctype/purchase_order/purchase_order.json | 11 ++++++++++- .../buying/doctype/purchase_order/purchase_order.py | 1 + erpnext/selling/doctype/sales_order/sales_order.json | 11 ++++++++++- erpnext/selling/doctype/sales_order/sales_order.py | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index 33e6f99626f..53879d5eff3 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -18,6 +18,7 @@ "order_confirmation_date", "column_break_7", "transaction_date", + "transaction_time", "schedule_date", "column_break1", "is_subcontracted", @@ -1311,6 +1312,14 @@ { "fieldname": "section_break_tnkm", "fieldtype": "Section Break" + }, + { + "default": "Now", + "depends_on": "is_internal_supplier", + "fieldname": "transaction_time", + "fieldtype": "Time", + "label": "Time", + "mandatory_depends_on": "is_internal_supplier" } ], "grid_page_length": 50, @@ -1318,7 +1327,7 @@ "idx": 105, "is_submittable": 1, "links": [], - "modified": "2026-02-23 13:22:33.323946", + "modified": "2026-03-02 00:40:47.119584", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order", diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 5574fce67cd..2b287d51d8d 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -167,6 +167,7 @@ class PurchaseOrder(BuyingController): total_qty: DF.Float total_taxes_and_charges: DF.Currency transaction_date: DF.Date + transaction_time: DF.Time | None # end: auto-generated types def __init__(self, *args, **kwargs): diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index b217a8c67a3..1b186352bfa 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -18,6 +18,7 @@ "column_break_7", "order_type", "transaction_date", + "transaction_time", "delivery_date", "column_break1", "tax_id", @@ -1724,6 +1725,14 @@ "fieldname": "utm_analytics_section", "fieldtype": "Section Break", "label": "UTM Analytics" + }, + { + "default": "Now", + "depends_on": "is_internal_customer", + "fieldname": "transaction_time", + "fieldtype": "Time", + "label": "Time", + "mandatory_depends_on": "is_internal_customer" } ], "grid_page_length": 50, @@ -1731,7 +1740,7 @@ "idx": 105, "is_submittable": 1, "links": [], - "modified": "2026-02-23 13:25:56.665392", + "modified": "2026-03-02 00:42:18.834823", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 38a540807c6..a46d646e8f4 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -187,6 +187,7 @@ class SalesOrder(SellingController): total_qty: DF.Float total_taxes_and_charges: DF.Currency transaction_date: DF.Date + transaction_time: DF.Time | None utm_campaign: DF.Link | None utm_content: DF.Data | None utm_medium: DF.Link | None From c5b3673a3073628905dddacfc975972b39eb6224 Mon Sep 17 00:00:00 2001 From: Sudharsanan11 Date: Mon, 2 Mar 2026 02:01:04 +0530 Subject: [PATCH 2/2] fix(accounts): set posting time to get incoming rate --- erpnext/utilities/transaction_base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py index bdaacfeb03e..4c3836938c6 100644 --- a/erpnext/utilities/transaction_base.py +++ b/erpnext/utilities/transaction_base.py @@ -342,6 +342,7 @@ class TransactionBase(StatusUpdater): args.update( { "posting_date": self.transaction_date, + "posting_time": self.transaction_time, } ) else: