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

    r692 r710  
    231231
    232232    // Celkovy prehled
    233     $DbResult = $this->Database->query('SELECT SUM(Product.SellPrice) AS Price FROM StockItem '.
    234       'JOIN Product ON StockItem.Product = Product.Id WHERE (StockItem.TimeElimination IS NULL) AND (StockItem.Segment IS NOT NULL)');
     233    $DbResult = $this->Database->query('SELECT SUM(Product.SellPrice) AS Price FROM StockSerialNumber '.
     234      'JOIN Product ON StockSerialNumber.Product = Product.Id WHERE (StockSerialNumber.TimeElimination IS NULL) AND (StockSerialNumber.Segment IS NOT NULL)');
    235235    $Row = $DbResult->fetch_row();
    236236    $TotalDeviceCost = $Row[0];
     
    252252    $Output .= 'Stav pokladny: Členové('.$TotalMemberCash.')';
    253253
    254     $DbResult = $this->Database->query('SELECT SUM(Product.Consumption) AS Consumption FROM StockItem '.
    255       'JOIN Product ON StockItem.Product = Product.Id WHERE (StockItem.TimeElimination IS NULL) AND (StockItem.Segment IS NOT NULL)');
     254    $DbResult = $this->Database->query('SELECT SUM(Product.Consumption) AS Consumption FROM StockSerialNumber '.
     255      'JOIN Product ON StockSerialNumber.Product = Product.Id WHERE (StockSerialNumber.TimeElimination IS NULL) '.
     256        'AND (StockSerialNumber.Segment IS NOT NULL)');
    256257    $Row = $DbResult->fetch_row();
    257258    $TotalConsumption = $Row[0];
Note: See TracChangeset for help on using the changeset viewer.