fix: Modified Number system for Nepal (#23613)
* Update utils.js Further refined number system for Nepal. Numbering in Nepal does not continue as 100 Crores/1000 Crores as in India, but it proceeds as: -> 1 Arba for 100 Crore -> 1 Kharba for 100 Arba (10,000 Cr) * Update number_systems.js Added number system for Nepal. Numbering in Nepal does not continue as 100 Crores/1000 Crores as in India, but it proceeds as: -> 1 Arba for 100 Crore -> 1 Kharba for 100 Arba (10,000 Cr) * chore: simpler condition * style: format --------- Co-authored-by: Ankush Menat <ankushmenat@gmail.com> Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
parent
382c5ebdf1
commit
8a2b9407c8
2 changed files with 25 additions and 1 deletions
|
|
@ -31,4 +31,26 @@ export default {
|
|||
symbol: __("K", null, "Number system"),
|
||||
},
|
||||
],
|
||||
nepalese: [
|
||||
{
|
||||
divisor: 1.0e11,
|
||||
symbol: __("Kh", null, "Number system"), // 10^11 is read as 1 Kharba
|
||||
},
|
||||
{
|
||||
divisor: 1.0e9,
|
||||
symbol: __("Ar", null, "Number system"), // 10^9 is read as 1 Arba
|
||||
},
|
||||
{
|
||||
divisor: 1.0e7,
|
||||
symbol: __("Cr", null, "Number system"),
|
||||
},
|
||||
{
|
||||
divisor: 1.0e5,
|
||||
symbol: __("L", null, "Number system"),
|
||||
},
|
||||
{
|
||||
divisor: 1.0e3,
|
||||
symbol: __("K", null, "Number system"),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1170,8 +1170,10 @@ Object.assign(frappe.utils, {
|
|||
},
|
||||
|
||||
get_number_system: function (country) {
|
||||
if (["Nepal", "Bangladesh", "India", "Myanmar", "Pakistan"].includes(country)) {
|
||||
if (["Bangladesh", "India", "Myanmar", "Pakistan"].includes(country)) {
|
||||
return number_systems.indian;
|
||||
} else if (country == "Nepal") {
|
||||
return number_systems.nepalese;
|
||||
} else {
|
||||
return number_systems.default;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue