Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Allow "decimal places" settings > 18 #2508

Open
wycre opened this issue Mar 24, 2024 · 1 comment
Open

Feature Request: Allow "decimal places" settings > 18 #2508

wycre opened this issue Mar 24, 2024 · 1 comment

Comments

@wycre
Copy link

wycre commented Mar 24, 2024

When the decimal places allowed for amounts in stock settings is set to any value greater than 18, product edit and inventory editing forms break when non-integer values are used in stock amount fields.

Screenshots:
Buggy behavior from product editing:
image
image

Still works when its an integer:
image
image

Also affects inventory edit:
image

This issue is probably not that big of a deal, considering how absurdly small the values get at 18 decimal points and that the server appears to round things up to a factor smaller than that anyway, but it might be confusing for new users that set this setting arbitrarily high to essentially eliminate the decimal point restriction.

I only noticed this issue because I have no option to set the quick consume amount in terms of the consume unit, but only with the quantity unit stock. I was getting repeating decimals when accounting for awkward fractions which would result in the quick consume button showing a value like 0.999998 pieces.

@wycre wycre added the bug label Mar 24, 2024
@berrnd
Copy link
Member

berrnd commented Mar 24, 2024

I only noticed this issue because I have no option to set the quick consume amount in terms of the consume unit, but only with the quantity unit stock

So that's the practical problem and that's already tracked in / a duplicate of #2427.

 
Normally I don't care about theoretical problems (which having >18 decimal places for amounts effectively is), so maybe this will simply stay open forever.

@berrnd berrnd changed the title Bug: Non-Integer values break when decimal places allowed for amounts is set greater than 18 Feature Request: Allow "decimal places" settings > 18 Mar 24, 2024
@berrnd berrnd added enhancement and removed bug labels Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants