aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-05-15 22:56:35 +0000
committerNicolas Vigier <boklm@mageia.org>2013-05-15 22:56:35 +0000
commit037cf82e236211e8621b301a74aaf76399a7498b (patch)
tree1a4c1826273b5f5d0ba12065efe719daef22511c
parent3ea8e95cfe821384d3669d4c32ab7ee3556e0c30 (diff)
downloadmgatres-037cf82e236211e8621b301a74aaf76399a7498b.tar
mgatres-037cf82e236211e8621b301a74aaf76399a7498b.tar.gz
mgatres-037cf82e236211e8621b301a74aaf76399a7498b.tar.bz2
mgatres-037cf82e236211e8621b301a74aaf76399a7498b.tar.xz
mgatres-037cf82e236211e8621b301a74aaf76399a7498b.zip
Rename type to sc_name
git-svn-id: svn+ssh://svn.mageia.org/svn/soft/mga-treasurer/trunk@8265 5b7c3c08-40e5-403b-9995-ace06908e4af
-rwxr-xr-xmktreasurer14
-rw-r--r--tmpl/donations.rss4
-rw-r--r--tmpl/donations_by_month.html2
-rw-r--r--tmpl/donations_by_pa.html2
4 files changed, 11 insertions, 11 deletions
diff --git a/mktreasurer b/mktreasurer
index f46cc0c..5979c6d 100755
--- a/mktreasurer
+++ b/mktreasurer
@@ -47,12 +47,12 @@ sub transactions_list {
: @{$r->{Transaction}};
foreach my $tra (@transactions) {
my %d = (
- nb => $tra->{Nb},
- amount => $tra->{Am},
- date => epoch_date($tra->{Dt}),
- pa => $tra->{Pa},
- who => party_name($r, $tra->{Pa}),
- type => subcat_name($r, $tra->{Sca}, $tra->{Ca}),
+ nb => $tra->{Nb},
+ amount => $tra->{Am},
+ date => epoch_date($tra->{Dt}),
+ pa => $tra->{Pa},
+ who => party_name($r, $tra->{Pa}),
+ sc_name => subcat_name($r, $tra->{Sca}, $tra->{Ca}),
$tra->{No} ne '(null)' ? (notes => $tra->{No}) : (),
);
push @res, \%d;
@@ -87,7 +87,7 @@ sub donations_infos {
(values %{$res{by_pa}})) {
foreach my $don (@{$d->{donations}}) {
$d->{total} += $don->{amount};
- $d->{type}->{$don->{type}} += $don->{amount};
+ $d->{type}->{$don->{sc_name}} += $don->{amount};
}
}
return \%res;
diff --git a/tmpl/donations.rss b/tmpl/donations.rss
index 83bf083..f1c49b0 100644
--- a/tmpl/donations.rss
+++ b/tmpl/donations.rss
@@ -17,9 +17,9 @@
<guid isPermaLink="false">[% config.sitename %]:donations:[% don.nb %]</guid>
[%- USE date %]
<pubDate>[% date.format(don.date, format => '%a, %d %b %Y %H:%M:%S', gmt => 1) %] GMT</pubDate>
- <category>[% don.type %]</category>
+ <category>[% don.sc_name %]</category>
<description>
- [% don.who %] donated [% don.amount %] Euros ([% don.type %]).
+ [% don.who %] donated [% don.amount %] Euros ([% don.sc_name %]).
</description>
</item>
diff --git a/tmpl/donations_by_month.html b/tmpl/donations_by_month.html
index ed4af7f..f539d18 100644
--- a/tmpl/donations_by_month.html
+++ b/tmpl/donations_by_month.html
@@ -20,7 +20,7 @@
<ul>
[%- USE date(format='%Y/%m/%d') -%]
[% FOR don IN donations.by_month.$month.donations %]
- <li><b><a href="donations_p_[% don.pa %].html">[% don.who %]</a></b> donated <b>[% don.amount %]</b> Euros on [% date.format(don.date) %] ([% don.type %])</li>
+ <li><b><a href="donations_p_[% don.pa %].html">[% don.who %]</a></b> donated <b>[% don.amount %]</b> Euros on [% date.format(don.date) %] ([% don.sc_name %])</li>
[%- END -%]
</ul>
</body>
diff --git a/tmpl/donations_by_pa.html b/tmpl/donations_by_pa.html
index 585250e..befbc1e 100644
--- a/tmpl/donations_by_pa.html
+++ b/tmpl/donations_by_pa.html
@@ -20,7 +20,7 @@
<ul>
[%- USE date(format='%Y/%m/%d') -%]
[% FOR don IN donations.by_pa.$pa.donations %]
- <li><b>[% don.amount %]</b> Euros on [% date.format(don.date) %] ([% don.type %])</li>
+ <li><b>[% don.amount %]</b> Euros on [% date.format(don.date) %] ([% don.sc_name %])</li>
[%- END -%]
</ul>
</body>