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

FIX Invoice unpaid widget - SQL error on group by with constant MAIN_COMPANY_PERENTITY_SHARED #30866

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

aspangaro
Copy link
Member

@aspangaro aspangaro commented Sep 6, 2024

Constant MAIN_COMPANY_PERENTITY_SHARED

Remove "as..." in GROUP BY

image

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

@eldy eldy merged commit bdd6736 into Dolibarr:19.0 Sep 6, 2024
4 checks passed
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