aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-05-16 20:26:49 +0000
committerNicolas Vigier <boklm@mageia.org>2013-05-16 20:26:49 +0000
commit4bcc832376e999f0e820e7cc1da6275b13fc0b09 (patch)
tree7b0eb5025ee362c2e504504603af2f53946a1daa
parent05141c021dc9e20b7cd473762ae33612d89d1b48 (diff)
downloadmgatres-4bcc832376e999f0e820e7cc1da6275b13fc0b09.tar
mgatres-4bcc832376e999f0e820e7cc1da6275b13fc0b09.tar.gz
mgatres-4bcc832376e999f0e820e7cc1da6275b13fc0b09.tar.bz2
mgatres-4bcc832376e999f0e820e7cc1da6275b13fc0b09.tar.xz
mgatres-4bcc832376e999f0e820e7cc1da6275b13fc0b09.zip
mktreasurer: initialise expenses and revenues to 0
git-svn-id: svn+ssh://svn.mageia.org/svn/soft/mga-treasurer/trunk@8282 5b7c3c08-40e5-403b-9995-ace06908e4af
-rwxr-xr-xmktreasurer2
1 files changed, 2 insertions, 0 deletions
diff --git a/mktreasurer b/mktreasurer
index 4c44e50..5344478 100755
--- a/mktreasurer
+++ b/mktreasurer
@@ -140,6 +140,8 @@ sub transactions_infos {
foreach my $by ('by_account', 'by_year', 'by_month', 'by_ca') {
foreach my $t (values %{$res{$by}}) {
$t->{balance} = new Math::BigFloat 0;
+ $t->{revenues} = new Math::BigFloat 0;
+ $t->{expenses} = new Math::BigFloat 0;
foreach my $tra (@{$t->{transactions}}) {
$t->{balance} += $tra->{amount};
next if $tra->{trt} && $by ne 'by_account';