diff options
author | Romain d'Alverny <rda@mageia.org> | 2013-01-29 18:33:59 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2013-01-29 18:33:59 +0000 |
commit | c905b814006d0b426eb04ae8f7e419fc69af1858 (patch) | |
tree | a372fedf00bb20afcf545251f0d1c325d8c2aac6 /en/about/reports/template.php | |
parent | 04074b7adaf346b5140c66e987cba151f9964764 (diff) | |
download | www-c905b814006d0b426eb04ae8f7e419fc69af1858.tar www-c905b814006d0b426eb04ae8f7e419fc69af1858.tar.gz www-c905b814006d0b426eb04ae8f7e419fc69af1858.tar.bz2 www-c905b814006d0b426eb04ae8f7e419fc69af1858.tar.xz www-c905b814006d0b426eb04ae8f7e419fc69af1858.zip |
updates for 2013 report display
Diffstat (limited to 'en/about/reports/template.php')
-rw-r--r-- | en/about/reports/template.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/en/about/reports/template.php b/en/about/reports/template.php index 8947f961f..24c2e5e53 100644 --- a/en/about/reports/template.php +++ b/en/about/reports/template.php @@ -73,10 +73,13 @@ $flow = array( $list = array(); $count = array(); + +// FIXME take ## Other revenues lines into account. foreach ($parsed['# Income details > ## Donations monthly summary'] as $line) { $list[] = $line[2]; $count[] = $line[1]; } + unset($list[0]); unset($list[13]); unset($count[0]); @@ -87,7 +90,7 @@ $flow['revenue_op'] = $count; include 'template_lib.php'; -$R = get_revenues($parsed['# Income details > ## Donations monthly summary']); +$R = get_revenues($parsed['# Income details > ## Donations monthly summary'], $_months); $expenses_total = array_sum($expenses_monthly_summary[0]); @@ -194,6 +197,7 @@ $expenses_total = array_sum($expenses_monthly_summary[0]); #summary { width: 300px; float: left; text-align: left; background: #fff; border-bottom: 1px solid #ddd; } #report { text-align: left; width: 800px; float: left; border: 1px solid #ddd; border-top: 0; } #links { width: 150px; float: left; background: #fff; text-align: left; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; padding: 1em;} + .accounts tr.total { font-weight: 600; } </style> <aside id="summary"> <div class="para"> @@ -204,10 +208,12 @@ $expenses_total = array_sum($expenses_monthly_summary[0]); $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">'; + $s = '<table class="fr-table accounts">'; 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 .= sprintf('<tr class="%s"><td>%s</td><td class="money">%s</td></tr>', + str_replace(' ', '-', $k), + $k, + number_format(str_replace(',', '.', $w), 2, '.', ',')); } $s .= '</table>'; echo $s; |