From 4bcc832376e999f0e820e7cc1da6275b13fc0b09 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Thu, 16 May 2013 20:26:49 +0000 Subject: 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 --- mktreasurer | 2 ++ 1 file changed, 2 insertions(+) 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'; -- cgit v1.2.1