Changeset 738 for trunk/Modules/Finance/Zivnost.php
- Timestamp:
- Apr 14, 2015, 10:20:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Zivnost.php
r724 r738 50 50 $Balance['SmallAssets']['End'] = $Row[0] + 0; 51 51 return($Balance); 52 } 52 } 53 53 54 54 function Show() … … 142 142 $Output .= '<strong>Příjmy za rok '.$Year['Year'].'</strong>'; 143 143 $Output .= '<table style="font-size: smaller;" class="WideTable">'; 144 $Output .= '<tr><th>Čas</th><th>Kód</th><th>Subjekt</th><th>Text</th><th>Hodnota [Kč]</th><th>Daňový</th><th>Hotovost</th></tr>'; 144 $Output .= '<tr><th>Čas</th><th>Kód</th><th>Subjekt</th><th>Text</th><th>Hodnota [Kč]</th><th>Daňový</th><th>Hotovost</th></tr>'; 145 145 $DbResult = $this->Database->query('SELECT * FROM FinanceOperation LEFT JOIN Subject ON Subject.Id = FinanceOperation.Subject '. 146 146 'WHERE (Direction = 1) AND (FinanceOperation.Time >= "'.$Year['DateStart'].'") AND (FinanceOperation.Time <= "'.$Year['DateEnd'].'") ORDER BY Time'); … … 172 172 $Output .= '<strong>Výdaje za rok '.$Year['Year'].'</strong>'; 173 173 $Output .= '<table style="font-size: smaller;" class="WideTable">'; 174 $Output .= '<tr><th>Čas</th><th>Kód</th><th>Subjekt</th><th>Text</th><th>Hodnota [Kč]</th><th>Daňový</th><th>Hotovost</th></tr>'; 174 $Output .= '<tr><th>Čas</th><th>Kód</th><th>Subjekt</th><th>Text</th><th>Hodnota [Kč]</th><th>Daňový</th><th>Hotovost</th></tr>'; 175 175 $DbResult = $this->Database->query('SELECT * FROM FinanceOperation LEFT JOIN Subject ON Subject.Id = FinanceOperation.Subject '. 176 176 'WHERE (Direction = -1) AND (FinanceOperation.Time >= "'.$Year['DateStart'].'") AND (FinanceOperation.Time <= "'.$Year['DateEnd'].'") ORDER BY Time'); … … 197 197 $DbResult = $this->Database->select('FinanceYear', '*', 'Id='.$_GET['year']); 198 198 $Year = $DbResult->fetch_assoc(); 199 199 200 200 $Total = 0; 201 201 $Output .= '<strong>Pohledávky za rok '.$Year['Year'].'</strong>'; … … 234 234 $Row['Value'] = $Row['Value'] * -1; 235 235 $Output .= '<tr><td>'.HumanDate($Row['Time']).'</td><td>'.$Row['BillCode']. 236 '</td><td>'.$Row['Name'].'</td><td>'.$Row['Text'].'</td><td>'.($Row['Value'] * $Row['Direction']).'</td></tr>'; 236 '</td><td>'.$Row['Name'].'</td><td>'.$Row['Text'].'</td><td>'.($Row['Value'] * $Row['Direction']).'</td></tr>'; 237 237 $Total += $Row['Value']; 238 238 } … … 288 288 $Output .= '<tr><th>Datum vytvoření</th><th>Datum zaplacení</th><th>Název</th><th>Hodnota [Kč]</th><th>Doklad</th></tr>'; 289 289 $DbResult = $this->Database->select('FinanceInvoice', '*, (SELECT GROUP_CONCAT(Description SEPARATOR ",") '. 290 'FROM FinanceInvoiceItem WHERE FinanceInvoiceItem.FinanceInvoice = FinanceInvoice.Id) AS Text',291 290 'FROM FinanceInvoiceItem WHERE FinanceInvoiceItem.FinanceInvoice = FinanceInvoice.Id) AS Text', 291 'Subject='.$_GET['Id'].' ORDER BY Time'); 292 292 while($Row = $DbResult->fetch_array()) 293 293 { … … 317 317 'WHERE (FinanceInvoice.Subject = Subject.Id) AND (FinanceInvoice.Direction = -1) '. 318 318 'AND (TimePayment IS NULL)) AS OpenedLiabilities, '. 319 319 '(SELECT SUM(FinanceOperation.Value*FinanceOperation.Direction) '. 320 320 'FROM FinanceOperation WHERE FinanceOperation.Subject = Subject.Id AND FinanceOperation.Direction = 1) '. 321 321 'AS Gains, (SELECT SUM(FinanceOperation.Value*FinanceOperation.Direction) FROM FinanceOperation WHERE '. … … 341 341 $Output .= '<strong>Roční přehledy</strong><br/>'; 342 342 $Output .= $this->ShowFinanceYears(); 343 if(array_key_exists('year', $_GET)) 343 if(array_key_exists('year', $_GET)) 344 344 { 345 345 $Year = $_GET['year'] * 1; … … 353 353 return($Output); 354 354 } 355 355 356 356 function ShowFinanceYears() 357 357 {
Note:
See TracChangeset
for help on using the changeset viewer.