aboutsummaryrefslogtreecommitdiffstats
path: root/en/about/reports
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-05-11 10:10:23 +0000
committerRomain d'Alverny <rda@mageia.org>2012-05-11 10:10:23 +0000
commita9373682ce09fe316c7622fd0d657a552d33009d (patch)
tree3a95590c8e9d3745ac189374673324f6d0d9a869 /en/about/reports
parent7e146d871dd476e59301f51036e4f9b53b7fbfdf (diff)
downloadwww-a9373682ce09fe316c7622fd0d657a552d33009d.tar
www-a9373682ce09fe316c7622fd0d657a552d33009d.tar.gz
www-a9373682ce09fe316c7622fd0d657a552d33009d.tar.bz2
www-a9373682ce09fe316c7622fd0d657a552d33009d.tar.xz
www-a9373682ce09fe316c7622fd0d657a552d33009d.zip
updated fi report section (layout)
Diffstat (limited to 'en/about/reports')
-rw-r--r--en/about/reports/2010/index.php5
-rw-r--r--en/about/reports/2011/index.php335
-rw-r--r--en/about/reports/2011/mageia-financial-report-2011.csv11
-rw-r--r--en/about/reports/2012/index.php29
-rw-r--r--en/about/reports/2012/mageia-financial-report-2012.csv85
-rw-r--r--en/about/reports/index.php5
-rw-r--r--en/about/reports/template.php373
7 files changed, 518 insertions, 325 deletions
diff --git a/en/about/reports/2010/index.php b/en/about/reports/2010/index.php
index 5abac7999..2e822d485 100644
--- a/en/about/reports/2010/index.php
+++ b/en/about/reports/2010/index.php
@@ -9,11 +9,10 @@
<link rel="stylesheet" type="text/css" href="/g/style/all.css" />
<?php include '../../../../analytics.php'; ?>
</head>
-<body>
+<body class="about">
<?php include '../../../../langs.php'; ?>
-
+ <h1 id="mgnavt"><a href="../">Activity Reports</a> &raquo; 2010 Financial Report</h1>
<div id="doc" class="yui-t7">
- <div id="hd" role="banner"><h1><a id="logo" href="/"><span>Mageia</span></a> <span class="lsep">|</span> <span class="subh">Financial Report (2010)</span></h1></div>
<div id="bd" role="main">
<div class="yui-g">
<div class="para values">
diff --git a/en/about/reports/2011/index.php b/en/about/reports/2011/index.php
index 144687024..9418b7565 100644
--- a/en/about/reports/2011/index.php
+++ b/en/about/reports/2011/index.php
@@ -1,321 +1,30 @@
<?php
+/** Mageia.org 2011 fi report. */
-$_months = array(
- 1 => 'January', 2 => 'February', 3 => 'March',
- 4 => 'April', 5 => 'May', 6 => 'June',
- 7 => 'July', 8 => 'August', 9 => 'September',
- 10 => 'October', 11 => 'November', 12 => 'December'
-);
+$year = 2011;
+$source_csv = 'mageia-financial-report-2011.csv';
+$page_kw = 'mageia, financial report, 2011, revenues, expenses';
-$data = file('mageia-financial-report-2011.csv');
-$parsed = array();
-foreach ($data as $l) {
- if (trim($l) == ',,,,,,')
- continue;
+$js_options_hAxis = '{title: "2011"}';
+$js_data2_values = <<<S
+ ['2010', 8801.66, 1277.77],
+ ['2011', 11154.02, 8327.25]
+S;
- $l = str_getcsv(str_replace(array(',,,', ",\n"), '', $l));
- if (substr($l[0], 0, 2) == '# ') {
- $tag = $l[0];
- $parent = $tag;
- } elseif (substr($l[0], 0, 2) == '##') {
- $tag = $parent . ' > ' . $l[0];
- } else {
- $parsed[$tag][] = $l;
- }
-}
+$intro = <<<S
+ <p>Here is our financial report for 2011.</p>
-foreach ($parsed as $tag => $values) {
- $val2 = array();
- $tag2 = strtolower($tag);
- $teststr = strlen($tag) > 12 ? substr($tag2, 0, 13) : null;
- foreach ($values as $v) {
- if ($tag2 == "# head"
- || $teststr == "# account bal"
- || $teststr == "# income stat"
- || $teststr == "# balance she"
- || $tag2 == '## expenses'
- || $tag2 == '## revenues'
- || $tag2 == '## liabilities'
- || $tag2 == '## assets') {
- $val2[$v[0]] = $v[1];
- } else {
- $val2[] = $v;
- }
- }
+ <ul>
+ <li>Read the <a href="mageia_rapport_financier_2011_fr.pdf" hreflang="fr">French, original report</a>
+ or the <a href="mageia_financial_report_2011_en.pdf" hreflang="en">English translation</a>
+ (both are PDF documents).</li>
+ <li>Get the <a href="mageia-financial-report-2011.csv">raw report data</a>
+ (CSV document, licensed under <a href="http://opendatacommons.org/licenses/odbl/1.0/">ODbL 1.0</a>).
+ The rest of this page is built from this data.</li>
+ </ul>
+S;
- $parsed[$tag] = $val2;
-}
-$flow = array();
+$last_known_account_title = sprintf('Account status on December 31<sup>st</sup>, %s', $year);
-$list = array();
-$count = array();
-foreach ($parsed['# Expenses details > ## Monthly summary'] as $line) {
- $list[] = $line[2];
- $count[] = $line[1];
-}
-unset($list[0]);
-unset($list[13]);
-unset($count[0]);
-unset($count[13]);
+include '../template.php';
-$flow = array(
- 'expenses' => $list,
- 'expenses_op' => $count,
- 'revenue' => null,
- 'revenue_op' => null
-);
-
-$list = array();
-$count = array();
-foreach ($parsed['# Income details > ## Donations monthly summary'] as $line) {
- $list[] = $line[2];
- $count[] = $line[1];
-}
-unset($list[0]);
-unset($list[13]);
-unset($count[0]);
-unset($count[13]);
-
-$flow['revenue'] = $list;
-$flow['revenue_op'] = $count;
-
-
-?><!DOCTYPE html>
-<html dir="ltr" lang="en">
-<head>
- <meta charset="utf-8">
- <title>Mageia 2011 Financial Report</title>
- <meta name="description" content="Financial report for Mageia.org activity in 2011.">
- <meta name="keywords" content="mageia, financial report, 2011, revenues, expenses">
- <meta name="author" content="Mageia">
- <link rel="stylesheet" type="text/css" href="/g/style/all.css">
- <?php include '../../../../analytics.php'; ?>
- <!--Load the AJAX API-->
- <script type="text/javascript" src="https://www.google.com/jsapi"></script>
- <script type="text/javascript">
- google.load('visualization', '1', {packages: ['corechart']});
- </script>
- <script type="text/javascript">
- function drawVisualization() {
- // Some raw data (not necessarily accurate)
- var data = google.visualization.arrayToDataTable([
- ['Month', 'Revenues', 'Expenses'],
- <?php
- $arr = array();
- $qRevenues = 0;
- $qExpenses = 0;
- $i = 0;
- $j = 0;
- $qarr = array();
- foreach ($flow['revenue'] as $month => $val) {
- $arr[] = sprintf("['%s', %s, %s]", $_months[$month], str_replace(',', '.', $val), str_replace(',', '.', $flow['expenses'][$month]));
- $i += 1;
- if ($i == 3) {
- $j += 1;
- $qarr[] = sprintf("['%s', %s, %s]", 'Q' . $j, $qRevenues, $qExpenses);
- $qRevenues = 0;
- $qExpenses = 0;
- $i = 0;
- } else {
- $qRevenues += str_replace(',', '.', $val);
- $qExpenses += str_replace(',', '.', $flow['expenses'][$month]);
- }
- }
- echo implode(', ', $arr);
- ?>
- ]);
-
- var options = {
- title : 'Monthly Cash Flow',
- vAxis: {title: "Amount (€)"},
- hAxis: {title: "2011"},
- seriesType: "bars",
- };
-
- var chart = new google.visualization.ComboChart(document.getElementById('chart_div'));
- chart.draw(data, options);
-
- var data2 = google.visualization.arrayToDataTable([
- ['Year', 'Revenues', 'Expenses'],
- ['2010', 8801.66, 1277.77],
- ['2011', 11154.02, 8327.25]
- ]);
- var options2 = {
- title : 'Yearly Cash Flow',
- vAxis: {title: "Amount (€)"},
- hAxis: {title: "Years"},
- seriesType: "bars"
- };
-
- var chart2 = new google.visualization.ComboChart(document.getElementById('chart2'));
- chart2.draw(data2, options2);
-
- var data3 = google.visualization.arrayToDataTable([
- ['Quarter', 'Revenues', 'Expenses'],
- <?php echo implode(', ', $qarr); ?>
- ]);
- var options3 = {
- title : 'Quarterly Cash Flow',
- vAxis: {title: "Amount (€)"},
- hAxis: {title: "2011"},
- seriesType: "bars"
- };
-
- var chart3 = new google.visualization.ComboChart(document.getElementById('chart3'));
- chart3.draw(data3, options3);
- }
- google.setOnLoadCallback(drawVisualization);
- </script>
-</head>
-<body>
- <?php include '../../../../langs.php'; ?>
-
- <div id="doc4" class="yui-t7">
- <div id="hd" role="banner"><h1><a id="logo" href="/en/"><span>Mageia</span></a> <span class="lsep">|</span> <span class="subh">2011 Financial Report</span></h1></div>
- <div id="bd" role="main">
- <div class="yui-g">
- <div class="para values">
- <p>Here is our financial report for 2011.</p>
-
- <ul>
- <li>Read the <a href="mageia_rapport_financier_2011_fr.pdf" hreflang="fr">French, original report</a>
- or the <a href="mageia_financial_report_2011_en.pdf" hreflang="en">English translation</a>
- (both are PDF documents).</li>
- <li>Get the <a href="mageia-financial-report-2011.csv">raw report data</a>
- (CSV document, licensed under <a href="http://opendatacommons.org/licenses/odbl/1.0/">ODbL 1.0</a>).
- The rest of this page is built from this data.</li>
- </ul>
-
- <p>Last updated on <?php echo $parsed['# Head']['last updated']; ?>.</p>
-
- <hr>
- <h2>Account status on December 31<sup>st</sup>, 2011</h2>
- <?php
- $v = $parsed['# Account balance on 2011/12/31'];
- echo '<table class="fr-table">';
- foreach ($v as $k => $w) {
- $s .= sprintf('<tr><td>%s</td><td class="money"><span class="currency">EUR</span>&nbsp;%s</td></tr>', $k, $w);
- }
- $s .= '</table>';
- echo $s;
- ?>
-
- <hr>
-
- <h2>Cash flow</h2>
- <div id="chart_div" style="width: 650px; height: 280px;"></div>
- <div id="chart3" style="width: 650px; height: 200px;"></div>
- <div id="chart2" style="width: 650px; height: 200px;"></div>
- <hr>
-
- <h2>Income statement</h2>
- <table>
- <tr><th>Revenues</th><th>Expenses</th></tr>
- <tr><td>
- <table class="fr-table">
- <?php
- $s = '';
- foreach ($parsed['# Income Statement > ## Revenues'] as $k => $v)
- $s .= sprintf('<tr><td>%s</td><td class="money"><span class="currency">EUR</span>&nbsp;%s</td></tr>', $k, $v);
-
- echo $s;
- ?>
- </table>
- </td><td>
- <table class="fr-table">
- <?php
- $s = '';
- foreach ($parsed['# Income Statement > ## Expenses'] as $k => $v)
- $s .= sprintf('<tr><td>%s</td><td class="money"><span class="currency">EUR</span>&nbsp;%s</td></tr>', $k, $v);
-
- echo $s;
- ?>
- </table>
- </td></tr>
- </table>
-
- <hr>
-
- <h2>Balance sheet</h2>
- <table>
- <tr><th>Revenues</th><th>Expenses</th></tr>
- <tr><td>
- <table>
- <?php
- $s = '';
- foreach ($parsed['# Balance Sheet (incomplete) > ## Assets'] as $k => $v)
- $s .= sprintf('<tr><td>%s</td><td>%s</td></tr>', $k, $v);
-
- echo $s;
- ?>
- </table>
- </td><td>
- <table>
- <?php
- $s = '';
- foreach ($parsed['# Balance Sheet (incomplete) > ## Liabilities'] as $k => $v)
- $s .= sprintf('<tr><td>%s</td><td>%s</td></tr>', $k, $v);
-
- echo $s;
- ?>
- </table>
- </td></tr>
- </table>
- <hr>
-
- <h2>Expenses</h2>
-
- <?php
-
- $v = $parsed['# Expenses details > ## Monthly summary'];
- echo '<table class="fr-table">';
- foreach ($v as $line) {
- echo sprintf('<tr><td>%s</td><td>%s</td><td class="money"><span class="currency">EUR</span>&nbsp;%s</td></tr>',
- $_months[$line[0]], $line[1], $line[2]);
- }
- echo '</table>';
- ?>
-
- <h3>Details</h3>
-
- <table class="fr-table">
- <?php
- $v = $parsed['# Expenses details > ## More details'];
- foreach ($v as $line) {
- echo sprintf('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td class="money"><span class="currency">EUR</span>&nbsp;%s</td></tr>',
- $line[0], $line[1],
- $line[2], $line[3],
- $line[4],
- $line[5]);
- }
- ?>
- </table>
- <hr>
- <h2>Income, donations</h2>
- <?php
-
- $v = $parsed['# Income details > ## Donations monthly summary'];
- echo '<table class="fr-table">';
- foreach ($v as $line) {
- echo sprintf('<tr><td>%s</td><td>%s</td>
- <td class="money"><span class="currency">EUR</span>&nbsp;%s</td>
- <td class="money"><span class="currency">EUR</span>&nbsp;%s</td>
- <td class="money"><span class="currency">EUR</span>&nbsp;%s</td>
- <td class="money"><span class="currency">EUR</span>&nbsp;%s</td>
- <td class="money"><span class="currency">EUR</span>&nbsp;%s</td></tr>',
- $_months[$line[0]], $line[1], $line[2],
- $line[3],
- $line[4],
- $line[5], $line[6]);
- }
- echo '</table>';
- ?>
-
- <hr>
- <p>Feel free to <a href="/en/contact/">contact us</a> regarding this report.</p>
- </div>
- </div>
- </div>
- </div>
-</body>
-</html>
diff --git a/en/about/reports/2011/mageia-financial-report-2011.csv b/en/about/reports/2011/mageia-financial-report-2011.csv
index 94cc93a01..9b83b3961 100644
--- a/en/about/reports/2011/mageia-financial-report-2011.csv
+++ b/en/about/reports/2011/mageia-financial-report-2011.csv
@@ -9,7 +9,7 @@
"currency","EUR",,,,,
"url","http://www.mageia.org/en/about/reports/",,,,,
"licence","ODbL-1.0","This financial report data is made available under the Open Database License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in individual contents of the database are licensed under the Database Contents License: http://opendatacommons.org/licenses/dbcl/1.0/",,,,
-"last updated",01/03/12,,,,,
+"last updated",2012/05/11,,,,,
"comment","This is a first attempt to provide open and direct access to Mageia financial data. We will try to improve on it, feel free to suggest improvements in format, detail, presentation.",,,,,
,,,,,,
"",,,,,,
@@ -27,14 +27,13 @@
"Total of revenues","11154,02",,,,,
,,,,,,
"## Expenses",,,,,,
-"FOSDEM purchases","1932,14",,,,,
-"Solutions Linux purchases","159,25",,,,,
"Hardware (servers)","5500,45",,,,,
-"Shipments","126,98",,,,,
-"FOSDEM transporation & accomodation","166,5",,,,,
-"Administrative fees",44,,,,,
+"Events (FOSDEM, Solutions Linux)","2091,39",,,,,
"Trademark registration",280,,,,,
+"Transporation & accomodation","166,5",,,,,
+"Shipments","126,98",,,,,
"Assoc. Membership",100,,,,,
+"Administrative fees",44,,,,,
"Total of expenses","8327,25",,,,,
,,,,,,
"Net Income","2826,77",,,,,
diff --git a/en/about/reports/2012/index.php b/en/about/reports/2012/index.php
new file mode 100644
index 000000000..799cbd770
--- /dev/null
+++ b/en/about/reports/2012/index.php
@@ -0,0 +1,29 @@
+<?php
+/** Mageia.org 2012 fi report. */
+
+$year = 2012;
+$source_csv = 'mageia-financial-report-2012.csv';
+$page_kw = 'mageia, financial report, 2012, revenues, expenses';
+
+$js_options_hAxis = '{title: "2012"}';
+$js_data2_values = <<<S
+ ['2010', 8801.66, 1277.77],
+ ['2011', 11154.02, 8327.25],
+ ['2012', 0, 0]
+S;
+
+$intro = <<<S
+ <p>Here is our current financial report for 2012.</p>
+
+ <ul>
+ <li>Get the <a href="mageia-financial-report-2012.csv">raw report data</a>
+ (CSV document, licensed under <a href="http://opendatacommons.org/licenses/odbl/1.0/">ODbL 1.0</a>).
+ The rest of this page is built from this data.</li>
+ </ul>
+S;
+
+$last_known_account_title = sprintf('Account status on December 31<sup>st</sup>, %s', $year);
+$last_known_account_title = sprintf('Last known account status');
+
+include '../template.php';
+
diff --git a/en/about/reports/2012/mageia-financial-report-2012.csv b/en/about/reports/2012/mageia-financial-report-2012.csv
new file mode 100644
index 000000000..ca6679fe8
--- /dev/null
+++ b/en/about/reports/2012/mageia-financial-report-2012.csv
@@ -0,0 +1,85 @@
+"# Head",,,,,,
+"title","Mageia.org financial report for year 2012",,,,,
+"org","mageia.org",,,,,
+"owner","mageia.org",,,,,
+"manager","mageia.org treasurer",,,,,
+"contact","See http://www.mageia.org/en/about/reports/",,,,,
+"type","financial report",,,,,
+"year",2012,,,,,
+"currency","EUR",,,,,
+"url","http://www.mageia.org/en/about/reports/",,,,,
+"licence","ODbL-1.0","This financial report data is made available under the Open Database License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in individual contents of the database are licensed under the Database Contents License: http://opendatacommons.org/licenses/dbcl/1.0/",,,,
+"last updated",2012/04/02,,,,,
+"comment","This is a first attempt to provide open and direct access to Mageia financial data. We will try to improve on it, feel free to suggest improvements in format, detail, presentation.",,,,,
+,,,,,,
+"",,,,,,
+"# Account balance",,,,,,
+"total","8166,37",,,,,
+"main account","413,13",,,,,
+"paypal","653,24",,,,,
+"saving account",7100,,,,,
+,,,,,,
+"# Income Statement",,,,,,
+,,,,,,
+"## Revenues",,,,,,
+"Donations","0",,,,,
+"Bank interests","0",,,,,
+"Total of revenues","0",,,,,
+,,,,,,
+"## Expenses",,,,,,
+"Total of expenses","0",,,,,
+,,,,,,
+"Net Income","0",,,,,
+,,,,,,
+,,,,,,
+"# Balance Sheet (incomplete)",,,,,,
+,,,,,,
+"## Liabilities",,,,,,
+"Donations","0",,,,,
+,,,,,,
+"## Assets",,,,,,
+"Hardware, servers","TBD",,,,,
+"Promotional materials","TBD",,,,,
+"Cash","0",,,,,
+,,,,,,
+,,,,,,
+"# Income details",,,,,,
+"## Donations monthly summary",,,,,,
+"month","count","total amount","check","transfer","paypal","cash"
+1,0,0,0,0,0,0
+2,0,0,0,0,0,0
+3,0,0,0,0,0,0
+4,0,0,0,0,0,0
+5,0,0,0,0,0,0
+6,0,0,0,0,0,0
+7,0,0,0,0,0,0
+8,0,0,0,0,0,0
+9,0,0,0,0,0,0
+10,0,0,0,0,0,0
+11,0,0,0,0,0,0
+12,0,0,0,0,0,0
+,,,,,,
+,,,,,,
+"# Expenses details",,,,,,
+"## Monthly summary",,,,,,
+"month","count","total amount",,,,
+1,0,0,0,,
+2,0,0,0,,
+3,0,0,0,,
+4,0,0,0,,
+5,0,0,0,,
+6,0,0,0,,
+7,0,0,0,,
+8,0,0,0,,
+9,0,0,0,,
+10,0,0,0,,,
+11,0,0,0,,,
+12,0,0,0,,,
+"total",,,,,,
+,,,,,,
+"## More details",,,,,,
+"date","invoice date","reference","category","description","amount",
+
+,,,,,,
+,,,,,,
+"# That's all folks!",,,,,,
diff --git a/en/about/reports/index.php b/en/about/reports/index.php
index 58de0a20c..49c30df91 100644
--- a/en/about/reports/index.php
+++ b/en/about/reports/index.php
@@ -9,11 +9,10 @@
<link rel="stylesheet" type="text/css" href="/g/style/all.css">
<?php include '../../../analytics.php'; ?>
</head>
-<body>
+<body class="about">
<?php include '../../../langs.php'; ?>
-
+ <h1 id="mgnavt">Activity Reports</h1>
<div id="doc" class="yui-t7">
- <div id="hd" role="banner"><h1><a id="logo" href="/en/"><span>Mageia</span></a> <span class="lsep">|</span> <span class="subh">Activity reports</span></h1></div>
<div id="bd" role="main">
<div class="yui-g">
<div class="para values">
diff --git a/en/about/reports/template.php b/en/about/reports/template.php
new file mode 100644
index 000000000..dc5e90bb2
--- /dev/null
+++ b/en/about/reports/template.php
@@ -0,0 +1,373 @@
+<?php
+/**
+ * Template for financial reports.
+ * See 201?/index.php scripts including it.
+ *
+ * TODO rewrite this properly, of course. Still use a CSV? Use a clean template anyway.
+*/
+$_months = array(
+ 1 => 'January', 2 => 'February', 3 => 'March',
+ 4 => 'April', 5 => 'May', 6 => 'June',
+ 7 => 'July', 8 => 'August', 9 => 'September',
+ 10 => 'October', 11 => 'November', 12 => 'December'
+);
+
+$data = file($source_csv);
+$parsed = array();
+foreach ($data as $l) {
+ if (trim($l) == ',,,,,,')
+ continue;
+
+ $l = str_getcsv(str_replace(array(',,,', ",\n"), '', $l));
+ if (substr($l[0], 0, 2) == '# ') {
+ $tag = $l[0];
+ $parent = $tag;
+ } elseif (substr($l[0], 0, 2) == '##') {
+ $tag = $parent . ' > ' . $l[0];
+ } else {
+ $parsed[$tag][] = $l;
+ }
+}
+
+foreach ($parsed as $tag => $values) {
+ $val2 = array();
+ $tag2 = strtolower($tag);
+ $teststr = strlen($tag) > 12 ? substr($tag2, 0, 13) : null;
+ foreach ($values as $v) {
+ if ($tag2 == "# head"
+ || $teststr == "# account bal"
+ || $teststr == "# income stat"
+ || $teststr == "# balance she"
+ || $tag2 == '## expenses'
+ || $tag2 == '## revenues'
+ || $tag2 == '## liabilities'
+ || $tag2 == '## assets') {
+ $val2[$v[0]] = $v[1];
+ } else {
+ $val2[] = $v;
+ }
+ }
+
+ $parsed[$tag] = $val2;
+}
+$flow = array();
+
+$list = array();
+$count = array();
+foreach ($parsed['# Expenses details > ## Monthly summary'] as $line) {
+ $list[] = $line[2];
+ $count[] = $line[1];
+}
+unset($list[0]);
+unset($list[13]);
+unset($count[0]);
+unset($count[13]);
+
+$flow = array(
+ 'expenses' => $list,
+ 'expenses_op' => $count,
+ 'revenue' => null,
+ 'revenue_op' => null
+);
+
+$list = array();
+$count = array();
+foreach ($parsed['# Income details > ## Donations monthly summary'] as $line) {
+ $list[] = $line[2];
+ $count[] = $line[1];
+}
+unset($list[0]);
+unset($list[13]);
+unset($count[0]);
+unset($count[13]);
+
+$flow['revenue'] = $list;
+$flow['revenue_op'] = $count;
+
+
+?><!DOCTYPE html>
+<html dir="ltr" lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Mageia.org <?php echo $year; ?> Financial Report</title>
+ <meta name="description" content="Financial report for Mageia.org activity in <?php echo $year?>">
+ <meta name="keywords" content="<?php echo $page_kw;?>">
+ <meta name="author" content="Mageia.org">
+ <link rel="stylesheet" type="text/css" href="/g/style/all.css">
+ <?php include '../../../../analytics.php'; ?>
+ <!--Load the AJAX API-->
+ <script type="text/javascript" src="https://www.google.com/jsapi"></script>
+ <script type="text/javascript">
+ google.load('visualization', '1', {packages: ['corechart']});
+ </script>
+ <script type="text/javascript">
+ function drawVisualization() {
+ // Some raw data (not necessarily accurate)
+ var data = google.visualization.arrayToDataTable([
+ ['Month', 'Revenues', 'Expenses'],
+ <?php
+ $arr = array();
+ $qRevenues = 0;
+ $qExpenses = 0;
+ $i = 0;
+ $j = 0;
+ $qarr = array();
+ foreach ($flow['revenue'] as $month => $val) {
+ $arr[] = sprintf("['%s', %s, %s]", $_months[$month], str_replace(',', '.', $val), str_replace(',', '.', $flow['expenses'][$month]));
+ $i += 1;
+ if ($i == 3) {
+ $j += 1;
+ $qarr[] = sprintf("['%s', %s, %s]", 'Q' . $j, $qRevenues, $qExpenses);
+ $qRevenues = 0;
+ $qExpenses = 0;
+ $i = 0;
+ } else {
+ $qRevenues += str_replace(',', '.', $val);
+ $qExpenses += str_replace(',', '.', $flow['expenses'][$month]);
+ }
+ }
+ echo implode(', ', $arr);
+ ?>
+ ]);
+
+ var options = {
+ title : 'Monthly Cash Flow',
+ vAxis: {title: "Amount (€)"},
+ hAxis: {title: "<?php echo $year?>"},
+ seriesType: "bars",
+ };
+
+ var chart = new google.visualization.ComboChart(document.getElementById('chart_div'));
+ chart.draw(data, options);
+
+ var data2 = google.visualization.arrayToDataTable([
+ ['Year', 'Revenues', 'Expenses'],
+ <?php echo $js_data2_values; ?>
+ ]);
+ var options2 = {
+ title : 'Yearly Cash Flow',
+ vAxis: {title: "Amount (€)"},
+ hAxis: {title: "Years"},
+ seriesType: "bars"
+ };
+
+ var chart2 = new google.visualization.ComboChart(document.getElementById('chart2'));
+ chart2.draw(data2, options2);
+
+ var data3 = google.visualization.arrayToDataTable([
+ ['Quarter', 'Revenues', 'Expenses'],
+ <?php echo implode(', ', $qarr); ?>
+ ]);
+ var options3 = {
+ title : 'Quarterly Cash Flow',
+ vAxis: {title: "Amount (€)"},
+ hAxis: {title: "<?php echo $year?>"},
+ seriesType: "bars"
+ };
+
+ var chart3 = new google.visualization.ComboChart(document.getElementById('chart3'));
+ chart3.draw(data3, options3);
+ }
+ google.setOnLoadCallback(drawVisualization);
+ </script>
+</head>
+<body class="about reports">
+ <?php include '../../../../langs.php'; ?>
+ <h1 id="mgnavt"><a href="../">Activity Reports</a> &raquo; <?php echo $year; ?> Financial Report</h1>
+ <div id="doc4" class="yui-t7">
+ <div id="bd" role="main">
+ <div class="yui-g">
+ <div class="para values">
+ <?php echo $intro;?>
+
+ <p>Last updated on <?php echo $parsed['# Head']['last updated']; ?>.</p>
+ <p>All amounts are in EURO.</p>
+ <hr>
+ <h2><?php echo $last_known_account_title?></h2>
+ <?php
+ $k = sprintf('# Account balance on %d/12/31', $year);
+ $k = array_key_exists($k, $parsed) ? $k : '# Account balance';
+ $v = $parsed[$k];
+ $s = '<table class="fr-table">';
+ foreach ($v as $k => $w) {
+ $s .= sprintf('<tr><td>%s</td><td class="money">%s</td></tr>',
+ $k, number_format(str_replace(',', '.', $w), 2, '.', ','));
+ }
+ $s .= '</table>';
+ echo $s;
+ ?>
+
+ <hr>
+
+ <h2>Cash flow</h2>
+ <div id="chart_div" style="width: 650px; height: 280px;"></div>
+ <div id="chart3" style="width: 650px; height: 200px;"></div>
+ <div id="chart2" style="width: 650px; height: 200px;"></div>
+ <hr>
+
+ <h2>Income statement</h2>
+ <table summary="Income statement" class="fr-table">
+ <thead><tr><th colspan="2">Revenues</th>
+ <th colspan="2">Expenses</th></tr></thead>
+ <tbody>
+ <tr><td colspan="2">
+ <table class="fr-table">
+ <?php
+ $s = '';
+ foreach ($parsed['# Income Statement > ## Revenues'] as $k => $v) {
+ if (in_array($k, array('Total of revenues', 'Net Loss')))
+ continue;
+
+ $s .= sprintf('<tr><td>%s</td><td class="money">%s</td></tr>',
+ $k, number_format(str_replace(',', '.', $v), 2, '.', ','));
+ }
+ echo $s;
+ ?>
+ </table>
+ </td><td colspan="2">
+ <table class="fr-table">
+ <?php
+ $s = '';
+ foreach ($parsed['# Income Statement > ## Expenses'] as $k => $v) {
+ if (in_array($k, array('Total of expenses', 'Net Income')))
+ continue;
+
+ $s .= sprintf('<tr><td>%s</td><td class="money">%s</td></tr>',
+ $k, number_format(str_replace(',', '.', $v), 2, '.', ','));
+ }
+ echo $s;
+ ?>
+ </table>
+ </td></tr>
+ </tbody>
+ <tfoot style="font-weight: bold;">
+ <tr><td>Total of revenues</td>
+ <td class="money"><?php echo number_format(str_replace(',', '.', $parsed['# Income Statement > ## Revenues']['Total of revenues']), 2, '.', ','); ?></td>
+ <td>Total of expenses</td>
+ <td class="money"><?php echo number_format(str_replace(',', '.', $parsed['# Income Statement > ## Expenses']['Total of expenses']), 2, '.', ','); ?></td>
+ </tr>
+ <tr><td colspan="2"></td>
+ <td>Net Income</td>
+ <td class="money"><?php echo number_format(str_replace(',', '.', $parsed['# Income Statement > ## Expenses']['Net Income']), 2, '.', ','); ?></td>
+ </tr>
+ </tfoot>
+ </table>
+
+ <hr>
+
+ <h2>Balance sheet</h2>
+ <table class="fr-table">
+ <thead><tr><th colspan="2">Assets</th>
+ <th colspan="2">Liabilities</th></tr></thead>
+ <tbody><tr><td colspan="2">
+ <table class="fr-table">
+ <?php
+ $s = '';
+ foreach ($parsed['# Balance Sheet (incomplete) > ## Assets'] as $k => $v) {
+ $v = str_replace(',', '.', $v);
+ $v = is_numeric($v) ? number_format($v, 2, '.', ',') : $v;
+ $s .= sprintf('<tr><td>%s</td><td class="money">%s</td></tr>', $k, $v);
+ }
+ echo $s;
+ ?>
+ </table>
+ </td><td colspan="2">
+ <table class="fr-table">
+ <?php
+ $s = '';
+ foreach ($parsed['# Balance Sheet (incomplete) > ## Liabilities'] as $k => $v) {
+ $v = str_replace(',', '.', $v);
+ $v = is_numeric($v) ? number_format($v, 2, '.', ',') : $v;
+ $s .= sprintf('<tr><td>%s</td><td class="money">%s</td></tr>', $k, $v);
+ }
+ echo $s;
+ ?>
+ </table>
+ </td></tr></tbody>
+ <tfoot><tr><td>Total Assets</td><td></td>
+ <td>Total Liabilities</td><td></td></tr></tfoot>
+ </table>
+ <hr>
+
+ <h2>Expenses</h2>
+
+ <?php
+
+ $v = $parsed['# Expenses details > ## Monthly summary'];
+ echo '<table class="fr-table">';
+ array_shift($v);
+ foreach ($v as $line) {
+ if ($line[0] == 'total')
+ continue;
+
+ echo sprintf('<tr><td>%s</td><td>%s</td><td class="money">%s</td></tr>',
+ $_months[$line[0]], $line[1],
+ number_format(str_replace(',', '.', $line[2]), 2, '.', ','));
+ }
+ echo '</table>';
+ ?>
+
+ <h3>Details</h3>
+
+ <table class="fr-table">
+ <?php
+ $v = $parsed['# Expenses details > ## More details'];
+ $line = array_shift($v);
+ echo sprintf('<thead><tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th class="money">%s</th></tr></thead><tbody>',
+ $line[0], $line[1],
+ $line[2], $line[3],
+ $line[4],
+ $line[5]);
+
+ foreach ($v as $line) {
+ if (count($line) < 2)
+ continue;
+ echo sprintf('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td class="money">%s</td></tr>',
+ $line[0], $line[1],
+ $line[2], $line[3],
+ $line[4],
+ number_format(str_replace(',', '.', $line[5]), 2, '.', ','));
+ }
+ ?>
+ </tbody>
+ </table>
+ <hr>
+ <h2>Income, donations</h2>
+ <?php
+
+ $v = $parsed['# Income details > ## Donations monthly summary'];
+ echo '<table class="fr-table">';
+ $line = array_shift($v);
+ echo sprintf('<thead><tr><th>%s</th><th>%s</th>
+ <th>%s</th><th>%s</th><th>%s</th><th>%s</th>
+ <th>%s</th></tr></thead>',
+ $line[0], $line[1], $line[2],
+ $line[3],
+ $line[4],
+ $line[5], $line[6]);
+
+ foreach ($v as $line) {
+ echo sprintf('<tr><td>%s</td><td>%s</td>
+ <td class="money">%s</td>
+ <td class="money">%s</td>
+ <td class="money">%s</td>
+ <td class="money">%s</td>
+ <td class="money">%s</td></tr>',
+ $_months[$line[0]], $line[1],
+ number_format(str_replace(',', '.', $line[2]), 2, '.', ','),
+ number_format(str_replace(',', '.', $line[3]), 2, '.', ','),
+ number_format(str_replace(',', '.', $line[4]), 2, '.', ','),
+ number_format(str_replace(',', '.', $line[5]), 2, '.', ','),
+ number_format(str_replace(',', '.', $line[6]), 2, '.', ','));
+ }
+ echo '</table>';
+ ?>
+
+ <hr>
+ <p>Feel free to <a href="/en/contact/">contact us</a> regarding this report.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>