Changeset 204 for trunk/finance/tarify.php
- Timestamp:
- May 1, 2009, 12:13:50 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/tarify.php
r179 r204 18 18 19 19 $Output .= '<table width="50%" class="WideTable" style="font-size: small;">'; 20 $Output .= '<tr><th>Název tarifu</th><th>Min. rychlost [kbit/s]</th><th>Max. rychlost [kbit/s]</th><th>Agregační poměr</th><th> Cenových jednotek</th><th>Počet podílníků</th><th>Celkem cenových jednotek</th><th>Cena [Kč]</th><th>Vybráno celkem[Kč]</th></tr>';20 $Output .= '<tr><th>Název tarifu</th><th>Min. rychlost [kbit/s]</th><th>Max. rychlost [kbit/s]</th><th>Agregační poměr</th><th>Počet podílníků</th><th>Cena [Kč]</th><th>Součet ceny [Kč]</th></tr>'; 21 21 $TotalPrice = 0; 22 $TotalUnits = 0; 23 foreach($Finance->Tarify as $Index => $Tarif) 22 foreach($Finance->Tariffs as $Index => $Tariff) 24 23 { 25 $Output .= '<tr><td style="color: blue;">'.$Tarif['name'].'</td><td align="center">'.round($Tarif['min_speed'] / 1024).'</td><td align="center" style="color: blue;">'.round($Tarif['max_speed'] / 1024).'</td><td align="center">'.$Tarif['aggregation'].'</td><td align="center">'.$Tarif['price_units'].'</td><td align="center">'.$Tarif['user_count'].'</td><td align="center">'. 26 $Tarif['total_units'].'</td><td align="center" style="color: blue;">'.$Tarif['price'].'</td><td align="center">'.$Tarif['user_count'] * $Tarif['price'].'</td></tr>'; 27 $TotalPrice = $TotalPrice + $Tarif['price'] * $Tarif['user_count']; 28 $TotalUnits = $TotalUnits + $Tarif['total_units']; 24 $Tariff['Aggregation'] = '1:'.round($Tariff['SpeedMax'] / $Tariff['SpeedMin']); 25 $Output .= '<tr><td style="color: blue;">'.$Tariff['Name'].'</td><td align="center">'.round($Tariff['SpeedMin'] / 1024).'</td><td align="center" style="color: blue;">'.round($Tariff['SpeedMax'] / 1024).'</td><td align="center">'.$Tariff['Aggregation'].'</td><td align="center">'.$Tariff['MemberCount'].'</td><td align="center" style="color: blue;">'.$Tariff['Price'].'</td><td align="center">'.$Tariff['MemberCount'] * $Tariff['Price'].'</td></tr>'; 26 $TotalPrice = $TotalPrice + $Tariff['Price'] * $Tariff['MemberCount']; 29 27 } 30 $Output .= '<tr><td>Součty</td><td colspan=" 4"> </td><td align="center">'.$Finance->InternetUsers.'</td><td align="center">'.$TotalUnits.'</td><td> </td><td align="center">'.$TotalPrice.'</td></tr>';28 $Output .= '<tr><td>Součty</td><td colspan="3"> </td><td align="center">'.$Finance->InternetUsers.'</td><td> </td><td align="center">'.$TotalPrice.'</td></tr>'; 31 29 $Output .= '</table>'; 32 30 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.