Skip to content

FIX / Fix MySQL when calculating amounts#555

Open
Mary-Clb wants to merge 2 commits into10.0/bugfixesfrom
fix/fix-sql-request
Open

FIX / Fix MySQL when calculating amounts#555
Mary-Clb wants to merge 2 commits into10.0/bugfixesfrom
fix/fix-sql-request

Conversation

@Mary-Clb
Copy link

@Mary-Clb Mary-Clb commented Mar 2, 2026

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !42462
  • The total amount of orders was no longer being calculated due to a SQL syntax error in the getAllPrices() function query. The query builder was incorrectly adding backticks around SQL expressions, resulting in the following MySQL error: SQL Error "1054": Unknown column 'SUM(price_ati)' in 'SELECT'
    The query has been corrected by wrapping the SELECT expressions in QueryExpression objects, which tells the query builder to treat them as raw SQL expressions rather than column names.

@Mary-Clb Mary-Clb changed the base branch from main to 10.0/bugfixes March 2, 2026 11:12
@stonebuzz
Copy link
Contributor

CAn you validate fix with customer and adapt changelog.md

@Mary-Clb
Copy link
Author

Mary-Clb commented Mar 4, 2026

Fix approved by the customer

@stonebuzz stonebuzz self-requested a review March 4, 2026 09:39
@stonebuzz stonebuzz mentioned this pull request Mar 4, 2026
2 tasks
@stonebuzz
Copy link
Contributor

Waiting for #549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants