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.52k stars 2.81k forks source link

__AMOUNT_FORMATED__ formatted incorrectly #13025

Closed paddatrapper closed 2 weeks ago

paddatrapper commented 4 years ago

The__AMOUNT_FORMATED__ variable substitution incorrectly places the currency symbol after the amount. In en_ZA locale, the correct formatting should be R 23,000.00, while, the variable is substituted as 23,000.00 R. This is also an issue within the UI, where pop-ups and other places where formatted amounts are shown (For example the invoice card).

Environment

lyza1000 commented 4 years ago

Hi... Does this variable work in any version of Dolibarr?

paddatrapper commented 4 years ago

I'm not sure

derran666 commented 4 years ago

Hi, has any one found a fix for this as yet?

paddatrapper commented 3 years ago

Still present

paddatrapper commented 3 years ago

A potential solution here would be to add another formatted variable with no currency, then the user can add the currency in the template in the correct location. __AMOUNT__ does not work here, as it does not round to the required number of decimal places (123.00000000 is not really helpful to the client).

The new variable could be used as:

R __AMOUNT_EXCL_CURRENCY_FORMATED__

Which would then render as R 123.45

paddatrapper commented 2 years ago

It is still present

paddatrapper commented 1 year ago

Still present

dpnx-nudra commented 11 months ago

Same in es_CL locale, the correct formatting should be $ 109.862, while, the variable is substituted as $109862.00000000 Env

    Version: 18.0.3 
    OS: CloudLinux 3.10.0-962.3.2.lve1.5.81.el7.x86_64
    Web server: Apache
    PHP: 7.2
    Database: MySQL or MariaDB 10.6.16-MariaDB-cll-lve
PsyCrow-code commented 7 months ago

Works fine on version 19 PHP: 8.1 es_MX

kkhelifa-opendsi commented 2 weeks ago

It's correct on develop (version 21)

Setup -> Company/Organization : image

Setup -> Display : image

Setup -> emails -> email templates : image

New commercial proposal : image image

It's also good es_CL with dollards currency