Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.46k stars 2.79k forks source link

Limits and precision : bad control on MAIN_MAX_DECIMALS_SHOWN #27265

Open vmaury opened 10 months ago

vmaury commented 10 months ago

Bug

In admin ->limit and precision, it's not allowed to set MAIN_MAX_DECIMALS_TOT>MAIN_MAX_DECIMALS_SHOWN This throws an error and I don't understand why, I think the test is inverted For example, you want the HT totals calculated with 5 digits (when applying VAT afterwards for example), but you want only 2 digits displayed; but that's now impossible

It would be more logical to throw and error if MAIN_MAX_DECIMALS_TOT < MAIN_MAX_DECIMALS_SHOWN . Or may be not comparing these 2 values at all

Environment Version

all (including develop branch)

Environment OS

All

Environment Web server

All

Environment PHP

No response

Environment Database

No response

Environment URL(s)

No response

Expected and actual behavior

No response

Steps to reproduce the behavior

No response

Attached files

No response

ksar-ksar commented 10 months ago

link to #24180