diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-06-19 17:50:34 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-06-19 17:50:34 +0000 |
commit | 6bfd9cc285b5967180420a86b47db5743771563f (patch) | |
tree | 90696a68d545f6a1a97da8a1bca8459421e53648 | |
parent | bc45ce968f8a889ad50b283fa43c4b94cdeac968 (diff) | |
download | mgatres-6bfd9cc285b5967180420a86b47db5743771563f.tar mgatres-6bfd9cc285b5967180420a86b47db5743771563f.tar.gz mgatres-6bfd9cc285b5967180420a86b47db5743771563f.tar.bz2 mgatres-6bfd9cc285b5967180420a86b47db5743771563f.tar.xz mgatres-6bfd9cc285b5967180420a86b47db5743771563f.zip |
add total donations to index.json
git-svn-id: svn+ssh://svn.mageia.org/svn/soft/mga-treasurer/trunk@8537 5b7c3c08-40e5-403b-9995-ace06908e4af
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | mktreasurer | 2 | ||||
-rw-r--r-- | tmpl/index.json | 1 |
3 files changed, 5 insertions, 0 deletions
@@ -1,3 +1,5 @@ +- add total donations to index.json + Version 0.6 - Fix Makefile to install tmp/*.json files diff --git a/mktreasurer b/mktreasurer index fda59ad..000bef1 100755 --- a/mktreasurer +++ b/mktreasurer @@ -83,6 +83,7 @@ sub donations_infos { by_year => {}, by_pa => {}, total_30 => 0, + total => 0, sorted_pa_by_total => [], ); foreach my $don (@{$res{donations}}) { @@ -100,6 +101,7 @@ sub donations_infos { if (time - $don->{date} < '2592000') { # last 30 days $res{total_30} += $don->{amount}; } + $res{total} += $don->{amount}; } foreach my $d ((values %{$res{by_month}}), (values %{$res{by_year}}), (values %{$res{by_pa}})) { diff --git a/tmpl/index.json b/tmpl/index.json index b6102d7..686732b 100644 --- a/tmpl/index.json +++ b/tmpl/index.json @@ -4,6 +4,7 @@ SET out = {}; SET out.balance = transactions.balance.bstr; SET out.donations_30days = donations.total_30.bstr; + SET out.donations_total = donations.total.bstr; SET out.last_donations = []; SET out.last_update = date.format(last_update, format => '%Y/%m/%d %H:%M:%S'); SET i=0; |