Skip to content

Fix zero-decimal currency formatting#46

Open
troioi-vn wants to merge 1 commit intotastyigniter:4.xfrom
troioi-vn:fix/zero-decimal-currency-format
Open

Fix zero-decimal currency formatting#46
troioi-vn wants to merge 1 commit intotastyigniter:4.xfrom
troioi-vn:fix/zero-decimal-currency-format

Conversation

@troioi-vn
Copy link
Copy Markdown

Summary

This fixes formatting for zero-decimal currencies such as VND.

When decimal_position is 0, the currency format should not include a decimal separator. The previous logic always appended the decimal sign, which could lead to invalid formatting assumptions downstream.

Changes

  • omit the decimal separator when decimal_position is 0
  • add regression tests for zero-decimal currency formatting

Verification

  • added test coverage for decimal_position = 0
  • manually sanity-checked the formatting path for a VND-like currency

Notes

I could not run the full test suite locally because the project test setup expects a DB driver that is not available in my current environment.

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.

1 participant