verbb/gift-voucher

Thousan values converts to decimal values on save

Closed this issue · 4 comments

Describe the bug

When saving a voucher, that has a price, it sees the thousand seperator as decimal seperator and coverts for instance 5000 to just 5.

Steps to reproduce

  1. Input for instance 5000
    image

  2. Save, and you get this, which is the 5000
    image

  3. Save it again, without changing anything
    image

Now it's saved as only 5

Craft CMS version

4.3.1

Plugin version

3.0.4

Multi-site?

No

Additional context

No response

Are you able to let me know what the locale of the currently-logged in user is (if different to the system local)? I know DKK is the Danish Krone, so just wanted to confirm your locale settings, which would have something to do with the internationalisation of these numbers.

Actually, looks like this is happening across multiple locales.

Fixed for the next release. To get the fix early, change your verbb/gift-voucher requirement in composer.json to:

"require": {
  "verbb/gift-voucher": "dev-craft-4 as 3.0.4",
  "...": "..."
}

Then run composer update.

Awesome :D Thank's @engram-design :D

Fixed in 3.0.5