From c6aa1602caca738ac79fe2b242e8fbe7dad5afff Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Thu, 16 May 2013 20:27:06 +0000 Subject: Add per person transactions pages git-svn-id: svn+ssh://svn.mageia.org/svn/soft/mga-treasurer/trunk@8288 5b7c3c08-40e5-403b-9995-ace06908e4af --- NEWS | 1 + mktreasurer | 2 +- tmpl/tra_row.html | 2 +- tmpl/transactions_by_pa.html | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 tmpl/transactions_by_pa.html diff --git a/NEWS b/NEWS index 0007bf2..dc3a529 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ - add yearly and monthly transactions pages - add per account transactions pages - add per category transactions pages +- add per person transactions pages Version 0.2 diff --git a/mktreasurer b/mktreasurer index dd8c08e..eafe58e 100755 --- a/mktreasurer +++ b/mktreasurer @@ -137,7 +137,7 @@ sub transactions_infos { } $res{balance} += $tra->{amount}; } - foreach my $by ('by_ac', 'by_year', 'by_month', 'by_ca') { + foreach my $by ('by_ac', 'by_year', 'by_month', 'by_ca', 'by_pa') { foreach my $t (values %{$res{$by}}) { $t->{balance} = new Math::BigFloat 0; $t->{revenues} = new Math::BigFloat 0; diff --git a/tmpl/tra_row.html b/tmpl/tra_row.html index 61b6f46..34b755a 100644 --- a/tmpl/tra_row.html +++ b/tmpl/tra_row.html @@ -2,7 +2,7 @@ [% date.format(tra.date) %] [% tra.amount %] [% tra.account %] - [% tra.who %] + [% IF tra.pa %][% tra.who %][% END %] [% IF tra.trt %] Internal transfert [% ELSE %] diff --git a/tmpl/transactions_by_pa.html b/tmpl/transactions_by_pa.html new file mode 100644 index 0000000..6b391ec --- /dev/null +++ b/tmpl/transactions_by_pa.html @@ -0,0 +1,33 @@ + + + + [% config.sitename %]: Transactions for [% who %] + + +

Mageia.Org transactions for [% who %]

+

Summary

+ +

Details

+ + + + + + + + + + [%- USE date(format='%Y/%m/%d') -%] + [% FOR tra IN transactions.by_pa.$pa.transactions.sort('date').reverse %] + [%- INCLUDE tra_row.html %] + [%- END -%] +
DateAmountAccountWhoNotesCategory
+ + -- cgit v1.2.1