Changeset 748 for trunk/Modules/Finance/UserState.php
- Timestamp:
- Sep 30, 2015, 11:55:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/UserState.php
r747 r748 9 9 function ShowFinanceOperation($Subject) 10 10 { 11 $UserOperationTableQuery = '((SELECT `Text`, `Time`, `Value`, `File`, `BillCode`, NULL AS `PeriodFrom`, NULL AS `PeriodTo` '. 12 'FROM `FinanceOperation` WHERE (`Subject`='.$Subject['Id'].')) UNION ALL '. 11 $UserOperationTableQuery = '((SELECT `Text`, `Time`, `Value`, `File`, `BillCode`, NULL AS `PeriodFrom`, NULL AS `PeriodTo`, `DocumentLineCode`.`Name` AS `BillName` '. 12 'FROM `FinanceOperation` '. 13 'LEFT JOIN `DocumentLineCode` ON `DocumentLineCode`.`Id`=`FinanceOperation`.`BillCode` '. 14 'WHERE (`Subject`='.$Subject['Id'].') '. 15 ') UNION ALL '. 13 16 '(SELECT (SELECT GROUP_CONCAT(`Description` SEPARATOR ",") FROM `FinanceInvoiceItem` WHERE `FinanceInvoice`=`FinanceInvoice`.`Id`) AS `Text`, '. 14 '`Time`, -`Value`, `File`, `BillCode`, `PeriodFrom`, `PeriodTo` FROM `FinanceInvoice` WHERE (`Subject`='.$Subject['Id'].')))'; 17 '`Time`, -`Value`, `File`, `BillCode`, `PeriodFrom`, `PeriodTo`, `DocumentLineCode`.`Name` AS `BillName` FROM `FinanceInvoice` '. 18 'LEFT JOIN `DocumentLineCode` ON `DocumentLineCode`.`Id`=`FinanceInvoice`.`BillCode` '. 19 'WHERE (`Subject`='.$Subject['Id'].')))'; 15 20 16 21 $Output = '<div style="text-align:center">Výpis finančních operací</div>'; … … 46 51 if($Row['Value'] == -0) $Row['Value'] = 0; 47 52 if($Row['Value'] > 0) $Row['Value'] = '+'.$Row['Value']; 48 if($Row['Bill Code'] == '') $Row['BillCode'] = 'PDF';49 if($Row['File'] > 0) $Invoice = '<a href="'.$this->System->Link('/file?id='.$Row['File']).'">'.$Row['Bill Code'].'</a>';50 else $Invoice = NotBlank($Row['BillCode']);53 if($Row['BillName'] == '') $Row['BillName'] = 'PDF'; 54 if($Row['File'] > 0) $Invoice = '<a href="'.$this->System->Link('/file?id='.$Row['File']).'">'.$Row['BillName'].'</a>'; 55 else $Invoice = NotBlank($Row['BillName']); 51 56 if($Row['PeriodFrom'] != '') $Period = HumanDate($Row['PeriodFrom']).' - '.HumanDate($Row['PeriodTo']); 52 else $Period = ' ';57 else $Period = ' '; 53 58 $Output .= '<tr><td style="text-align: right;">'.HumanDate($Row['Time']).'</td>'. 54 59 '<td style="text-align: left;">'.$Row['Text'].'</td>'.
Note:
See TracChangeset
for help on using the changeset viewer.