From db86dff7d16bd7d03ae92ae8dff0e0dfd08af55e Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 29 Oct 2019 17:10:10 +0100 Subject: [PATCH] Fix sign for VAT repaid in report --- htdocs/compta/resultat/clientfourn.php | 10 +++++----- htdocs/compta/resultat/index.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index efeffeb9b8c..2b74c167d83 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -1132,11 +1132,11 @@ else while ($i < $num) { $obj = $db->fetch_object($result); - $amount += $obj->amount; - $total_ht += $obj->amount; - $total_ttc += $obj->amount; - $subtotal_ht += $obj->amount; - $subtotal_ttc += $obj->amount; + $amount += -$obj->amount; + $total_ht += -$obj->amount; + $total_ttc += -$obj->amount; + $subtotal_ht += -$obj->amount; + $subtotal_ttc += -$obj->amount; $i++; } diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 70129e80403..d12587eea6e 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -480,10 +480,10 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco $obj = $db->fetch_object($result); if (! isset($encaiss[$obj->dm])) $encaiss[$obj->dm]=0; - $encaiss[$obj->dm] += $obj->amount; + $encaiss[$obj->dm] += -$obj->amount; if (! isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm]=0; - $encaiss_ttc[$obj->dm] += $obj->amount; + $encaiss_ttc[$obj->dm] +=-$obj->amount; $i++; }