Skip to content

Add support for currency without decimals#47

Merged
sampoyigi merged 2 commits into
tastyigniter:4.xfrom
1PingSun:Currency/no-decimals
Apr 30, 2026
Merged

Add support for currency without decimals#47
sampoyigi merged 2 commits into
tastyigniter:4.xfrom
1PingSun:Currency/no-decimals

Conversation

@1PingSun
Copy link
Copy Markdown
Contributor

@1PingSun 1PingSun commented Apr 1, 2026

This pull request addresses improvements and bug fixes related to currency formatting in the codebase. The main focus is on ensuring correct handling of decimal places and formatting logic when generating currency strings.

Currency formatting improvements:

  • Refactored the decimal count logic in Currency.php to avoid errors when the decimal separator is not present, ensuring robust handling of currency values without decimals.
  • Updated the getFormat method in Currency.php to only append the decimal sign and zeros if the currency actually uses decimal places, preventing incorrect format strings for currencies without decimals.

@sampoyigi sampoyigi merged commit d23f13e into tastyigniter:4.x Apr 30, 2026
@sampoyigi sampoyigi mentioned this pull request May 8, 2026
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