Changeset 710 for trunk/Modules/Finance/Consumption.php
- Timestamp:
- Dec 29, 2014, 12:09:46 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Consumption.php
r548 r710 17 17 while($Segment = $DbResult->fetch_assoc()) 18 18 { 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)'); 20 22 $Row2 = $DbResult2->fetch_assoc(); 21 23 $CelkovaSpotreba = $CelkovaSpotreba + $Row2['Consumption'];
Note:
See TracChangeset
for help on using the changeset viewer.