Changeset 494 for trunk/finance/user_state.php
- Timestamp:
- Mar 1, 2013, 10:44:18 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/user_state.php
r486 r494 63 63 64 64 // Account state 65 $UserOperationTableQuery = '((SELECT Text, Time, Value AS Value, Bill, BillCode, NULL AS PeriodFrom, NULL AS PeriodTo '.65 $UserOperationTableQuery = '((SELECT Text, Time, Value AS Value, File, BillCode, NULL AS PeriodFrom, NULL AS PeriodTo '. 66 66 'FROM FinanceOperation WHERE (Subject='.$Subject['Id'].')) UNION ALL '. 67 67 '(SELECT (SELECT GROUP_CONCAT(Description SEPARATOR ",") FROM FinanceInvoiceItem WHERE FinanceInvoice=FinanceInvoice.Id) AS Text, '. 68 'TimeCreation as Time, -Value as Value, Bill, BillCode, PeriodFrom, PeriodTo FROM FinanceInvoice WHERE (Subject='.$Subject['Id'].')) ORDER BY Time DESC) AS T1';68 'TimeCreation as Time, -Value as Value, File, BillCode, PeriodFrom, PeriodTo FROM FinanceInvoice WHERE (Subject='.$Subject['Id'].')) ORDER BY Time DESC) AS T1'; 69 69 $DbResult = $this->Database->query('SELECT SUM(T1.Value) AS Total FROM '.$UserOperationTableQuery); 70 70 $DbRow = $DbResult->fetch_array(); … … 87 87 if($Row['Value'] > 0) $Row['Value'] = '+'.$Row['Value']; 88 88 if($Row['BillCode'] == '') $Row['BillCode'] = 'PDF'; 89 if($Row[' Bill'] > 0) $Invoice = '<a href="bill.php?Id='.$Row['Bill'].'">'.$Row['BillCode'].'</a>';89 if($Row['File'] > 0) $Invoice = '<a href="'.$this->System->Link('/FileDownload.php?Id='.$Row['File']).'">'.$Row['BillCode'].'</a>'; 90 90 else $Invoice = ' '; 91 91 if($Row['PeriodFrom'] != '') $Period = HumanDate($Row['PeriodFrom']).' - '.HumanDate($Row['PeriodTo']);
Note:
See TracChangeset
for help on using the changeset viewer.