Ignore:
Timestamp:
Apr 8, 2013, 10:40:40 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Detekce typu stahovaných souborů se nyní provádí přímo přes pole MIME typů.
  • Opraveno: Chyba dělení nulou při zobrazení tarifů a počítání agregace rychlosti.
  • Opraveno: Řazení služeb v tabulce dle jména a až pak dle rychlosti stahování.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/finance/tarify.php

    r509 r514  
    2424    foreach($Finance->Tariffs as $Index => $Tariff)
    2525    {
    26       $Tariff['Aggregation'] = '1:'.round($Tariff['InternetSpeedMax'] / $Tariff['InternetSpeedMin']);
     26      if($Tariff['InternetSpeedMin'] != 0)
     27        $Tariff['Aggregation'] = '1:'.round($Tariff['InternetSpeedMax'] / $Tariff['InternetSpeedMin']);
     28        else $Tariff['Aggregation'] = '1:1';
    2729      $Output .= '<tr><td style="color: blue;">'.$Tariff['Name'].'</td><td align="center">'.round($Tariff['InternetSpeedMin'] / 1000).'</td><td align="center" style="color: blue;">'.round($Tariff['InternetSpeedMax'] / 1000).'</td><td align="center">'.$Tariff['Aggregation'].'</td><td align="center">'.$Tariff['CustomerCount'].'</td><td align="center" style="color: blue;">'.$Tariff['Price'].'</td><td align="center">'.$Tariff['CustomerCount'] * $Tariff['Price'].'</td></tr>';
    2830      $TotalPrice = $TotalPrice + $Tariff['Price'] * $Tariff['CustomerCount'];
Note: See TracChangeset for help on using the changeset viewer.