Skip to content

fix: correct RSD decimal digits#14698

Open
vukdavidovic wants to merge 2 commits intomedusajs:developfrom
vukdavidovic:fix/rsd-decimal-digits
Open

fix: correct RSD decimal digits#14698
vukdavidovic wants to merge 2 commits intomedusajs:developfrom
vukdavidovic:fix/rsd-decimal-digits

Conversation

@vukdavidovic
Copy link

@vukdavidovic vukdavidovic commented Feb 3, 2026

Summary

What — What changes are introduced in this PR?

Updated the default currency metadata to set RSD decimal digits to 2 and synced the admin dashboard currency data.

Why — Why are these changes relevant or necessary?

RSD was configured with decimal_digits: 0, which rounded all prices to whole numbers and prevented fractional values (e.g., 150.52).

How — How have these changes been implemented?

Adjusted RSD.decimal_digits in the core currency defaults and updated the generated dashboard currency list.

Testing — How have these changes been tested, or how can the reviewer test the feature?

Not run (data-only change).


Examples

Example usage
Previously: 150.52 RSD would round to 151 or 150
Now: 150.52 is preserved with 2 decimals


Checklist

Please ensure the following before requesting a review:

  • I have added a changeset for this PR
    • Every non-breaking change should be marked as a patch
    • To add a changeset, run yarn changeset and follow the prompts
  • The changes are covered by relevant tests
  • I have verified the code works as intended locally
  • I have linked the related issue(s) if applicable

Additional Context

Fixes #14697.


Note

Low Risk
Low risk data-only change that updates currency metadata; impact is limited to how RSD amounts are formatted/rounded in the core utils and dashboard.

Overview
Fixes Serbian Dinar (RSD) currency metadata to use decimal_digits: 2 (instead of 0) so fractional prices are preserved rather than rounded to whole numbers.

Updates both the core defaultCurrencies in @medusajs/utils and the auto-generated admin dashboard currencies list, and adds a changeset bumping @medusajs/utils and @medusajs/dashboard as patch releases.

Written by Cursor Bugbot for commit e737c64. This will update automatically on new commits. Configure here.

@vukdavidovic vukdavidovic requested a review from a team as a code owner February 3, 2026 14:18
@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: e737c64

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 76 packages
Name Type
@medusajs/dashboard Patch
@medusajs/utils Patch
@medusajs/admin-bundler Patch
@medusajs/event-bus-redis Patch
@medusajs/framework Patch
@medusajs/modules-sdk Patch
@medusajs/orchestration Patch
@medusajs/workflows-sdk Patch
@medusajs/cli Patch
@medusajs/medusa-oas-cli Patch
integration-tests-http Patch
@medusajs/medusa Patch
@medusajs/test-utils Patch
@medusajs/analytics Patch
@medusajs/api-key Patch
@medusajs/auth Patch
@medusajs/cache-inmemory Patch
@medusajs/cache-redis Patch
@medusajs/caching Patch
@medusajs/cart Patch
@medusajs/currency Patch
@medusajs/customer Patch
@medusajs/event-bus-local Patch
@medusajs/file Patch
@medusajs/fulfillment Patch
@medusajs/index Patch
@medusajs/inventory Patch
@medusajs/link-modules Patch
@medusajs/locking Patch
@medusajs/notification Patch
@medusajs/order Patch
@medusajs/payment Patch
@medusajs/pricing Patch
@medusajs/product Patch
@medusajs/promotion Patch
@medusajs/rbac Patch
@medusajs/region Patch
@medusajs/sales-channel Patch
@medusajs/settings Patch
@medusajs/stock-location Patch
@medusajs/store Patch
@medusajs/tax Patch
@medusajs/translation Patch
@medusajs/user Patch
@medusajs/workflow-engine-inmemory Patch
@medusajs/workflow-engine-redis Patch
@medusajs/analytics-local Patch
@medusajs/analytics-posthog Patch
@medusajs/auth-emailpass Patch
@medusajs/auth-github Patch
@medusajs/auth-google Patch
@medusajs/caching-redis Patch
@medusajs/file-local Patch
@medusajs/file-s3 Patch
@medusajs/fulfillment-manual Patch
@medusajs/locking-postgres Patch
@medusajs/locking-redis Patch
@medusajs/notification-local Patch
@medusajs/notification-sendgrid Patch
@medusajs/payment-stripe Patch
@medusajs/draft-order Patch
@medusajs/core-flows Patch
@medusajs/oas-github-ci Patch
@medusajs/js-sdk Patch
@medusajs/types Patch
@medusajs/deps Patch
@medusajs/telemetry Patch
@medusajs/admin-sdk Patch
@medusajs/admin-shared Patch
@medusajs/admin-vite-plugin Patch
@medusajs/icons Patch
@medusajs/toolbox Patch
@medusajs/ui-preset Patch
create-medusa-app Patch
medusa-dev-cli Patch
@medusajs/ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Feb 3, 2026

Someone is attempting to deploy a commit to the medusajs Team on Vercel.

A member of the Team first needs to authorize it.

@NicolasGorga
Copy link
Contributor

Hello @vukdavidovic thanks for the PR. Though, I have found some resources indicating Serbian Dinar no longer has decimals, since para is not in circulation anymore? Could you provide a little bit more context?

@vukdavidovic
Copy link
Author

Thanks for the review @NicolasGorga
The change is intentional for e‑commerce pricing. While “para” isn’t used in cash anymore, some Serbian online retailers still price and charge with decimals (e.g., 1,499.99 RSD), and payment providers handle sub‑dinar amounts in digital transactions. I added decimal support primarily to preserve pricing precision. That said, I’m also fine leaving RSD without decimals if that’s the preferred direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: RSD currency decimal_digits set to 0 prevents fractional prices

2 participants