Changeset 453
- Timestamp:
- Oct 28, 2012, 5:17:42 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Page.php
r443 r453 48 48 'changes.php' => 'Změny', 49 49 'tarify.php' => 'Tarify', 50 'inventory.php' => 'Skladové zásoby',51 50 'clenove.php' => 'Seznam členů', 52 51 'zarizeni.php' => 'Zařízení', -
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; -
trunk/form_classes.php
r452 r453 2 2 3 3 $FormClasses = array( 4 'NetworkDeviceConfig' => array( 5 'Title' => 'Nastavení zařízení', 6 'Table' => 'NetworkDeviceConfig', 7 'DefaultSortColumn' => 'Time', 8 'Items' => array( 9 'Device' => array('Type' => 'TNetworkDevice', 'Caption' => 'Zařízení', 'Default' => ''), 10 'Time' => array('Type' => 'Date', 'Caption' => 'Čas vytvoření', 'Default' => ''), 11 'ConfigFull' => array('Type' => 'Text', 'Caption' => 'Kompletní nastavení', 'Default' => ''), 12 'ConfigCompact' => array('Type' => 'Text', 'Caption' => 'Rozdílové nastavení', 'Default' => ''), 13 ), 14 ), 4 15 'DocumentLine' => array( 5 16 'Title' => 'Dokladové řady', -
trunk/temp/product.php
r452 r453 4 4 5 5 /* @var $System System */ 6 $System->Database->query(' TRUNCATE TABLEStockItem');7 $System->Database->query(' TRUNCATE TABLEProduct');6 $System->Database->query('DELETE FROM StockItem'); 7 $System->Database->query('DELETE FROM Product'); 8 8 9 9 $DbResult = $System->Database->select('ProductOld', '*'); … … 16 16 'Consumption' => $DbRow['Consumption'], 'UnitOfMeasure' => 1, 'VAT' => 20)); 17 17 $ProductId = $System->Database->insert_id; 18 if($DbRow['Used'] == 1) $Elimination = 'NULL';18 if($DbRow['Used'] == 0) $Elimination = 'NULL'; 19 19 else $Elimination = $DbRow['TimeElimination']; 20 20 $Database->insert('StockItem', array('Stock' => 1, 'Product' => $ProductId, 'Amount' => $DbRow['Count'],
Note:
See TracChangeset
for help on using the changeset viewer.