Changeset 227 for trunk/finance/user_state.php
- Timestamp:
- Jun 1, 2009, 11:07:05 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/user_state.php
r207 r227 42 42 $Output = '<table width="100%" border="0" cellspacing="0" cellpadding="3"><tr><td valign="top">'; 43 43 44 $UserOperationTableQuery = '((SELECT Text, Time, Value AS Value, Bill FROM FinanceOperation WHERE (Subject='.$Subject['Id'].')) UNION ALL '. 45 '(SELECT Text, TimeCreation as Time, -Value as Value, Bill FROM FinanceClaimsLiabilities WHERE (Subject='.$Subject['Id'].')) ORDER BY Time DESC) AS T1'; 46 $DbResult = $this->Database->query('SELECT SUM(T1.Value) AS Total FROM '.$UserOperationTableQuery); 47 $DbRow = $DbResult->fetch_array(); 48 $Total = $DbRow['Total']; 49 $Output .= 'Stav účtu: <strong>'.$Total.' Kč</strong<br /><br />'; 50 44 51 // Tabulka operaci 45 $Output .= 'Výpis operací pro subjekt '.$Subject['Name'].':<br >';52 $Output .= 'Výpis operací pro subjekt '.$Subject['Name'].':<br />'; 46 53 $Output .= '<table style="font-size: smaller;" class="WideTable"><tr><th>Datum</th><th>Popis</th><th>Částka</th><th>Doklad</th></tr>'; 47 54 $Operations = array(); 48 $UserOperationTableQuery = '((SELECT Text, Time, Value AS Value, Bill FROM FinanceOperation WHERE (Subject='.$Subject['Id'].')) UNION ALL '.49 '(SELECT Text, TimeCreation as Time, -Value as Value, Bill FROM FinanceClaimsLiabilities WHERE (Subject='.$Subject['Id'].')) ORDER BY Time DESC) AS T1';50 55 $DbResult = $this->Database->query('SELECT T1.* FROM '.$UserOperationTableQuery); 51 56 while($DbRow = $DbResult->fetch_array()) … … 60 65 //echo('<tr><td> </td><td>-'.$Row2['network_device'].'</td><td>Proměnná cena za zařízení</td></tr> 61 66 $Output .= '</table>'; 62 $DbResult = $this->Database->query('SELECT SUM(T1.Value) AS Total FROM '.$UserOperationTableQuery);63 $DbRow = $DbResult->fetch_array();64 $Total = $DbRow['Total'];65 $Output .= '<h3><strong>Stav účtu: </strong>'.$Total.' Kč</h3><br>';66 67 $Output .= '</td><td valign="top">'; 67 68
Note:
See TracChangeset
for help on using the changeset viewer.