From 8a96ea337f8e4cd4e149173dcc76b7553c733ba5 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 27 May 2026 14:15:09 +0200 Subject: [PATCH] FIX Donation - List - Sort order don't work if company is linked to third party --- htdocs/don/list.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 3c826aa16d0..17c3559eb4f 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -6,6 +6,7 @@ * Copyright (C) 2019 Thibault FOUCART * Copyright (C) 2024-2025 MDW * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2026 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 @@ -237,7 +238,7 @@ $morecss = array(); // Build and execute select // -------------------------------------------------------------------- $sql = "SELECT d.rowid, d.ref, d.datedon, d.fk_soc as socid, d.firstname, d.lastname, d.societe,"; -$sql .= " d.amount, d.fk_statut as status,"; +$sql .= " d.amount, d.fk_statut as status, s.nom,"; $sql .= " p.rowid as pid, p.ref as pref, p.title, p.public"; // Add fields from hooks $parameters = array(); @@ -563,7 +564,7 @@ if ($conf->main_checkbox_left_column) { print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder); $totalarray['nbfield']++; if (getDolGlobalString('DONATION_USE_THIRDPARTIES')) { - print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "d.fk_soc", "", $param, "", $sortfield, $sortorder); + print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); $totalarray['nbfield']++; } else { print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder);