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

NEW constants EMAIL #31979

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

NEW constants EMAIL #31979

wants to merge 4 commits into from

Conversation

leninrivas
Copy link
Contributor

NEW MYCOMPANY_TVAINTRA
NEW AMOUNT_MULTICURRENCY_FORMATED
NEW function dol_set_value($selector, $value)
NEW rounding MTL

leninrivas and others added 3 commits November 18, 2024 05:26
NEW __MYCOMPANY_TVAINTRA__
NEW __AMOUNT_MULTICURRENCY_FORMATED__
NEW  function dol_set_value($selector, $value)
NEW rounding MTL
NEW __MYCOMPANY_TVAINTRA__
NEW __AMOUNT_MULTICURRENCY_FORMATED__
NEW  function dol_set_value($selector, $value)
NEW rounding MTL
@@ -6822,6 +6823,8 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
$nbdecimal = getDolGlobalInt('MAIN_MAX_DECIMALS_UNIT');
} elseif ($forcerounding === 'MT') {
$nbdecimal = getDolGlobalInt('MAIN_MAX_DECIMALS_TOT');
} elseif ($forcerounding === 'MTL') {
$nbdecimal = getDolGlobalInt('MAIN_MAX_DECIMALS_TOT_LINE'); // TODO Future feature to improve accuracy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Total of lines are used in accountancy to calculate the total of document. For legal reason, total of lines must match total on document.
For this reason the accuracy of total of lines must always be the same than the accuracy of total of documents, so nb of decimals for total of lines must use MAIN_MAX_DECIMALS_TOT, otherwise, accountancy will always be wrong and total of lines will never match amount in document.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, so is there a way to improve the precision perhaps by increasing the decimals of the unit prices to 10 or 12?

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants