aboutsummaryrefslogtreecommitdiffstats
path: root/tmpl/transactions_by_year.html
diff options
context:
space:
mode:
Diffstat (limited to 'tmpl/transactions_by_year.html')
-rw-r--r--tmpl/transactions_by_year.html306
1 files changed, 153 insertions, 153 deletions
diff --git a/tmpl/transactions_by_year.html b/tmpl/transactions_by_year.html
index d82127b..4c6d373 100644
--- a/tmpl/transactions_by_year.html
+++ b/tmpl/transactions_by_year.html
@@ -10,162 +10,162 @@
<h1 id='mgnavt'><a href="index.html">treasurer</a> ยป year : [% year %]</h1>
<div class="content">
- <h1>Mageia.Org accounts transactions for year [% year %]</h1>
- <h2>Summary</h2>
- <ul>
- <li>
- <b>Start balance</b>: [% transactions.by_year.$year.start_balance %] Euros
- </li>
- <li>
- <b>End balance</b>: [% transactions.by_year.$year.end_balance %] Euros
- </li>
- <li>
- <b>Revenues</b>: [% transactions.by_year.$year.revenues %] Euros
- </li>
- <li>
- <b>Expenses</b>: [% transactions.by_year.$year.expenses %] Euros
- </li>
- </ul>
- <h2>By category</h2>
-
- [%-
- SET ca_expenses = [];
- SET ca_expenses_names = [];
- SET ca_revenues = [];
- SET ca_revenues_names = [];
-
- IF transactions.by_year.$year.ca_revenues;
- FOREACH ca IN transactions.by_year.$year.ca_revenues.keys;
- ca_revenues.push(ca);
- ca_revenues_names.push(transactions.by_ca.$ca.c_name);
- END;
- END;
- IF transactions.by_year.$year.ca_expenses;
- FOREACH ca IN transactions.by_year.$year.ca_expenses.keys;
- ca_expenses.push(ca);
- ca_expenses_names.push(transactions.by_ca.$ca.c_name);
- END;
- END;
- -%]
- <h3>Expenses</h3>
- [% IF ca_expenses.size > 1 %]
- <canvas id="expenses_ca_bar_chart" height="300" width="[% 80 + ca_expenses.size * 65 %]"></canvas>
-
- <script>
-
- var barChartDataExpenses = {
- labels : ["[% ca_expenses_names.join('","') %]"],
- datasets : [
- {
- fillColor : "#e51b1b",
- strokeColor : "#f11111",
- data: [
- [%- FOR ca IN ca_expenses -%]
- [%- transactions.by_year.$year.ca_expenses.$ca -%]
- [%- IF ! loop.last() -%],[%- END -%]
- [%- END %]]
+ <h1>Mageia.Org accounts transactions for year [% year %]</h1>
+ <h2>Summary</h2>
+ <ul>
+ <li>
+ <b>Start balance</b>: [% transactions.by_year.$year.start_balance %] Euros
+ </li>
+ <li>
+ <b>End balance</b>: [% transactions.by_year.$year.end_balance %] Euros
+ </li>
+ <li>
+ <b>Revenues</b>: [% transactions.by_year.$year.revenues %] Euros
+ </li>
+ <li>
+ <b>Expenses</b>: [% transactions.by_year.$year.expenses %] Euros
+ </li>
+ </ul>
+ <h2>By category</h2>
+
+ [%-
+ SET ca_expenses = [];
+ SET ca_expenses_names = [];
+ SET ca_revenues = [];
+ SET ca_revenues_names = [];
+
+ IF transactions.by_year.$year.ca_revenues;
+ FOREACH ca IN transactions.by_year.$year.ca_revenues.keys;
+ ca_revenues.push(ca);
+ ca_revenues_names.push(transactions.by_ca.$ca.c_name);
+ END;
+ END;
+ IF transactions.by_year.$year.ca_expenses;
+ FOREACH ca IN transactions.by_year.$year.ca_expenses.keys;
+ ca_expenses.push(ca);
+ ca_expenses_names.push(transactions.by_ca.$ca.c_name);
+ END;
+ END;
+ -%]
+ <h3>Expenses</h3>
+ [% IF ca_expenses.size > 1 %]
+ <canvas id="expenses_ca_bar_chart" height="300" width="[% 80 + ca_expenses.size * 65 %]"></canvas>
+
+ <script>
+
+ var barChartDataExpenses = {
+ labels : ["[% ca_expenses_names.join('","') %]"],
+ datasets : [
+ {
+ fillColor : "#e51b1b",
+ strokeColor : "#f11111",
+ data: [
+ [%- FOR ca IN ca_expenses -%]
+ [%- transactions.by_year.$year.ca_expenses.$ca -%]
+ [%- IF ! loop.last() -%],[%- END -%]
+ [%- END %]]
+ }
+ ]
}
- ]
- }
-
- var myLine = new Chart(document.getElementById("expenses_ca_bar_chart").getContext("2d")).Bar(barChartDataExpenses);
-
- </script>
- [% END %]
- <ul>
- [%- FOR ca IN ca_expenses %]
- <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_year.$year.ca_expenses.$ca %] Euros</li>
- [%- END -%]
- </ul>
-
- <h3>Revenues</h3>
- [% IF ca_revenues.size > 1 %]
- <canvas id="revenues_ca_bar_chart" height="300" width="[% 80 + ca_revenues.size * 65 %]"></canvas>
-
- <script>
- var barChartDataRevenues = {
- labels : ["[% ca_revenues_names.join('","') %]"],
- datasets : [
- {
- fillColor : "#151f79",
- strokeColor : "#101333",
- data: [
- [%- FOR ca IN ca_revenues -%]
- [%- transactions.by_year.$year.ca_revenues.$ca -%]
- [%- IF ! loop.last() -%],[%- END -%]
- [%- END %]]
+
+ var myLine = new Chart(document.getElementById("expenses_ca_bar_chart").getContext("2d")).Bar(barChartDataExpenses);
+
+ </script>
+ [% END %]
+ <ul>
+ [%- FOR ca IN ca_expenses %]
+ <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_year.$year.ca_expenses.$ca %] Euros</li>
+ [%- END -%]
+ </ul>
+
+ <h3>Revenues</h3>
+ [% IF ca_revenues.size > 1 %]
+ <canvas id="revenues_ca_bar_chart" height="300" width="[% 80 + ca_revenues.size * 65 %]"></canvas>
+
+ <script>
+ var barChartDataRevenues = {
+ labels : ["[% ca_revenues_names.join('","') %]"],
+ datasets : [
+ {
+ fillColor : "#151f79",
+ strokeColor : "#101333",
+ data: [
+ [%- FOR ca IN ca_revenues -%]
+ [%- transactions.by_year.$year.ca_revenues.$ca -%]
+ [%- IF ! loop.last() -%],[%- END -%]
+ [%- END %]]
+ }
+ ]
}
- ]
- }
-
- var myLine = new Chart(document.getElementById("revenues_ca_bar_chart").getContext("2d")).Bar(barChartDataRevenues);
-
- </script>
- [% END %]
- <ul>
- [%- FOR ca IN ca_revenues %]
- <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_year.$year.ca_revenues.$ca %] Euros</li>
- [%- END -%]
- </ul>
-
- <h2>Monthly reports</h2>
-
- <canvas id="accounts_history_bar_chart" height="250" width="[% 80 + transactions.by_year.$year.months.size * 65 %]"></canvas>
-
- <script>
-
- var barChartData = {
- labels : ["[% transactions.by_year.$year.months.sort.join('","') %]"],
- datasets : [
- {
- fillColor : "#151f79",
- strokeColor : "#101333",
- data : [
- [%- FOR month IN transactions.by_year.$year.months.sort -%]
- [%- transactions.by_month.$month.revenues -%]
- [%- IF ! loop.last() -%],[%- END -%]
- [%- END %]]
- },
- {
- fillColor : "#e51b1b",
- strokeColor : "#f11111",
- data: [
- [%- FOR month IN transactions.by_year.$year.months.sort -%]
- [%- transactions.by_month.$month.expenses -%]
- [%- IF ! loop.last() -%],[%- END -%]
- [%- END %]]
+
+ var myLine = new Chart(document.getElementById("revenues_ca_bar_chart").getContext("2d")).Bar(barChartDataRevenues);
+
+ </script>
+ [% END %]
+ <ul>
+ [%- FOR ca IN ca_revenues %]
+ <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_year.$year.ca_revenues.$ca %] Euros</li>
+ [%- END -%]
+ </ul>
+
+ <h2>Monthly reports</h2>
+
+ <canvas id="accounts_history_bar_chart" height="250" width="[% 80 + transactions.by_year.$year.months.size * 65 %]"></canvas>
+
+ <script>
+
+ var barChartData = {
+ labels : ["[% transactions.by_year.$year.months.sort.join('","') %]"],
+ datasets : [
+ {
+ fillColor : "#151f79",
+ strokeColor : "#101333",
+ data : [
+ [%- FOR month IN transactions.by_year.$year.months.sort -%]
+ [%- transactions.by_month.$month.revenues -%]
+ [%- IF ! loop.last() -%],[%- END -%]
+ [%- END %]]
+ },
+ {
+ fillColor : "#e51b1b",
+ strokeColor : "#f11111",
+ data: [
+ [%- FOR month IN transactions.by_year.$year.months.sort -%]
+ [%- transactions.by_month.$month.expenses -%]
+ [%- IF ! loop.last() -%],[%- END -%]
+ [%- END %]]
+ }
+ ]
+
}
- ]
-
- }
-
- var myLine = new Chart(document.getElementById("accounts_history_bar_chart").getContext("2d")).Bar(barChartData);
-
- </script>
-
- <ul>
- [%- FOR month IN transactions.by_month.keys.sort -%]
- [%- IF transactions.by_month.$month.year == year -%]
- <li><a href="m_[% month %].html">[% month %]</a></li>
-
- [%- END -%]
- [%- END -%]
- </ul>
- <h2>Details</h2>
- <table border="1">
- <tr>
- <th>Date</th>
- <th>Amount</th>
- <th>Account</th>
- <th>Who</th>
- <th>Notes</th>
- <th>Category</th>
- </tr>
- [%- USE date(format='%Y/%m/%d') -%]
- [% FOR tra IN transactions.by_year.$year.transactions.sort('date').reverse %]
- [%- INCLUDE tra_row.html %]
- [%- END -%]
- </table>
+
+ var myLine = new Chart(document.getElementById("accounts_history_bar_chart").getContext("2d")).Bar(barChartData);
+
+ </script>
+
+ <ul>
+ [%- FOR month IN transactions.by_month.keys.sort -%]
+ [%- IF transactions.by_month.$month.year == year -%]
+ <li><a href="m_[% month %].html">[% month %]</a></li>
+
+ [%- END -%]
+ [%- END -%]
+ </ul>
+ <h2>Details</h2>
+ <table border="1">
+ <tr>
+ <th>Date</th>
+ <th>Amount</th>
+ <th>Account</th>
+ <th>Who</th>
+ <th>Notes</th>
+ <th>Category</th>
+ </tr>
+ [%- USE date(format='%Y/%m/%d') -%]
+ [% FOR tra IN transactions.by_year.$year.transactions.sort('date').reverse %]
+ [%- INCLUDE tra_row.html %]
+ [%- END -%]
+ </table>
</div>
</body>
</html>