Fix sign for VAT repaid in report

This commit is contained in:
Alexandre SPANGARO 2019-10-29 17:10:10 +01:00
parent 9483e367ca
commit db86dff7d1
2 changed files with 7 additions and 7 deletions

View File

@ -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++;
}

View File

@ -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++;
}