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

Bug on Limits and accuracy #14181

Closed
gavrielzs opened this issue Jul 4, 2020 · 3 comments
Closed

Bug on Limits and accuracy #14181

gavrielzs opened this issue Jul 4, 2020 · 3 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@gavrielzs
Copy link

gavrielzs commented Jul 4, 2020

Bug

Cannot modify the Max. decimals for unit prices, Max. decimals for total prices and Max. decimals for prices shown on screen

Environment

  • Version: [12.0.0]
  • OS: [CentOS 7]
  • Web server: [LiteSpeed]
  • PHP: [7.2.31]
  • Database: [mysqli (10.1.44-MariaDB)]
  • URL(s): [admin/limits.php]
@gavrielzs gavrielzs added the Bug This is a bug (something does not work as expected) label Jul 4, 2020
@philippec78
Copy link

philippec78 commented Jul 6, 2020

Same bug

MAIN_MAX_DECIMALS_UNIT
MAIN_MAX_DECIMALS_TOT
MAIN_MAX_DECIMALS_SHOWN
MAIN_ROUNDING_RULE_TOT

Is not present in db "llx_const"

Workaround:

  • Add line in db ("llx_const" - same as Dolibarr 11)
  • Use limits.php from Dolibarr 11

@loxK
Copy link
Contributor

loxK commented Jul 7, 2020

Confirmed.

But the best workaround is to add the constant in the admin constant screen: htdocs/admin/const.php

I looked at the code it seems that they added a sort of "limits per currencies feature" that broke single currency limits editing.

@loxK
Copy link
Contributor

loxK commented Jul 7, 2020

@eldy I can fix it but need information. How is it supposed to work ?

We have three cases:

1) no multicurrency

In that case do we want the currency appended to the constants names ? (eg. MAIN_MAX_DECIMALS_TOT_EUR)
Or do we want the global constants names without the currency code ? (eg. MAIN_MAX_DECIMALS_TOT)

2) multi-currency with MULTICURRENCY_USE_LIMIT_BY_CURRENCY enabled

I suppose in that case we want the constants named with the currency appended (eg. MAIN_MAX_DECIMALS_TOT_EUR)

3) multi-currency with MULTICURRENCY_USE_LIMIT_BY_CURRENCY disabled

I suppose, in that case, we want the constants named without the currency appended (eg. MAIN_MAX_DECIMALS_TOT)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants