From bdd67368ce61ae404a9f6edcf5e65b10c923650b Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 6 Sep 2024 13:22:46 +0200 Subject: [PATCH] FIX Invoice unpaid widget - SQL error on group by with constant MAIN_COMPANY_PERENTITY_SHARED (#30866) --- htdocs/core/boxes/box_factures_imp.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index 797f9784df0..e7b297db53d 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -1,8 +1,9 @@ - * Copyright (C) 2004-2007 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2015-2019 Frederic France +/* Copyright (C) 2003-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015-2019 Frederic France + * Copyright (C) 2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -126,7 +127,7 @@ class box_factures_imp extends ModeleBoxes } $sql3 = " 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,"; if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { - $sql3 .= " spe.accountancy_code_customer as code_compta,"; + $sql3 .= " spe.accountancy_code_customer,"; } else { $sql3 .= " s.code_compta,"; }