Changeset 163 for www/finance/clenove.php
- Timestamp:
- Feb 20, 2009, 9:53:27 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
www/finance/clenove.php
r157 r163 22 22 $TotalMonth = 0; 23 23 $TotalCash = 0; 24 $DbResult = $this->Database->query('SELECT *, CONCAT(users.second_name, " ", users.first_name) as Fullname, ((SELECT COALESCE(SUM(Value), 0) FROM FinanceCashFlow WHERE Subject=users.id) + (SELECT COALESCE(SUM(-Value), 0) FROM FinanceClaimsLiabilities WHERE Subject=users.id)) as Cash FROM users WHERE role=2 ORDER BY fullname'); 25 26 //$DbResult = $Database->query("SELECT *,CONCAT(second_name, ' ', first_name) as fullname FROM users WHERE role=2 ORDER BY fullname"); 24 $DbResult = $this->Database->query('SELECT * FROM MemberPayment JOIN Member ON Member.Id=MemberPayment.Member JOIN Subject ON Subject.Id=Member.Subject ORDER BY Name'); 27 25 while($Row = $DbResult->fetch_array()) 28 26 { 29 $Monthly = $Row['monthly'] - $Row['plus']; 30 if($Row['hw'] == 0) $Monthly = '(trvale nepřipojen) '.(-$Row['plus']); 31 else 32 { 33 if($Row['overheads'] == 0) $Monthly = '(dočasně nepřipojen) '.$Monthly; 34 else 35 { 36 if($Row['inet'] == 0) $Monthly = '(bez internetu) '.$Monthly; 37 else $Monthly = $Monthly; 38 } 39 } 40 //$Row['cash'] = $Row['AdvancesIn'] - $Row['AdvancesOut'] + $Row['Liabilities'] - $Row['Claims']; 27 //$Row['cash'] = $Row['AdvancesIn'] - $Row['AdvancesOut'] + $Row['Liabilities'] - $Row['Claims']; 41 28 $TotalCash += $Row['Cash']; 42 29 if($Row['Cash'] < 0) $Row['Cash'] = '<span style="color: red;">'.$Row['Cash'].'</span>'; 43 $Tarif = $Finance->Tarify[$Row[' inet_tarif_now']]['name'];44 $PristiTarif = $Finance->Tarify[$Row[' inet_tarif_next']]['name'];45 $Output .= '<tr><td><a href="user_state.php?id='.$Row[' id'].'">'.$Row['Fullname'].'</a></td>';30 $Tarif = $Finance->Tarify[$Row['InternetTariffCurrentMonth']]['name']; 31 $PristiTarif = $Finance->Tarify[$Row['InternetTariffNextMonth']]['name']; 32 $Output .= '<tr><td><a href="user_state.php?id='.$Row['Id'].'">'.$Row['Name'].'</a></td>'; 46 33 //<td align="right">'.$Row['network_device'].'</td> 47 $Output .= '<td align="right">'.$ Monthly.'</td><td align="right">'.$Row['Cash'].'</td><td align="center">'.$Tarif.'</td><td align="center">'.$PristiTarif.'</td><td>'.$Row['notice'].' </td></tr>';48 $TotalDevice += $Row[' network_device'];49 $TotalMonth += ($Row[' monthly'] - $Row['plus']);34 $Output .= '<td align="right">'.$Row['MonthlyTotal'].'</td><td align="right">'.$Row['Cash'].'</td><td align="center">'.$Tarif.'</td><td align="center">'.$PristiTarif.'</td></tr>'; 35 $TotalDevice += $Row['NetworkDevice']; 36 $TotalMonth += ($Row['MonthlyTotal']); 50 37 } 51 38 $Output .= '<tr><td><strong>Celkem</strong></td>';
Note:
See TracChangeset
for help on using the changeset viewer.