Ignore:
Timestamp:
Feb 18, 2009, 11:19:12 AM (15 years ago)
Author:
george
Message:
  • Upraveno: Soubor include.php ve financích přepracován na třídy ve finance.php.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • www/finance/user_state.php

    r156 r157  
    22
    33include_once('../global.php');
    4 include_once('include.php');
    5 RecalculateTariffs(1);
    64
    75class FinanceUserState extends Page
     
    1614    if(!$this->System->Modules['User']->CheckPermission('Finance', 'DisplaySubjectState')) return('Nemáte oprávnění');
    1715
     16        $this->System->Modules['Finance']->RecalculateTariffs(1);
    1817    $UserId = $this->System->Modules['User']->User['Id'];
    1918    if(!array_key_exists('show', $_GET)) $_GET['show'] = '';
     
    5655    $DbResult = $this->Database->query('SELECT SUM(consumption) AS Total FROM network_devices WHERE user='.$UserId.' AND used=1');
    5756        $ConsumptionBonus = $DbResult->fetch_assoc();
    58         $ConsumptionBonus = W2Kc($ConsumptionBonus['Total']);
     57        $ConsumptionBonus = $this->System->Modules['Finance']->W2Kc($ConsumptionBonus['Total']);
    5958
    6059        $Total = 0;
     
    7978      while($Row = $DbResult->fetch_assoc())
    8079      {
    81         $Output .= '<tr><td>'.$Row['name'].'</td><td>'.$Row['consumption'].'</td><td>'.W2Kc($Row['consumption']).'</td></tr>';
     80        $Output .= '<tr><td>'.$Row['name'].'</td><td>'.$Row['consumption'].'</td><td>'.$this->System->Modules['Finance']->W2Kc($Row['consumption']).'</td></tr>';
    8281        $TotalW += $Row['consumption'];
    83         $TotalPrice += W2Kc($Row['consumption']);
     82        $TotalPrice += $this->System->Modules['Finance']->W2Kc($Row['consumption']);
    8483      }
    8584      $Output .= '<tr><td><strong>Celkem</strong></td><td><strong>'.$TotalW.'</strong></td><td><strong>'.$TotalPrice.'</strong></td></tr>';
Note: See TracChangeset for help on using the changeset viewer.