Ignore:
Timestamp:
Oct 4, 2012, 9:01:28 AM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Přejmenovaná tabulka network_device a hosts_topology.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/finance/zivnost.php

    r397 r409  
    6464
    6565    // SmallAssets
    66     $DbResult = $this->Database->query('SELECT SUM(price) FROM network_devices WHERE (TimeEnlistment < "'.TimeToMysqlDateTime($StartTime).'") AND (TimeEnlistment != 0) AND ((TimeElimination > "'.TimeToMysqlDateTime($StartTime).'") OR (TimeElimination = 0))');
     66    $DbResult = $this->Database->query('SELECT SUM(Price) FROM Product WHERE (TimeEnlistment < "'.TimeToMysqlDateTime($StartTime).'") AND (TimeEnlistment != 0) AND ((TimeElimination > "'.TimeToMysqlDateTime($StartTime).'") OR (TimeElimination = 0))');
    6767    //$Output .= $Database->error;
    6868    $Row = $DbResult->fetch_array();
    6969    $Balance['SmallAssets']['Start'] = $Row[0] + 0;
    70     $DbResult = $this->Database->query('SELECT SUM(price) FROM network_devices WHERE (TimeEnlistment < "'.TimeToMysqlDateTime($EndTime).'") AND (TimeEnlistment != 0) AND ((TimeElimination > "'.TimeToMysqlDateTime($EndTime).'") OR (TimeElimination = 0))');
     70    $DbResult = $this->Database->query('SELECT SUM(Price) FROM Product WHERE (TimeEnlistment < "'.TimeToMysqlDateTime($EndTime).'") AND (TimeEnlistment != 0) AND ((TimeElimination > "'.TimeToMysqlDateTime($EndTime).'") OR (TimeElimination = 0))');
    7171    $Row = $DbResult->fetch_array();
    7272    $Balance['SmallAssets']['End'] = $Row[0] + 0;
     
    248248        $Output .= '<table style="font-size: smaller;" border="1" cellspacing="0" cellpadding="3">';
    249249        $Output .= '<tr><th>Název</th><th>Hodnota [Kč]</th><th>Datum zakoupení</th><th>Datum vyřezení</th></tr>';
    250         $DbResult = $this->Database->query('SELECT * FROM network_devices WHERE used != 0');
    251         while($Row = $DbResult->fetch_array())
    252         {
    253           $Output .= '<tr><td>'.$Row['name'].'</td><td>'.$Row['price'].'</td><td>'.$Row['TimeEnlistment'].'</td><td>'.$Row['TimeElimination'].'</td></tr>';
     250        $DbResult = $this->Database->query('SELECT * FROM Product WHERE Used != 0');
     251        while($Row = $DbResult->fetch_array())
     252        {
     253          $Output .= '<tr><td>'.$Row['Name'].'</td><td>'.$Row['Price'].'</td><td>'.$Row['TimeEnlistment'].'</td><td>'.$Row['TimeElimination'].'</td></tr>';
    254254        }
    255255        $Output .= '</table>';
Note: See TracChangeset for help on using the changeset viewer.