From 2fe5fad884864ed978ef846ce5e27aee3b602b80 Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Wed, 10 Dec 2025 08:13:22 +0530 Subject: [PATCH] fix(share balance): use currency field instead of int for rate and amount --- .../accounts/doctype/share_balance/share_balance.json | 9 +++++---- erpnext/accounts/doctype/share_balance/share_balance.py | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/share_balance/share_balance.json b/erpnext/accounts/doctype/share_balance/share_balance.json index 48a8cd6f4a7..dc54d07690d 100644 --- a/erpnext/accounts/doctype/share_balance/share_balance.json +++ b/erpnext/accounts/doctype/share_balance/share_balance.json @@ -35,7 +35,7 @@ }, { "fieldname": "rate", - "fieldtype": "Int", + "fieldtype": "Currency", "in_list_view": 1, "label": "Rate", "read_only": 1, @@ -62,7 +62,7 @@ }, { "fieldname": "amount", - "fieldtype": "Int", + "fieldtype": "Currency", "in_list_view": 1, "label": "Amount", "read_only": 1, @@ -91,15 +91,16 @@ ], "istable": 1, "links": [], - "modified": "2024-03-27 13:10:39.866399", + "modified": "2025-12-10 08:06:40.611761", "modified_by": "Administrator", "module": "Accounts", "name": "Share Balance", "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/share_balance/share_balance.py b/erpnext/accounts/doctype/share_balance/share_balance.py index 7a77ce9b871..2eff8a9a9be 100644 --- a/erpnext/accounts/doctype/share_balance/share_balance.py +++ b/erpnext/accounts/doctype/share_balance/share_balance.py @@ -14,7 +14,7 @@ class ShareBalance(Document): if TYPE_CHECKING: from frappe.types import DF - amount: DF.Int + amount: DF.Currency current_state: DF.Literal["", "Issued", "Purchased"] from_no: DF.Int is_company: DF.Check @@ -22,7 +22,7 @@ class ShareBalance(Document): parent: DF.Data parentfield: DF.Data parenttype: DF.Data - rate: DF.Int + rate: DF.Currency share_type: DF.Link to_no: DF.Int # end: auto-generated types