Changeset 453 for trunk/finance
- Timestamp:
- Oct 28, 2012, 5:17:42 PM (13 years ago)
- Location:
- trunk/finance
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/index.php
r451 r453 20 20 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/aktuality/index.php?category=9">Investice v síti</a><br />'; 21 21 //$Output .= '<a href="faktury/">Faktury za internet</a><br />'; 22 //$Output .= '<a href="inventory.php">Výpis skladových zásob</a><br />';23 22 24 23 $Output .= '<br /><strong>Souhrn:</strong><br />'; -
trunk/finance/manage.php
r438 r453 70 70 $Output .= '<a href="clenove.php">Seznam členů</a><br />'; 71 71 $Output .= '<a href="zivnost.php">Živnost</a><br />'; 72 $Output .= '<a href="inventory.php">Stav skladu</a><br />';73 72 $Output .= '<a href="?Operation=GenerateBills">Generovat chybějící doklady</a><br />'; 74 73 $Output .= '<a href="import.php">Import plateb</a><br />'; … … 302 301 303 302 // Celkovy prehled 304 $DbResult = $this->Database->query('SELECT SUM(Price) FROM Product WHERE Used = 1'); 303 $DbResult = $this->Database->query('SELECT SUM(Product.Price) AS Price FROM StockItem '. 304 'JOIN Product ON StockItem.Product = Product.Id WHERE (StockItem.TimeElimination IS NULL) AND (StockItem.Segment IS NOT NULL)'); 305 305 $Row = $DbResult->fetch_row(); 306 306 $TotalDeviceCost = $Row[0]; … … 322 322 $Output .= 'Stav pokladny: Členové('.$TotalMemberCash.')'; 323 323 324 $DbResult = $this->Database->query('SELECT SUM(Consumption) FROM Product WHERE Used=1'); 324 $DbResult = $this->Database->query('SELECT SUM(Product.Consumption) AS Consumption FROM StockItem '. 325 'JOIN Product ON StockItem.Product = Product.Id WHERE (StockItem.TimeElimination IS NULL) AND (StockItem.Segment IS NOT NULL)'); 325 326 $Row = $DbResult->fetch_row(); 326 327 $TotalConsumption = $Row[0]; -
trunk/finance/user_state.php
r438 r453 120 120 $Output .= 'Měsíční příjem za spotřebu zařízení umístěných u uživatele:<br>'; 121 121 $Output .= '<table class="WideTable"><tr><th>Název zařízení</th><th>Spotřeba [W]</th><th>Příjem [Kč]</th></tr>'; 122 $DbResult = $this->Database->query('SELECT * FROM Product WHERE User='.$Member['Subject'].' AND Used=1'); 122 $DbResult = $this->Database->query('SELECT Product.Name AS Name, Product.Consumption AS Consumption '. 123 'FROM StockItem JOIN Product ON Product.Id = StockItem.Product '. 124 'WHERE Location='.$Member['Id'].' AND (TimeElimination IS NULL)'); 123 125 $TotalW = 0; 124 126 $TotalPrice = 0;
Note:
See TracChangeset
for help on using the changeset viewer.