Changeset 413 for trunk/finance/user_state.php
- Timestamp:
- Oct 7, 2012, 4:35:04 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/user_state.php
r410 r413 59 59 60 60 // Account state 61 $UserOperationTableQuery = '((SELECT Text, Time, Value AS Value, Bill FROM FinanceOperation WHERE (Subject='.$Subject['Id'].')) UNION ALL '.62 '(SELECT Text, TimeCreation as Time, -Value as Value, Bill FROM FinanceClaimsLiabilities WHERE (Subject='.$Subject['Id'].')) ORDER BY Time DESC) AS T1';61 $UserOperationTableQuery = '((SELECT Text, Time, Value AS Value, Bill, BillCode FROM FinanceOperation WHERE (Subject='.$Subject['Id'].')) UNION ALL '. 62 '(SELECT Text, TimeCreation as Time, -Value as Value, Bill, BillCode FROM FinanceClaimsLiabilities WHERE (Subject='.$Subject['Id'].')) ORDER BY Time DESC) AS T1'; 63 63 $DbResult = $this->Database->query('SELECT SUM(T1.Value) AS Total FROM '.$UserOperationTableQuery); 64 64 $DbRow = $DbResult->fetch_array(); 65 65 $Total = $DbRow['Total']; 66 $Output .= 'Stav účtu: <strong>'.$Total.' Kč</strong<br /><br /> ';66 $Output .= 'Stav účtu: <strong>'.$Total.' Kč</strong<br /><br /><br/>'; 67 67 68 68 … … 79 79 if($Row['Value'] == -0) $Row['Value'] = 0; 80 80 if($Row['Value'] > 0) $Row['Value'] = '+'.$Row['Value']; 81 if($Row['Bill'] > 0) $Invoice = '<a href="bill.php?Id='.$Row['Bill'].'">PDF</a>'; else $Invoice = ' '; 81 if($Row['BillCode'] == '') $Row['BillCode'] = 'PDF'; 82 if($Row['Bill'] > 0) $Invoice = '<a href="bill.php?Id='.$Row['Bill'].'">'.$Row['BillCode'].'</a>'; else $Invoice = ' '; 82 83 $Output .= '<tr><td style="text-align: right;">'.HumanDate($Row['Time']).'</td><td style="text-align: left;">'.$Row['Text'].'</td><td style="text-align: right;">'.$Row['Value'].'</td><td style="text-align: center;">'.$Invoice.'</td></tr>'; 83 84 $SumValue = $SumValue + $Row['Value'];
Note:
See TracChangeset
for help on using the changeset viewer.