fix(share balance): use currency field instead of int for rate and amount

(cherry picked from commit 2fe5fad884)

# Conflicts:
#	erpnext/accounts/doctype/share_balance/share_balance.json
This commit is contained in:
diptanilsaha
2025-12-10 08:13:22 +05:30
committed by Mergify
parent 7bec3d19ac
commit a8ed2815a4
2 changed files with 42 additions and 3 deletions

View File

@@ -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
}
}
=======
],
"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)

View File

@@ -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