diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php
index c70416fec6e..92204520b35 100644
--- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php
@@ -72,13 +72,9 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
print '
'.dol_print_date($objectlink->date, 'day').' | ';
print '';
if (!empty($objectlink) && $objectlink->element == 'facture' && $user->hasRight('facture', 'lire')) {
- $sign = 1;
- if ($objectlink->type == Facture::TYPE_CREDIT_NOTE) {
- $sign = -1;
- }
if ($objectlink->statut != 3) {
// If not abandonned
- $total = $total + $sign * $objectlink->total_ht;
+ $total += $objectlink->total_ht;
echo price($objectlink->total_ht);
} else {
echo ''.price($objectlink->total_ht).'';
diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php
index f4babff9572..57d3afe5552 100644
--- a/htdocs/compta/resultat/clientfourn.php
+++ b/htdocs/compta/resultat/clientfourn.php
@@ -301,7 +301,7 @@ if ($modecompta == 'BOOKKEEPING') {
if (!empty($date_start) && !empty($date_end)) {
$sql .= " AND f.doc_date >= '".$db->idate($date_start)."' AND f.doc_date <= '".$db->idate($date_end)."'";
}
- $sql .= " GROUP BY pcg_type DESC";
+ $sql .= " GROUP BY pcg_type";
if ($showaccountdetail == 'no') {
$sql .= ", name, socid"; // group by "accounting group" (INCOME/EXPENSE), then "customer".
}
|