Changeset 810
- Timestamp:
- Mar 6, 2016, 11:23:58 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Version.php
r809 r810 1 1 <?php 2 2 3 $Revision = 8 09; // Subversion revision3 $Revision = 810; // Subversion revision 4 4 $DatabaseRevision = 808; // SQL structure revision 5 5 $ReleaseTime = strtotime('2016-03-06'); -
trunk/Modules/Finance/Finance.php
r809 r810 422 422 'TimeCreate' => array('Type' => 'Date', 'Caption' => 'Čas vytvoření', 'Default' => ''), 423 423 'State' => array('Type' => 'Float', 'Caption' => 'Stav', 'Default' => '', 424 'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => ' (SELECT SUM(`FinanceOperation`.`Value`) FROM `FinanceOperation` '.425 'WHERE `FinanceOperation`.`Treasury`=#Id) '),424 'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => 'IFNULL(ROUND((SELECT SUM(`FinanceOperation`.`Value`) FROM `FinanceOperation` '. 425 'WHERE `FinanceOperation`.`Treasury`=#Id), '.$Config['Finance']['Rounding'].'), 0)'), 426 426 'Operations' => array('Type' => 'TFinanceOperationListTreasury', 'Caption' => 'Operace', 'Default' => ''), 427 427 'Check' => array('Type' => 'TFinanceTreasuryCheckListTreasury', 'Caption' => 'Kontrola', 'Default' => ''), -
trunk/Modules/Finance/Trade.php
r750 r810 198 198 $Output .= '<table style="font-size: smaller;" class="WideTable">'; 199 199 $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>'; 200 $DbResult = $this->Database->query('SELECT `FinanceOperation`.*, `DocumentLineCode`.`Name` AS `BillName`, `Subject`.`Name` AS `Name` FROM `FinanceOperation` '. 200 $DbResult = $this->Database->query('SELECT `FinanceOperation`.*, `DocumentLineCode`.`Name` AS `BillName`, '. 201 '`Subject`.`Name` AS `SubjectName`, `FinanceOperationGroup`.`ValueSign` AS `ValueSign` FROM `FinanceOperation` '. 201 202 'LEFT JOIN `Subject` ON `Subject`.`Id` = `FinanceOperation`.`Subject` '. 202 203 'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id` = `FinanceOperation`.`Group` '. … … 208 209 $Row['Time'] = explode(' ', $Row['Time']); 209 210 $Row['Time'] = $Row['Time'][0]; 210 $Row['Value'] = $Row['Value'] ;211 $Row['Value'] = $Row['Value'] * $Row['ValueSign']; 211 212 $Output .= '<tr><td>'.HumanDate($Row['Time']).'</td><td>'.$Row['BillName']. 212 '</td><td>'.$Row[' Name'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value'].213 '</td><td>'.$Row['SubjectName'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value']. 213 214 '</td><td>'.$Table[$Row['Taxable']].'</td><td>'.$Table[$Row['Cash']].'</td></tr>'; 214 215 $Total += $Row['Value']; … … 233 234 $Output .= '<table style="font-size: smaller;" class="WideTable">'; 234 235 $Output .= '<tr><th>Čas vystavení</th><th>Kód</th><th>Subjekt</th><th>Text</th><th>Hodnota [Kč]</th></tr>'; 235 $DbResult = $this->Database->query('SELECT `FinanceInvoice`.*, (SELECT GROUP_CONCAT(Description SEPARATOR ",") '. 236 'FROM FinanceInvoiceItem WHERE FinanceInvoiceItem.FinanceInvoice = FinanceInvoice.Id) AS Text, `DocumentLineCode`.`Name` AS `BillName`, `Subject`.`Name` AS `Name` '. 237 'FROM FinanceInvoice JOIN Subject ON Subject.Id = FinanceInvoice.Subject '. 236 $DbResult = $this->Database->query('SELECT `FinanceInvoice`.*, '. 237 '`DocumentLineCode`.`Name` AS `BillName`, `Subject`.`Name` AS `SubjectName`, '. 238 '(SELECT GROUP_CONCAT(`Description` SEPARATOR ",") '. 239 'FROM `FinanceInvoiceItem` WHERE `FinanceInvoiceItem`.`FinanceInvoice` = `FinanceInvoice`.`Id`) AS `Text` FROM `FinanceInvoice`'. 240 'LEFT JOIN `Subject` ON `Subject`.`Id` = `FinanceInvoice`.`Subject` '. 238 241 'LEFT JOIN `FinanceInvoiceGroup` ON `FinanceInvoiceGroup`.`Id` = `FinanceInvoice`.`Group` '. 239 242 'LEFT JOIN `DocumentLineCode` ON `DocumentLineCode`.`Id` = `FinanceInvoice`.`BillCode` '. 240 'WHERE (`FinanceInvoiceGroup`.`ValueSign` = 1) AND ( FinanceInvoice.Time>= "'.$Year['DateStart'].241 '") AND ( FinanceInvoice.Time <= "'.$Year['DateEnd'].'") ORDER BY Time');243 'WHERE (`FinanceInvoiceGroup`.`ValueSign` = 1) AND (`FinanceInvoice`.`Time` >= "'.$Year['DateStart']. 244 '") AND (`FinanceInvoice`.`Time` <= "'.$Year['DateEnd'].'") ORDER BY `Time`'); 242 245 while($Row = $DbResult->fetch_array()) 243 246 { 244 247 if($Row['TimePayment'] == '0000-00-00 00:00:00') $Row['TimePayment'] = ' '; 245 248 $Output .= '<tr><td>'.HumanDate($Row['Time']).'</td><td>'.$Row['BillName']. 246 '</td><td>'.$Row[' Name'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value'].'</td></tr>';249 '</td><td>'.$Row['SubjectName'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value'].'</td></tr>'; 247 250 $Total += $Row['Value']; 248 251 } … … 259 262 $Output .= '<table style="font-size: smaller;" class="WideTable">'; 260 263 $Output .= '<tr><th>Čas vystavení</th><th>Kód</th><th>Subjekt</th><th>Text</th><th>Hodnota [Kč]</th></tr>'; 261 $DbResult = $this->Database->query('SELECT *, (SELECT GROUP_CONCAT(Description SEPARATOR ",") '. 262 'FROM FinanceInvoiceItem WHERE FinanceInvoiceItem.FinanceInvoice = FinanceInvoice.Id) AS `Text`, `DocumentLineCode`.`Name` AS `BillName` '. 263 'FROM FinanceInvoice JOIN Subject ON Subject.Id = FinanceInvoice.Subject '. 264 $DbResult = $this->Database->query('SELECT *, `DocumentLineCode`.`Name` AS `BillName`, `Subject`.`Name` AS `SubjectName`, '. 265 '(SELECT GROUP_CONCAT(Description SEPARATOR ",") '. 266 'FROM `FinanceInvoiceItem` WHERE `FinanceInvoiceItem`.`FinanceInvoice` = `FinanceInvoice`.`Id`) AS `Text` '. 267 'FROM `FinanceInvoice` '. 268 'LEFT JOIN `Subject` ON `Subject`.`Id` = `FinanceInvoice`.`Subject` '. 264 269 'LEFT JOIN `FinanceInvoiceGroup` ON `FinanceInvoiceGroup`.`Id` = `FinanceInvoice`.`Group` '. 265 270 'LEFT JOIN `DocumentLineCode` ON `DocumentLineCode`.`Id` = `FinanceInvoice`.`BillCode` '. … … 269 274 { 270 275 if($Row['TimePayment'] == '0000-00-00 00:00:00') $Row['TimePayment'] = ' '; 271 $Row['Value'] = $Row['Value'] * -1;276 $Row['Value'] = $Row['Value'] * $Row['ValueSign']; 272 277 $Output .= '<tr><td>'.HumanDate($Row['Time']).'</td><td>'.$Row['BillName']. 273 '</td><td>'.$Row[' Name'].'</td><td>'.$Row['Text'].'</td><td>'.($Row['Value'] * $Row['ValueSign']).'</td></tr>';278 '</td><td>'.$Row['SubjectName'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value'].'</td></tr>'; 274 279 $Total += $Row['Value']; 275 280 }
Note:
See TracChangeset
for help on using the changeset viewer.