Changeset 454 for trunk/finance/zivnost.php
- Timestamp:
- Oct 28, 2012, 9:32:54 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/zivnost.php
r438 r454 65 65 66 66 // SmallAssets 67 $DbResult = $this->Database->query('SELECT SUM( Price) FROM Product WHERE (TimeEnlistment < "'.TimeToMysqlDateTime($StartTime).'") AND (TimeEnlistment != 0) AND ((TimeElimination > "'.TimeToMysqlDateTime($StartTime).'") OR (TimeElimination = 0))');67 $DbResult = $this->Database->query('SELECT SUM(SellPrice) FROM StockItem WHERE (TimeEnlistment < "'.TimeToMysqlDateTime($StartTime).'") AND (TimeEnlistment != 0) AND ((TimeElimination > "'.TimeToMysqlDateTime($StartTime).'") OR (TimeElimination IS NULL))'); 68 68 //$Output .= $Database->error; 69 69 $Row = $DbResult->fetch_array(); 70 70 $Balance['SmallAssets']['Start'] = $Row[0] + 0; 71 $DbResult = $this->Database->query('SELECT SUM( Price) FROM Product WHERE (TimeEnlistment < "'.TimeToMysqlDateTime($EndTime).'") AND (TimeEnlistment != 0) AND ((TimeElimination > "'.TimeToMysqlDateTime($EndTime).'") OR (TimeElimination = 0))');71 $DbResult = $this->Database->query('SELECT SUM(SellPrice) FROM StockItem WHERE (TimeEnlistment < "'.TimeToMysqlDateTime($EndTime).'") AND (TimeEnlistment != 0) AND ((TimeElimination > "'.TimeToMysqlDateTime($EndTime).'") OR (TimeElimination IS NULL))'); 72 72 $Row = $DbResult->fetch_array(); 73 73 $Balance['SmallAssets']['End'] = $Row[0] + 0; … … 281 281 $Output .= '<table style="font-size: smaller;" border="1" cellspacing="0" cellpadding="3">'; 282 282 $Output .= '<tr><th>Název</th><th>Hodnota [Kč]</th><th>Datum zakoupení</th><th>Datum vyřezení</th></tr>'; 283 $DbResult = $this->Database->query('SELECT * FROM Product WHERE Used != 0'); 283 $DbResult = $this->Database->query('SELECT Product.Name AS Name, StockItem.SellPrice AS Price, StockItem.TimeEnlistment AS TimeEnlistment, StockItem.TimeElimination AS TimeElimination '. 284 'FROM StockItem JOIN Product ON Product.Id = StockItem.Product '. 285 'WHERE (TimeElimination IS NOT NULL)'); 284 286 while($Row = $DbResult->fetch_array()) 285 287 { … … 339 341 $Output .= '<strong>Roční přehledy</strong><br/>'; 340 342 $Output .= $this->ShowFinanceYears(); 341 $Year = $_GET['year'] * 1; 342 $Output .= '<a href="?table=Incomes&year='.$Year.'">Příjmy</a><br />'; 343 $Output .= '<a href="?table=Expenses&year='.$Year.'">Výdaje</a><br />'; 344 $Output .= '<a href="?table=Claims&year='.$Year.'">Pohledávky</a><br />'; 345 $Output .= '<a href="?table=Liabilities&year='.$Year.'">Závazky</a><br />'; 346 $Output .= '<a href="?table=Advantages&year='.$Year.'">Zálohy</a><br />'; 343 if(array_key_exists('year', $_GET)) 344 { 345 $Year = $_GET['year'] * 1; 346 $Output .= '<a href="?table=Incomes&year='.$Year.'">Příjmy</a><br />'; 347 $Output .= '<a href="?table=Expenses&year='.$Year.'">Výdaje</a><br />'; 348 $Output .= '<a href="?table=Claims&year='.$Year.'">Pohledávky</a><br />'; 349 $Output .= '<a href="?table=Liabilities&year='.$Year.'">Závazky</a><br />'; 350 $Output .= '<a href="?table=Advantages&year='.$Year.'">Zálohy</a><br />'; 351 } 347 352 } 348 353 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.