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:
parent
72bd56e027
commit
bc5b4cff67
1 changed files with 1 additions and 1 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Reference in a new issue