aboutsummaryrefslogtreecommitdiffstats
path: root/mktreasurer
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-05-20 16:42:49 +0000
committerNicolas Vigier <boklm@mageia.org>2013-05-20 16:42:49 +0000
commita07404806a3dad6ca2758229b3c4e79978e2f660 (patch)
treec0d720b649f920f06c7b4115cbdd917c93763da3 /mktreasurer
parente724d2cd95c6a305ec60193d3ce28cb1d7a17c17 (diff)
downloadmgatres-a07404806a3dad6ca2758229b3c4e79978e2f660.tar
mgatres-a07404806a3dad6ca2758229b3c4e79978e2f660.tar.gz
mgatres-a07404806a3dad6ca2758229b3c4e79978e2f660.tar.bz2
mgatres-a07404806a3dad6ca2758229b3c4e79978e2f660.tar.xz
mgatres-a07404806a3dad6ca2758229b3c4e79978e2f660.zip
Add categories graphs
git-svn-id: svn+ssh://svn.mageia.org/svn/soft/mga-treasurer/trunk@8342 5b7c3c08-40e5-403b-9995-ace06908e4af
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};