Changeset 145 for www/finance/clenove.php
- Timestamp:
- Feb 15, 2009, 6:53:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
www/finance/clenove.php
r143 r145 9 9 switch($_GET['show']) 10 10 { 11 case 'user': 12 ShowHeader('Seznam účastníků sítě', 'Seznam účastníků'); 11 default: 12 ShowHeader('Finance účastníka', 'Finance účastníka'); 13 $UserID = GetMemberByIP('192.168.1.7'); 14 13 15 $DbResult = $Database->query("SELECT *,CONCAT(second_name, ' ', first_name) as fullname FROM users WHERE id=".$UserID); 14 16 $Row2 = $DbResult->fetch_array(); … … 20 22 echo('<table style="font-size: smaller;" border="1" cellspacing="0" cellpadding="3"><tr><th>Datum</th><th>Popis</th><th>Částka [Kč]</th><th>Doklad</th></tr>'); 21 23 $Operations = array(); 22 $DbResult = $Database->query('(SELECT Time, Value, Text, Bill FROM FinanceCashFlow WHERE Subject='.$ _GET['id'].') UNION ALL '.23 '(SELECT TimeCreation as Time, (-Value) as Value, Text, Bill FROM FinanceClaimsLiabilities WHERE Subject='.$ _GET['id'].') ORDER BY Time DESC');24 $DbResult = $Database->query('(SELECT Time, Value, Text, Bill FROM FinanceCashFlow WHERE Subject='.$UserID.') UNION ALL '. 25 '(SELECT TimeCreation as Time, (-Value) as Value, Text, Bill FROM FinanceClaimsLiabilities WHERE Subject='.$UserID.') ORDER BY Time DESC'); 24 26 while($DbRow = $DbResult->fetch_array()) 25 27 $Operations[] = $DbRow; … … 32 34 //echo('<tr><td> </td><td>-'.$Row2['network_device'].'</td><td>Proměnná cena za zařízení</td></tr> 33 35 echo('</table>'); 34 $DbResult = $Database->query('SELECT ((SELECT COALESCE(SUM(Value), 0) FROM FinanceCashFlow WHERE Subject='.$ _GET['id'].') + '.35 '(SELECT COALESCE(SUM(-Value), 0) FROM FinanceClaimsLiabilities WHERE Subject='.$ _GET['id'].')) as Total');36 $DbResult = $Database->query('SELECT ((SELECT COALESCE(SUM(Value), 0) FROM FinanceCashFlow WHERE Subject='.$UserID.') + '. 37 '(SELECT COALESCE(SUM(-Value), 0) FROM FinanceClaimsLiabilities WHERE Subject='.$UserID.')) as Total'); 36 38 $DbRow = $DbResult->fetch_array(); 37 39 $Total = $DbRow['Total']; … … 124 126 $InvoiceGenerator->ShowStoredBill($_GET['id']); 125 127 break; 126 default:128 case 'admin_user_list': 127 129 ShowHeader('Seznam účastníků sítě', 'Seznam účastníků'); 128 130 // Seznam členů
Note:
See TracChangeset
for help on using the changeset viewer.