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/Consumption.php

    r548 r710  
    1717    while($Segment = $DbResult->fetch_assoc())
    1818    {
    19       $DbResult2 = $this->Database->query('SELECT SUM(Product.Consumption) AS Consumption FROM StockItem JOIN Product ON Product.Id = StockItem.Product WHERE (StockItem.Segment='.$Segment['Id'].') AND (StockItem.TimeElimination IS NULL)');
     19      $DbResult2 = $this->Database->query('SELECT SUM(Product.Consumption) AS Consumption FROM StockSerialNumber '.
     20                'JOIN Product ON Product.Id = StockSerialNumber.Product WHERE (StockSerialNumber.Segment='.$Segment['Id'].') '.
     21                'AND (StockSerialNumber.TimeElimination IS NULL)');
    2022      $Row2 = $DbResult2->fetch_assoc();
    2123      $CelkovaSpotreba = $CelkovaSpotreba + $Row2['Consumption'];
Note: See TracChangeset for help on using the changeset viewer.