FIX Invoice unpaid widget - SQL error on group by with constant MAIN_COMPANY_PERENTITY_SHARED #30866
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Constant MAIN_COMPANY_PERENTITY_SHARED
Remove "as..." in GROUP BY
ERR DoliDBMysqli::query SQL Error query: SELECT s.rowid as socid, s.nom as name, s.name_alias, s.code_client, s.client, spe.accountancy_code_customer as code_compta, s.logo, s.email, s.entity, s.tva_intra, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6, f.ref, f.date_lim_reglement as datelimite, f.type, f.datef as date, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.fk_statut as status, f.rowid as facid, SUM(pf.amount) as am FROM llx_societe as s LEFT JOIN llx_societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = 2, llx_facture as f LEFT JOIN llx_paiement_facture as pf ON f.rowid = pf.fk_facture WHERE f.fk_soc = s.rowid AND f.entity IN (2) AND f.paye = 0 AND fk_statut = 1 GROUP BY s.rowid, s.nom, s.name_alias, s.code_client, s.client, s.logo, s.email, s.entity, s.tva_intra, s.siren, s.siret, s.ape, s.idprof4, s.idprof5, s.idprof6, spe.accountancy_code_customer as code_compta, f.rowid, f.ref, f.date_lim_reglement, f.type, f.datef, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.fk_statut ORDER BY datelimite ASC, f.ref ASC LIMIT 6
ERR DoliDBMysqli::query SQL Error message: DB_ERROR_SYNTAX You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as code_compta, f.rowid, f.ref, f.date_lim_reglement, f.type, f.datef, f.tota...' at line 1