aboutsummaryrefslogtreecommitdiffstats
path: root/en/about
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2013-05-29 22:47:21 +0000
committerRomain d'Alverny <rda@mageia.org>2013-05-29 22:47:21 +0000
commit32f8b00dabd50231473019ecf06d243f745a494b (patch)
treec6a92df8e031b7bb16d28a69d0040ca538c64184 /en/about
parentf39b7a5699939610cf452eccb0b8d37dd5c4f7f4 (diff)
downloadwww-32f8b00dabd50231473019ecf06d243f745a494b.tar
www-32f8b00dabd50231473019ecf06d243f745a494b.tar.gz
www-32f8b00dabd50231473019ecf06d243f745a494b.tar.bz2
www-32f8b00dabd50231473019ecf06d243f745a494b.tar.xz
www-32f8b00dabd50231473019ecf06d243f745a494b.zip
skip empty lines in the report
Diffstat (limited to 'en/about')
-rw-r--r--en/about/reports/2013/mageia-financial-report-2013.csv2
-rw-r--r--en/about/reports/template.php6
-rw-r--r--en/about/reports/template_lib.php3
3 files changed, 10 insertions, 1 deletions
diff --git a/en/about/reports/2013/mageia-financial-report-2013.csv b/en/about/reports/2013/mageia-financial-report-2013.csv
index 4d09fbc75..a90ef0aa6 100644
--- a/en/about/reports/2013/mageia-financial-report-2013.csv
+++ b/en/about/reports/2013/mageia-financial-report-2013.csv
@@ -57,7 +57,7 @@ month,count,total amount,check,transfer,paypal,cash
9,0,0.0,0.0,0.0,0.0,0.0,
10,0,0.0,0.0,0.0,0.0,0.0,
11,0.0,0.0,0.0,0.0,0.0,0.0,
-
+12,0.0,0.0,0.0,0.0,0.0,0.0,
## Other revenues
date,description,amount
diff --git a/en/about/reports/template.php b/en/about/reports/template.php
index 5c0c04994..2cd6e6aeb 100644
--- a/en/about/reports/template.php
+++ b/en/about/reports/template.php
@@ -73,6 +73,9 @@ $count = array_fill(1, 12, 0);
$tmp = $parsed['# Expenses details > ## More details'];
array_shift($tmp);
foreach ($tmp as $line) {
+ if (count($line) < 4)
+ continue;
+
$month = date('n', strtotime($line[0]));
$list[$month] += $line[3]; // amount
$count[$month] += 1;
@@ -91,6 +94,9 @@ $count = array();
// FIXME take ## Other revenues lines into account.
foreach ($parsed['# Income details > ## Donations monthly summary'] as $line) {
+ if (count($line) < 3)
+ continue;
+
$list[] = $line[2];
$count[] = $line[1];
}
diff --git a/en/about/reports/template_lib.php b/en/about/reports/template_lib.php
index 37c101971..419ff103c 100644
--- a/en/about/reports/template_lib.php
+++ b/en/about/reports/template_lib.php
@@ -94,6 +94,9 @@ function get_revenues($v, $_months)
);
foreach ($v as $line) {
+ if (count($line) < 2)
+ continue;
+
$html .= sprintf('<tr><td>%s</td><td>%s</td>
<td class="money">%s</td>
<td class="money">%s</td>