From 89f4b7b98b6138c2ec10dc42e22d3bd27aab33bf Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Thu, 16 May 2013 20:26:58 +0000 Subject: Rename by_account to by_ac git-svn-id: svn+ssh://svn.mageia.org/svn/soft/mga-treasurer/trunk@8285 5b7c3c08-40e5-403b-9995-ace06908e4af --- mktreasurer | 10 +++++----- tmpl/index.html | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mktreasurer b/mktreasurer index 5344478..961e269 100755 --- a/mktreasurer +++ b/mktreasurer @@ -115,7 +115,7 @@ sub transactions_infos { by_month => {}, by_year => {}, by_pa => {}, - by_account => {}, + by_ac => {}, by_ca => {}, balance => new Math::BigFloat 0, ); @@ -126,25 +126,25 @@ sub transactions_infos { push @{$res{by_month}->{$month}->{transactions}}, $tra; $res{by_month}->{$month}->{year} = $year; $res{by_month}->{$month}->{month} = $dt->month; - $res{by_account}->{$tra->{ac}}->{account} = $tra->{account}; + $res{by_ac}->{$tra->{ac}}->{account} = $tra->{account}; push @{$res{by_year}->{$year}->{transactions}}, $tra; push @{$res{by_year}->{$year}->{months}}, $month; push @{$res{by_pa}->{$tra->{pa}}->{transactions}}, $tra; - push @{$res{by_account}->{$tra->{ac}}->{transactions}}, $tra; + push @{$res{by_ac}->{$tra->{ac}}->{transactions}}, $tra; if ($tra->{ca}) { push @{$res{by_ca}->{$tra->{ca}}->{transactions}}, $tra; $res{by_ca}->{$tra->{ca}}->{c_name} = $tra->{c_name}; } $res{balance} += $tra->{amount}; } - foreach my $by ('by_account', 'by_year', 'by_month', 'by_ca') { + foreach my $by ('by_ac', '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'; + next if $tra->{trt} && $by ne 'by_ac'; if ($tra->{amount} > 0) { $t->{revenues} += $tra->{amount}; } else { diff --git a/tmpl/index.html b/tmpl/index.html index a294cea..511c4b3 100644 --- a/tmpl/index.html +++ b/tmpl/index.html @@ -30,7 +30,7 @@ -- cgit v1.2.1