Ignore:
Timestamp:
Jan 20, 2012, 3:05:24 PM (13 years ago)
Author:
chronos
Message:
  • Upraveno: Testována instalace čisté databáze na základě definic modulů a jejich modelů.
  • Opraveno: Doplněny definice modelů pro FinanceMonthlyOverall a FinanceCharge.
  • Přidáno: Podpora pro nastavitelnost NULL hodnoty u vlastností modelů.
  • Opraveno: Řešení správného kaskádového načítání závislostí modulů.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Finance/MonthlyOverall.php

    r370 r377  
    1111
    1212    $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');
    1515    while($Month = $DbResult->fetch_array())
    1616    {
    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>';
    1926
    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'];
    2532      //if($DateParts[1] == '01') echo('<tr><td style="font-size: 4;" colspan="10">&nbsp;</td></tr>');
    2633    }
    27     $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>';
     34    $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>';
    2835    $Output .= '</table>';
    2936    return($Output);
Note: See TracChangeset for help on using the changeset viewer.