mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Update clientfourn.php (#33663)
correction of a sql request returning a buggy result. Instead of the sum of the different donations payments the request returned the number of payment multiplied by the global amount of donation.
This commit is contained in:
@@ -569,7 +569,7 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$sql .= " WHERE p.entity IN (".getEntity('donation').")";
|
||||
$sql .= " AND fk_statut in (1,2)";
|
||||
} else {
|
||||
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(pe.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don as p";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = p.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id";
|
||||
|
||||
Reference in New Issue
Block a user