Changeset 479 for trunk/finance/clenove.php
- Timestamp:
- Feb 5, 2013, 9:45:44 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/clenove.php
r438 r479 14 14 15 15 $Output = 'Seznam účastníků:<br/>'; 16 $Query = 'SELECT MonthlyTotal, Cash, Subject.Id, Subject.WWW, Subject.Note, Subject.Name, NetworkDevice, InternetTariffCurrentMonth, InternetTariffNextMonth, User.Name AS FullName FROM MemberPayment LEFT JOIN Member ON Member.Id=MemberPayment.Member LEFT JOIN Subject ON Subject.Id=Member.Subject JOIN User ON User.Id=Member.ResponsibleUser'; 16 $Query = 'SELECT MonthlyTotal, Cash, Subject.Id, Subject.WWW, Subject.Note, '. 17 'Subject.Name, NetworkDevice, '. 18 '(SELECT GROUP_CONCAT(Service.Name) FROM ServiceCustomerRel LEFT JOIN Service '. 19 'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND ServiceCustomerRel.Period=0) AS ServicesCurrentMonth, '. 20 '(SELECT GROUP_CONCAT(Service.Name) FROM ServiceCustomerRel LEFT JOIN Service '. 21 'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND ServiceCustomerRel.Period=1) AS ServicesNextMonth, '. 22 'User.Name AS FullName FROM MemberPayment LEFT JOIN Member ON '. 23 'Member.Id=MemberPayment.Member LEFT JOIN Subject ON Subject.Id=Member.Subject '. 24 'JOIN User ON User.Id=Member.ResponsibleUser'; 17 25 $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$Query.') AS T'); 18 26 $DbRow = $DbResult->fetch_row(); … … 27 35 array('Name' => 'MonthlyTotal', 'Title' => 'Měsíční poplatek [Kč]'), 28 36 array('Name' => 'Cash', 'Title' => 'Stav účtu [Kč]'), 29 array('Name' => ' InternetTariffCurrentMonth', 'Title' => 'Běžící tarif'),30 array('Name' => ' InternetTariffNextMonth', 'Title' => 'Příští tarif'),37 array('Name' => 'ServicesCurrentMonth', 'Title' => 'Běžící tarif'), 38 array('Name' => 'ServicesNextMonth', 'Title' => 'Příští tarif'), 31 39 array('Name' => 'Note', 'Title' => 'Poznámky'), 32 40 array('Name' => 'WWW', 'Title' => 'WWW'), … … 46 54 $TotalCash += $Row['Cash']; 47 55 if($Row['Cash'] < 0) $Row['Cash'] = '<span style="color: red;">'.$Row['Cash'].'</span>'; 48 $Tarif = $ Finance->Tariffs[$Row['InternetTariffCurrentMonth']]['Name'];49 $PristiTarif = $ Finance->Tariffs[$Row['InternetTariffNextMonth']]['Name'];56 $Tarif = $Row['ServicesCurrentMonth']; 57 $PristiTarif = $Row['ServicesNextMonth']; 50 58 $Output .= '<tr><td>'.$Row['FullName'].'</td><td><a href="user_state.php?Subject='.$Row['Id'].'">'.$Row['Name'].'</a></td>'; 51 59 //<td align="right">'.$Row['network_device'].'</td>
Note:
See TracChangeset
for help on using the changeset viewer.