Merge pull request #14049 from Vaadasch/patch-2

Update byratecountry.php
This commit is contained in:
Laurent Destailleur 2020-06-07 14:13:30 +02:00 committed by GitHub
commit 80e06bdbda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,7 +270,9 @@ if ($modecompta == 'CREANCES-DETTES') {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
$sql .= " AND f.entity IN (".getEntity('invoice', 0).")";
$sql .= " GROUP BY fd.tva_tx,fd.product_type, cc.label ";
$sql .= " GROUP BY fd.tva_tx,fd.product_type, cc.label, cc.code ";
$sql .= " ORDER BY country, product_type, vatrate";
dol_syslog("htdocs/compta/tva/index.php sql=".$sql, LOG_DEBUG);
$resql = $db->query($sql);
@ -351,7 +353,8 @@ if ($modecompta == 'CREANCES-DETTES') {
$sql .= " AND ff.type IN (0,1,2,3,5)";
}
$sql2 .= " AND ff.entity IN (".getEntity("facture_fourn", 0).")";
$sql2 .= " GROUP BY ffd.tva_tx, ffd.product_type, cc.label";
$sql2 .= " GROUP BY ffd.tva_tx, ffd.product_type, cc.label, cc.code ";
$sql2 .= " ORDER BY country, product_type, vatrate";
//print $sql2;
dol_syslog("htdocs/compta/tva/index.php sql=".$sql, LOG_DEBUG);