Changeset 407 for trunk/finance/monthly_overall.php
- Timestamp:
- Oct 4, 2012, 8:12:31 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/monthly_overall.php
r157 r407 12 12 13 13 $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'); 16 16 while($Month = $DbResult->fetch_array()) 17 17 { 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>'; 20 20 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']; 26 26 //if($DateParts[1] == '01') echo('<tr><td style="font-size: 4;" colspan="10"> </td></tr>'); 27 27 } 28 $Output .= '<tr><th colspan="2">Celkem</th><th>'.$Total[' money'].'</th><th> </th><th> </th><th>'.$Total['administration_total'].'</th><th> </th><th>'.$Total['consumption_total'].'</th><th>'.$Total['total_paid'].'</th><th> </th><th>'.$Total['investment'].'</th>';28 $Output .= '<tr><th colspan="2">Celkem</th><th>'.$Total['Money'].'</th><th> </th><th> </th><th>'.$Total['AdministrationTotal'].'</th><th> </th><th>'.$Total['ConsumptionTotal'].'</th><th>'.$Total['TotalPaid'].'</th><th> </th><th>'.$Total['Investment'].'</th>'; 29 29 $Output .= '</table>'; 30 30 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.