From a299392128d5c5652a66a163ddf6242bc82cbd9a Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Wed, 10 Dec 2025 08:13:22 +0530 Subject: [PATCH 1/3] fix(share balance): use currency field instead of int for rate and amount (cherry picked from commit 2fe5fad884864ed978ef846ce5e27aee3b602b80) # Conflicts: # erpnext/accounts/doctype/share_balance/share_balance.json # erpnext/accounts/doctype/share_balance/share_balance.py --- .../doctype/share_balance/share_balance.json | 41 ++++++++++++++++++- .../doctype/share_balance/share_balance.py | 24 +++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/share_balance/share_balance.json b/erpnext/accounts/doctype/share_balance/share_balance.json index 04d7bb75bf8..dd3e66b1fbf 100644 --- a/erpnext/accounts/doctype/share_balance/share_balance.json +++ b/erpnext/accounts/doctype/share_balance/share_balance.json @@ -74,6 +74,7 @@ "unique": 0 }, { +<<<<<<< HEAD "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, @@ -103,6 +104,15 @@ "set_only_once": 0, "unique": 0 }, +======= + "fieldname": "rate", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Rate", + "read_only": 1, + "reqd": 1 + }, +>>>>>>> 2fe5fad884 (fix(share balance): use currency field instead of int for rate and amount) { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -193,6 +203,7 @@ "unique": 0 }, { +<<<<<<< HEAD "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, @@ -222,6 +233,15 @@ "set_only_once": 0, "unique": 0 }, +======= + "fieldname": "amount", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Amount", + "read_only": 1, + "reqd": 1 + }, +>>>>>>> 2fe5fad884 (fix(share balance): use currency field instead of int for rate and amount) { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -313,6 +333,7 @@ "set_only_once": 0, "unique": 0 } +<<<<<<< HEAD ], "has_web_view": 0, "hide_heading": 0, @@ -339,4 +360,22 @@ "sort_order": "DESC", "track_changes": 1, "track_seen": 0 -} \ No newline at end of file +} +======= + ], + "istable": 1, + "links": [], + "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 +} +>>>>>>> 2fe5fad884 (fix(share balance): use currency field instead of int for rate and amount) diff --git a/erpnext/accounts/doctype/share_balance/share_balance.py b/erpnext/accounts/doctype/share_balance/share_balance.py index 4c9ec439eed..4a768caaa23 100644 --- a/erpnext/accounts/doctype/share_balance/share_balance.py +++ b/erpnext/accounts/doctype/share_balance/share_balance.py @@ -6,4 +6,28 @@ from frappe.model.document import Document class ShareBalance(Document): +<<<<<<< HEAD +======= + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amount: DF.Currency + current_state: DF.Literal["", "Issued", "Purchased"] + from_no: DF.Int + is_company: DF.Check + no_of_shares: DF.Int + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + rate: DF.Currency + share_type: DF.Link + to_no: DF.Int + # end: auto-generated types + +>>>>>>> 2fe5fad884 (fix(share balance): use currency field instead of int for rate and amount) pass From ba9f571886a631e0691366ddb115a6e1706d12c3 Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Wed, 10 Dec 2025 09:52:37 +0530 Subject: [PATCH 2/3] chore: resolve conflict --- .../doctype/share_balance/share_balance.py | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/erpnext/accounts/doctype/share_balance/share_balance.py b/erpnext/accounts/doctype/share_balance/share_balance.py index 4a768caaa23..4c9ec439eed 100644 --- a/erpnext/accounts/doctype/share_balance/share_balance.py +++ b/erpnext/accounts/doctype/share_balance/share_balance.py @@ -6,28 +6,4 @@ from frappe.model.document import Document class ShareBalance(Document): -<<<<<<< HEAD -======= - # begin: auto-generated types - # This code is auto-generated. Do not modify anything in this block. - - from typing import TYPE_CHECKING - - if TYPE_CHECKING: - from frappe.types import DF - - amount: DF.Currency - current_state: DF.Literal["", "Issued", "Purchased"] - from_no: DF.Int - is_company: DF.Check - no_of_shares: DF.Int - parent: DF.Data - parentfield: DF.Data - parenttype: DF.Data - rate: DF.Currency - share_type: DF.Link - to_no: DF.Int - # end: auto-generated types - ->>>>>>> 2fe5fad884 (fix(share balance): use currency field instead of int for rate and amount) pass From 77b9044d8dfb81e28f6878caf2abf708dbb26fa5 Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Wed, 10 Dec 2025 09:56:15 +0530 Subject: [PATCH 3/3] chore: resolve conflict --- .../doctype/share_balance/share_balance.json | 45 ++----------------- 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/erpnext/accounts/doctype/share_balance/share_balance.json b/erpnext/accounts/doctype/share_balance/share_balance.json index dd3e66b1fbf..4cbe2deffe5 100644 --- a/erpnext/accounts/doctype/share_balance/share_balance.json +++ b/erpnext/accounts/doctype/share_balance/share_balance.json @@ -74,14 +74,13 @@ "unique": 0 }, { -<<<<<<< HEAD "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "columns": 0, "fieldname": "rate", - "fieldtype": "Int", + "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -103,16 +102,7 @@ "search_index": 0, "set_only_once": 0, "unique": 0 - }, -======= - "fieldname": "rate", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Rate", - "read_only": 1, - "reqd": 1 }, ->>>>>>> 2fe5fad884 (fix(share balance): use currency field instead of int for rate and amount) { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -203,14 +193,13 @@ "unique": 0 }, { -<<<<<<< HEAD "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "columns": 0, "fieldname": "amount", - "fieldtype": "Int", + "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -232,16 +221,7 @@ "search_index": 0, "set_only_once": 0, "unique": 0 - }, -======= - "fieldname": "amount", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Amount", - "read_only": 1, - "reqd": 1 }, ->>>>>>> 2fe5fad884 (fix(share balance): use currency field instead of int for rate and amount) { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -333,7 +313,6 @@ "set_only_once": 0, "unique": 0 } -<<<<<<< HEAD ], "has_web_view": 0, "hide_heading": 0, @@ -345,7 +324,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2018-01-10 18:32:36.201124", + "modified": "2025-12-10 08:06:40.611761", "modified_by": "Administrator", "module": "Accounts", "name": "Share Balance", @@ -361,21 +340,3 @@ "track_changes": 1, "track_seen": 0 } -======= - ], - "istable": 1, - "links": [], - "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 -} ->>>>>>> 2fe5fad884 (fix(share balance): use currency field instead of int for rate and amount)