Changeset 377 for trunk/Modules/Finance/MonthlyOverall.php
- Timestamp:
- Jan 20, 2012, 3:05:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/MonthlyOverall.php
r370 r377 11 11 12 12 $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>'; 13 $Total = array(' money' => 0, 'administration_total' => 0, 'consumption_total' => 0, 'total_paid' => 0, 'investment' => 0);14 $DbResult = $this->Database->select(' finance_monthly_overall', '*', '1 ORDER BY date DESC');13 $Total = array('Money' => 0, 'AdministrationTotal' => 0, 'ConsumptionTotal' => 0, 'TotalPaid' => 0, 'Investment' => 0); 14 $DbResult = $this->Database->select('FinanceMonthlyOverall', '*', '1 ORDER BY Date DESC'); 15 15 while($Month = $DbResult->fetch_array()) 16 16 { 17 $DateParts = explode('-', $Month['date']); 18 $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>'; 17 $DateParts = explode('-', $Month['Date']); 18 $Output .= '<tr><td>'.$DateParts[0].'</td><td align="center">'. 19 $MonthNames[$DateParts[1] * 1].'</td><td align="center">'.$Month['Money']. 20 '</td><td align="center">'.$Month['MemberCount'].'</td><td align="center">'. 21 $Month['Administration'].'</td><td align="center">'.$Month['AdministrationTotal']. 22 '</td><td align="center">'.$Month['kWh'].'</td><td align="center">'. 23 $Month['Consumption_Total'].'</td><td align="center">'.$Month['TotalPaid']. 24 '</td><td align="center">'.round($Month['TotalPaid'] / $Month['MemberCount']). 25 '</td><td align="center">'.$Month['Investment'].'</td></tr>'; 19 26 20 $Total[' money'] += $Month['money'];21 $Total[' administration_total'] += $Month['administration_total'];22 $Total[' consumption_total'] += $Month['consumption_total'];23 $Total[' total_paid'] += $Month['total_paid'];24 $Total['investment'] += $Month['investment'];27 $Total['Money'] += $Month['Money']; 28 $Total['AdministrationTotal'] += $Month['AdministrationTotal']; 29 $Total['ConsumptionTotal'] += $Month['ConsumptionTotal']; 30 $Total['TotalPaid'] += $Month['TotalPaid']; 31 $Total['Investment'] += $Month['Investment']; 25 32 //if($DateParts[1] == '01') echo('<tr><td style="font-size: 4;" colspan="10"> </td></tr>'); 26 33 } 27 $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>';34 $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>'; 28 35 $Output .= '</table>'; 29 36 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.