Changeset 107 for devel/www/finance/user_state.php
- Timestamp:
- Sep 14, 2008, 5:54:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/www/finance/user_state.php
r87 r107 14 14 global $Tarify, $Sprava; 15 15 16 if(!$this->System->Modules['User']->CheckPermission('Finance', ' UserState')) return('Nemáte oprávnění');16 if(!$this->System->Modules['User']->CheckPermission('Finance', 'DisplaySubjectState')) return('Nemáte oprávnění'); 17 17 18 18 $UserId = $this->System->Modules['User']->User['Id']; … … 25 25 // Tabulka operaci 26 26 $Output .= 'Výpis operací pro účastníka '.$Row2['fullname'].':<br>'; 27 $Output .= '<table style="font-size: smaller;" border="1" cellspacing="0" cellpadding="3"><tr><th>Datum</th><th>Popis</th><th> Doklad</th><th>Komentář</th></tr>';27 $Output .= '<table style="font-size: smaller;" border="1" cellspacing="0" cellpadding="3"><tr><th>Datum</th><th>Popis</th><th>Částka</th><th>Doklad</th></tr>'; 28 28 $Operations = array(); 29 29 $DbResult = $this->Database->query('(SELECT Time, Value, Text, Bill FROM FinanceCashFlow WHERE Subject='.$UserId.') UNION ALL '. 30 '(SELECT TimeCreation as Time, (-Value)as Value, Text, Bill FROM FinanceClaimsLiabilities WHERE Subject='.$UserId.') ORDER BY Time DESC');30 '(SELECT TimeCreation as Time, -Value as Value, Text, Bill FROM FinanceClaimsLiabilities WHERE Subject='.$UserId.') ORDER BY Time DESC'); 31 31 while($DbRow = $DbResult->fetch_array()) 32 32 $Operations[] = $DbRow; 33 33 foreach($Operations as $Row) 34 34 { 35 if($Row['Value'] == -0) $Row['Value'] = 0; 35 36 if($Row['Value'] > 0) $Row['Value'] = '+'.$Row['Value']; 36 if($Row['Bill'] > 0) $Invoice = '<a href=" ?show=bill&id='.$Row['Bill'].'">PDF</a>'; else $Invoice = ' ';37 $Output .= '<tr><td align="right">'.HumanDate($Row['Time']).'</td><td>'.$Row['Text'].'</td><td >'.$Row['Value'].'</td><td>'.$Invoice.'</td></tr>';37 if($Row['Bill'] > 0) $Invoice = '<a href="bill.php?Id='.$Row['Bill'].'">PDF</a>'; else $Invoice = ' '; 38 $Output .= '<tr><td align="right">'.HumanDate($Row['Time']).'</td><td>'.$Row['Text'].'</td><td style="text-align: right;">'.$Row['Value'].'</td><td style="text-align: center;">'.$Invoice.'</td></tr>'; 38 39 } 39 40 //echo('<tr><td> </td><td>-'.$Row2['network_device'].'</td><td>Proměnná cena za zařízení</td></tr>
Note:
See TracChangeset
for help on using the changeset viewer.