Changeset 415 for trunk/finance/spotreba.php
- Timestamp:
- Oct 7, 2012, 8:37:15 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 6 6 postfixadmin 7 7 backup 8 .project 9 .buildpath 10 .settings
-
- Property svn:ignore
-
trunk/finance/spotreba.php
r409 r415 14 14 $Output = 'Spotřeba zařízení jednotlivých segmentů:<div align="center"><table class="WideTable"><tr><th>Jméno segmentu</th><th>Spotřeba [W]</th><th>Cena [Kč/měsíc]</th></tr>'; 15 15 $CelkovaSpotreba = 0; 16 $DbResult = $this->Database->query( "SELECT * FROM NetworkSegment");16 $DbResult = $this->Database->query('SELECT * FROM NetworkSegment'); 17 17 while($Segment = $DbResult->fetch_array()) 18 18 { 19 $DbResult2 = $this->Database->query( "SELECT SUM(Consumption) FROM Product WHERE Segment=".$Segment['Id']." AND Used=1");19 $DbResult2 = $this->Database->query('SELECT SUM(Consumption) FROM Product WHERE Segment='.$Segment['Id'].' AND Used=1'); 20 20 $Row2 = $DbResult2->fetch_array(); 21 21 $CelkovaSpotreba = $CelkovaSpotreba + $Row2[0]; 22 $Output .= '<tr><td>'.$ Row['Name'].'</td><td align="right">'.$Row2[0].'</td><td align="right">'.$this->System->Modules['Finance']->W2Kc($Row2[0]).'</td></tr>';22 $Output .= '<tr><td>'.$Segment['Name'].'</td><td align="right">'.$Row2[0].'</td><td align="right">'.$this->System->Modules['Finance']->W2Kc($Row2[0]).'</td></tr>'; 23 23 } 24 24 $Output .= '<tr style="font-weight: Bold;"><td><strong>Celkem</strong></td><td align="right">'.$CelkovaSpotreba.'</td><td align="right">'.$this->System->Modules['Finance']->W2Kc($CelkovaSpotreba).'</td></tr>';
Note:
See TracChangeset
for help on using the changeset viewer.