Skip to content

Conversation

@atm-irvine
Copy link
Contributor

FIX|Fix lot of 0 after amount of total_ht and total_ttc

I've added update_price before substitution because there was a lot of 0 after the price in the email.


// For backward compatibility
if ($onlykey != 2) {
if (is_object($object)) $object->update_price();
Copy link
Member

Choose a reason for hiding this comment

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

We should not have any SQL action inside the getCommonSubstitutionArray that should remain a memory only function.
Can you describe how to reproduce the problem ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eldy A customer reported an issue with the TOTAL_TTC variable. It displays too many zeros at the end, even though the configuration limits it to two decimal places. I don't understand why.

Copy link
Member

Choose a reason for hiding this comment

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

First thing to do is to look into database. If data was inserted directly in database or with old version the value may have not be rounded by the rounding limit.
Note: We round during the insert, never when showing on screen. Data must have correct rounding in database. if not, database is corrupted.
if yes, rounding on screen is useless.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I see your point. I'm going to check this right now, thanks.

@eldy eldy added the PR not qualified PR is not qualified (feature not enough requested, duplicate feature or other reason) label Apr 8, 2025
@eldy eldy closed this May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR not qualified PR is not qualified (feature not enough requested, duplicate feature or other reason)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants