Changeset 710 for trunk/Modules/Finance/Finance.php
- Timestamp:
- Dec 29, 2014, 12:09:46 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Finance.php
r709 r710 203 203 $Cash = $Cash[0]; 204 204 205 $DbResult2 = $this->Database->query('SELECT SUM(`Product`.`Consumption`) * `Stock Item`.`Amount` '.206 'FROM `Stock Item` JOIN `Product` ON `Product`.`Id` = `StockItem`.`Product` '.207 'WHERE (`Stock Item`.`Location` = '.$Member['Id'].') AND (`StockItem`.`TimeElimination` IS NULL)');205 $DbResult2 = $this->Database->query('SELECT SUM(`Product`.`Consumption`) * `StockSerialNumber`.`Amount` '. 206 'FROM `StockSerialNumber` JOIN `Product` ON `Product`.`Id` = `StockSerialNumber`.`Product` '. 207 'WHERE (`StockSerialNumber`.`Location` = '.$Member['Id'].') AND (`StockSerialNumber`.`TimeElimination` IS NULL)'); 208 208 $ConsumptionPlus = $DbResult2->fetch_row(); 209 209 $ConsumptionPlus = $ConsumptionPlus[0]; … … 265 265 $RowP2 = $DbResult2->fetch_array(); 266 266 267 $DbResult2 = $this->Database->query('SELECT SUM(`Product`.`BuyPrice`) * `Stock Item`.`Amount` AS `Price`, '.268 'SUM(`Product`.`Consumption`) * `Stock Item`.`Amount` AS `Consumption` '.269 'FROM `Stock Item` JOIN `Product` ON `Product`.`Id` = `StockItem`.`Product` '.270 'WHERE (`Stock Item`.`Segment`='.$NetworkSegment['Id'].') AND (`StockItem`.`TimeElimination` IS NULL)');267 $DbResult2 = $this->Database->query('SELECT SUM(`Product`.`BuyPrice`) * `StockSerialNumber`.`Amount` AS `Price`, '. 268 'SUM(`Product`.`Consumption`) * `StockSerialNumber`.`Amount` AS `Consumption` '. 269 'FROM `StockSerialNumber` JOIN `Product` ON `Product`.`Id` = `StockSerialNumber`.`Product` '. 270 'WHERE (`StockSerialNumber`.`Segment`='.$NetworkSegment['Id'].') AND (`StockSerialNumber`.`TimeElimination` IS NULL)'); 271 271 $Row2 = $DbResult2->fetch_array(); 272 272 $DbResult2 = $this->Database->query('SELECT COUNT(*) FROM Member WHERE NetworkSegment='.$NetworkSegment['Id']);
Note:
See TracChangeset
for help on using the changeset viewer.