aboutsummaryrefslogtreecommitdiffstats
path: root/mktreasurer
diff options
context:
space:
mode:
Diffstat (limited to 'mktreasurer')
-rwxr-xr-xmktreasurer5
1 files changed, 5 insertions, 0 deletions
diff --git a/mktreasurer b/mktreasurer
index 1f1614b..f13b531 100755
--- a/mktreasurer
+++ b/mktreasurer
@@ -162,6 +162,11 @@ sub transactions_infos {
foreach my $tra (@{$y->{transactions}}) {
next unless $tra->{ca};
$y->{ca_balance}->{$tra->{ca}} += $tra->{amount};
+ if ($tra->{amount} > 0) {
+ $y->{ca_revenues}->{$tra->{ca}} += $tra->{amount};
+ } else {
+ $y->{ca_expenses}->{$tra->{ca}} -= $tra->{amount};
+ }
}
$y->{start_balance} = $start_balance ? $start_balance : new Math::BigFloat 0;
$y->{end_balance} = $y->{balance} + new Math::BigFloat $y->{start_balance};