Recalculate Method 2 - Error

Hi,

I have this problem when i want to make Recalculate Method 2 when i create vendor invoice.
I use Dolibarr V 12.0.4

Dolibarr has detected a technical error.
This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to ‘1’ to remove such notices):
Датум: 20210112160038
Dolibarr: 12.0.1 - https://www.dolibarr.org
Level of features: 0
PHP: 7.4.11
Server: Apache
OS: Linux wizard.zemi.mk 3.10.0-962.3.2.lve1.5.38.el7.x86_64 #1 SMP Thu Jun 18 05:28:41 EDT 2020 x86_64
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36

Requested URL: /fourn/facture/card.php?id=410&action=calculate&calculationrule=roundoftotal
Referer: /fourn/facture/card.php?id=410&action=confirm_valid&confirm=yes&token=%242y%2410%24QDEQXVyp2%2FU2ScVeWSUH8egiYrPj69meAukwpxfCjItzrC6le8j6y
Menu manager: eldy_menu.php

Modules/Applications: user, ecm, facture, fournisseur, salaries, societe, service, expedition, variants, export, propal, supplier_proposal, banque, margin, product, stock, categorie, tax, fckeditor, comptabilite, import, cron, commande
Message: A rounding difference was detected into TOTAL but is too high to be corrected. Some data in your line may be corrupted. Try to edit each line manually.

Best Regards,
Martin

Hi,

But

Be sure to use the latest

Hi ksar,

Sorry, my mistake, i make upgrade on dolibarr version today, before i use V12.0.1.
But after upgrade again i have problem with Recalculate methods, it not working.

If i create vendor invoice with Step of rounding range = 1 and i see that final price is not the same, i make changes Step of rounding range = 0 and click on Method 1 or Method 2 is not working, it is still the same price. I must click on edit on every added line and save to make changes on price…

This options last working very good on V11, but after upgrade on V12 is not working, it have some bug.

If you need, i can send you and video about the problem.

Best Regards,
Martin

And again the same error for method 2

Dolibarr has detected a technical error.
This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to ‘1’ to remove such notices):
Датум: 20210114210502
Dolibarr: 12.0.4 - https://www.dolibarr.org
Level of features: 0
PHP: 7.2.34
Сервер: Apache
OS: Linux wizard.zemi.mk 3.10.0-962.3.2.lve1.5.38.el7.x86_64 #1 SMP Thu Jun 18 05:28:41 EDT 2020 x86_64
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36

Requested URL: /fourn/facture/card.php?id=415&action=calculate&calculationrule=roundoftotal
Referer: https://erp.groupsolution.com.mk/fourn/facture/card.php?id=415
Menu manager: eldy_menu.php

Modules/Applications: user, expedition, export, propal, supplier_proposal, banque, margin, product, stock, categorie, cron, commande, ecm, facture, fournisseur, tax, salaries, societe, service, fckeditor, comptabilite, variants, import
Message: A rounding difference was detected into TOTAL but is too high to be corrected. Some data in your line may be corrupted. Try to edit each line manually.

@Zuiko maybe you know how to fix and this bug?

My users didn’t try method 2 for the moment and my test environment is currently in maintenance to make quickly a test. But did you not try it after adopting my preceding fix #16016 on function price2num in htdocs/core/lib/functions.lib.php. May be it could have an effect.

I tried but it not working…

@martin54
I performed some testing on calculation methods in V12.0.4 and it seems there are no differencies between the 2 methods but I can’t see error messages as yours. Where did you catch such these errors?

@Zuiko

Yes, it no make differences between two methods, but it must to make differences on final price.

On Dolibarr V11 when i have set rounding on 1 in Limits and accuracy and click on Method 1 it round the final price without decimals or if i set rounding on 0 in Limits and accuracy and click on Method 1 the final price is with decimals.

Now on V12 this options not working, i must click on edit on every line in invoice…

About the error, sometimes i get the error, sometimes not…

Still not working with new version of Dolibarr V13.0.1