Ignore:
Timestamp:
Oct 4, 2012, 8:12:31 AM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Tabulky finance_monthly_overall a finance_carge přejmenovaný na názvy s velkými prvními písmeny.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/finance/monthly_overall.php

    r157 r407  
    1212
    1313    $Output = '<table class="WideTable"><tr><th>Rok</th><th>Měsíc</th><th>Internet [Kč]</th><th>Účastníků</th><th>Správa [Kč/účastníka]</th><th>Správa [Kč]</th><th>Spotřeba [Kč/kWh]</th><th>Spotřeba [Kč]</th><th>Obrat [Kč]</th><th>Průměrná cena [Kč/účastníka]</th><th align="center">Investice [Kč]</th></tr>';
    14     $Total = array('money' => 0, 'administration_total' => 0, 'consumption_total' => 0, 'total_paid' => 0, 'investment' => 0);
    15     $DbResult = $this->Database->select('finance_monthly_overall', '*', '1 ORDER BY date DESC');
     14    $Total = array('Money' => 0, 'AdministrationTotal' => 0, 'ConsumptionTotal' => 0, 'TotalPaid' => 0, 'Investment' => 0);
     15    $DbResult = $this->Database->select('FinanceMonthlyOverall', '*', '1 ORDER BY Date DESC');
    1616    while($Month = $DbResult->fetch_array())
    1717    {
    18       $DateParts = explode('-', $Month['date']);
    19       $Output .= '<tr><td>'.$DateParts[0].'</td><td align="center">'.$MonthNames[$DateParts[1] * 1].'</td><td align="center">'.$Month['money'].'</td><td align="center">'.$Month['member_count'].'</td><td align="center">'.$Month['administration'].'</td><td align="center">'.$Month['administration_total'].'</td><td align="center">'.$Month['kWh'].'</td><td align="center">'.$Month['consumption_total'].'</td><td align="center">'.$Month['total_paid'].'</td><td align="center">'.round($Month['total_paid'] / $Month['member_count']).'</td><td align="center">'.$Month['investment'].'</td></tr>';
     18      $DateParts = explode('-', $Month['Date']);
     19      $Output .= '<tr><td>'.$DateParts[0].'</td><td align="center">'.$MonthNames[$DateParts[1] * 1].'</td><td align="center">'.$Month['Money'].'</td><td align="center">'.$Month['MemberCount'].'</td><td align="center">'.$Month['Administration'].'</td><td align="center">'.$Month['AdministrationTotal'].'</td><td align="center">'.$Month['kWh'].'</td><td align="center">'.$Month['ConsumptionTotal'].'</td><td align="center">'.$Month['TotalPaid'].'</td><td align="center">'.round($Month['TotalPaid'] / $Month['MemberCount']).'</td><td align="center">'.$Month['Investment'].'</td></tr>';
    2020
    21       $Total['money'] += $Month['money'];
    22       $Total['administration_total'] += $Month['administration_total'];
    23       $Total['consumption_total'] += $Month['consumption_total'];
    24       $Total['total_paid'] += $Month['total_paid'];
    25           $Total['investment'] += $Month['investment'];
     21      $Total['Money'] += $Month['Money'];
     22      $Total['AdministrationTotal'] += $Month['AdministrationTotal'];
     23      $Total['ConsumptionTotal'] += $Month['ConsumptionTotal'];
     24      $Total['TotalPaid'] += $Month['TotalPaid'];
     25      $Total['Investment'] += $Month['Investment'];
    2626      //if($DateParts[1] == '01') echo('<tr><td style="font-size: 4;" colspan="10">&nbsp;</td></tr>');
    2727    }
    28     $Output .= '<tr><th colspan="2">Celkem</th><th>'.$Total['money'].'</th><th>&nbsp;</th><th>&nbsp;</th><th>'.$Total['administration_total'].'</th><th>&nbsp;</th><th>'.$Total['consumption_total'].'</th><th>'.$Total['total_paid'].'</th><th>&nbsp;</th><th>'.$Total['investment'].'</th>';
     28    $Output .= '<tr><th colspan="2">Celkem</th><th>'.$Total['Money'].'</th><th>&nbsp;</th><th>&nbsp;</th><th>'.$Total['AdministrationTotal'].'</th><th>&nbsp;</th><th>'.$Total['ConsumptionTotal'].'</th><th>'.$Total['TotalPaid'].'</th><th>&nbsp;</th><th>'.$Total['Investment'].'</th>';
    2929    $Output .= '</table>';
    3030    return($Output);
Note: See TracChangeset for help on using the changeset viewer.