aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-05-16 20:26:58 +0000
committerNicolas Vigier <boklm@mageia.org>2013-05-16 20:26:58 +0000
commit89f4b7b98b6138c2ec10dc42e22d3bd27aab33bf (patch)
tree3b933f13d0e4c8e06bd56fb4d841a0f9b963c4c3
parentf615245eb9fadbed310ada2d628d081f2951ef8d (diff)
downloadmgatres-89f4b7b98b6138c2ec10dc42e22d3bd27aab33bf.tar
mgatres-89f4b7b98b6138c2ec10dc42e22d3bd27aab33bf.tar.gz
mgatres-89f4b7b98b6138c2ec10dc42e22d3bd27aab33bf.tar.bz2
mgatres-89f4b7b98b6138c2ec10dc42e22d3bd27aab33bf.tar.xz
mgatres-89f4b7b98b6138c2ec10dc42e22d3bd27aab33bf.zip
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
-rwxr-xr-xmktreasurer10
-rw-r--r--tmpl/index.html2
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 @@
<ul>
<li>Global balances: [% transactions.balance %] Euros</li>
- [%- FOR ac IN transactions.by_account.values -%]
+ [%- FOR ac IN transactions.by_ac.values -%]
<li>[% ac.account %] : [% ac.balance %] Euros</li>
[%- END -%]
</ul>