Ignore:
Timestamp:
Dec 29, 2014, 12:09:46 AM (10 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

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

    r627 r710  
    4343
    4444    // SmallAssets
    45     $DbResult = $this->Database->query('SELECT SUM(SellPrice) FROM StockItem WHERE (TimeEnlistment < "'.TimeToMysqlDateTime($StartTime).'") AND (TimeEnlistment != 0) AND ((TimeElimination > "'.TimeToMysqlDateTime($StartTime).'") OR (TimeElimination IS NULL))');
     45    $DbResult = $this->Database->query('SELECT SUM(SellPrice) FROM StockSerialNumber WHERE (TimeEnlistment < "'.TimeToMysqlDateTime($StartTime).'") AND (TimeEnlistment != 0) AND ((TimeElimination > "'.TimeToMysqlDateTime($StartTime).'") OR (TimeElimination IS NULL))');
    4646    //$Output .= $Database->error;
    4747    $Row = $DbResult->fetch_array();
    4848    $Balance['SmallAssets']['Start'] = $Row[0] + 0;
    49     $DbResult = $this->Database->query('SELECT SUM(SellPrice) FROM StockItem WHERE (TimeEnlistment < "'.TimeToMysqlDateTime($EndTime).'") AND (TimeEnlistment != 0) AND ((TimeElimination > "'.TimeToMysqlDateTime($EndTime).'") OR (TimeElimination IS NULL))');
     49    $DbResult = $this->Database->query('SELECT SUM(SellPrice) FROM StockSerialNumber WHERE (TimeEnlistment < "'.TimeToMysqlDateTime($EndTime).'") AND (TimeEnlistment != 0) AND ((TimeElimination > "'.TimeToMysqlDateTime($EndTime).'") OR (TimeElimination IS NULL))');
    5050    $Row = $DbResult->fetch_array();
    5151    $Balance['SmallAssets']['End'] = $Row[0] + 0;
     
    263263        $Output .= '<table style="font-size: smaller;" border="1" cellspacing="0" cellpadding="3">';
    264264        $Output .= '<tr><th>Název</th><th>Hodnota [Kč]</th><th>Datum zakoupení</th><th>Datum vyřezení</th></tr>';
    265         $DbResult = $this->Database->query('SELECT Product.Name AS Name, StockItem.SellPrice AS Price, StockItem.TimeEnlistment AS TimeEnlistment, StockItem.TimeElimination AS TimeElimination '.
    266           'FROM StockItem JOIN Product ON Product.Id = StockItem.Product '.
     265        $DbResult = $this->Database->query('SELECT Product.Name AS Name, StockSerialNumber.SellPrice AS Price, StockSerialNumber.TimeEnlistment AS TimeEnlistment, StockSerialNumber.TimeElimination AS TimeElimination '.
     266          'FROM StockSerialNumber JOIN Product ON Product.Id = StockSerialNumber.Product '.
    267267          'WHERE (TimeElimination IS NOT NULL)');
    268268        while($Row = $DbResult->fetch_array())
Note: See TracChangeset for help on using the changeset viewer.