Skip to content

Fix zero-decimal currency formatting#46

Merged
sampoyigi merged 1 commit into
tastyigniter:4.xfrom
troioi-vn:fix/zero-decimal-currency-format
Apr 30, 2026
Merged

Fix zero-decimal currency formatting#46
sampoyigi merged 1 commit into
tastyigniter:4.xfrom
troioi-vn:fix/zero-decimal-currency-format

Conversation

@troioi-vn
Copy link
Copy Markdown
Contributor

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.

@sampoyigi sampoyigi merged commit 0edec34 into tastyigniter:4.x Apr 30, 2026
@sampoyigi sampoyigi mentioned this pull request May 8, 2026
@troioi-vn troioi-vn deleted the fix/zero-decimal-currency-format branch May 15, 2026 15:19
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.

2 participants