Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Modified Number system for Nepal #23613

Merged
merged 4 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions frappe/public/js/frappe/utils/number_systems.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
ankush marked this conversation as resolved.
Show resolved Hide resolved
},
{
divisor: 1.0e7,
symbol: __("Cr", null, "Number system"),
},
{
divisor: 1.0e5,
symbol: __("L", null, "Number system"),
},
{
divisor: 1.0e3,
symbol: __("K", null, "Number system"),
},
],
};
6 changes: 4 additions & 2 deletions frappe/public/js/frappe/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1170,9 +1170,11 @@ 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 {
} else if (["Nepal"].includes(country)) {
ankush marked this conversation as resolved.
Show resolved Hide resolved
return number_systems.nepalese;
}else {
return number_systems.default;
}
},
Expand Down
Loading