Changeset 480
- Timestamp:
- Feb 5, 2013, 10:25:54 PM (12 years ago)
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Modular
- Property svn:ignore
-
old new 7 7 backup 8 8 forum 9 nbproject
-
- Property svn:ignore
-
trunk
- Property svn:ignore
-
old new 9 9 .buildpath 10 10 .settings 11 nbproject
-
- Property svn:ignore
-
trunk/finance/manage.php
r479 r480 55 55 $Output .= $this->System->Modules['Finance']->RecalculateMemberPayment(); 56 56 break; 57 case ' MonthlyPayment':57 case 'ShowMonthlyPayment': 58 58 $Output = $this->ShowMonthlyPayment(); 59 break; 60 case 'ProcessMonthlyPayment': 61 $Output = $this->ProcessMonthlyPayment(); 59 62 break; 60 63 case 'GenerateBills': … … 69 72 $Output .= '<a href="?Operation=Bills">Správa dokladů</a><br />'; 70 73 $Output .= '<a href="?Operation=Recalculate">Přepočet financí</a><br />'; 71 $Output .= '<a href="?Operation= MonthlyPayment">Měsíční vyúčtování</a><br />';74 $Output .= '<a href="?Operation=ShowMonthlyPayment">Měsíční vyúčtování</a><br />'; 72 75 $Output .= '<a href="clenove.php">Seznam členů</a><br />'; 73 76 $Output .= '<a href="zivnost.php">Živnost</a><br />'; … … 288 291 289 292 function ShowMonthlyPayment() 293 { 294 if(!$this->System->Modules['User']->CheckPermission('Finance', 'Manage')) return('Nemáte oprávnění'); 295 $SQL = 'SELECT Member.*, MemberPayment.MonthlyTotal AS Monthly, '. 296 'MemberPayment.Cash AS Cash, '. 297 '(SELECT GROUP_CONCAT(Service.Name) FROM ServiceCustomerRel LEFT JOIN Service '. 298 'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND ServiceCustomerRel.Period=1) AS ServicesNextMonth, '. 299 'UNIX_TIMESTAMP(Member.BillingPeriodLastDate) AS LastDate, Subject.Name AS SubjectName, '. 300 'FinanceBillingPeriod.Name AS BillingPeriodName '. 301 'FROM MemberPayment JOIN Member ON Member.Id=MemberPayment.Member JOIN Subject '. 302 'ON Subject.Id=Member.Subject LEFT JOIN FinanceBillingPeriod ON '. 303 'FinanceBillingPeriod.Id=Member.BillingPeriodNext'; 304 305 $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$SQL.') AS T'); 306 $DbRow = $DbResult->fetch_row(); 307 $PageList = GetPageList($DbRow[0]); 308 309 $Output = $PageList['Output']; 310 $Output .= '<table class="WideTable" style="font-size: small;">'; 311 312 $TableColumns = array( 313 array('Name' => 'SubjectName', 'Title' => 'Jméno'), 314 array('Name' => 'Monthly', 'Title' => 'Platba'), 315 array('Name' => 'Cash', 'Title' => 'Kredit'), 316 array('Name' => 'LastDate', 'Title' => 'Poslední fakturace'), 317 array('Name' => 'ServicesNextMonth', 'Title' => 'Služby'), 318 array('Name' => 'BillingPeriodName', 'Title' => 'Perioda'), 319 ); 320 $Order = GetOrderTableHeader($TableColumns, 'SubjectName', 0); 321 $Output .= $Order['Output']; 322 323 $Query = $SQL.' '.$Order['SQL'].$PageList['SQLLimit']; 324 325 $DbResult = $this->Database->query($Query); 326 while($Row = $DbResult->fetch_assoc()) 327 { 328 $Output .= '<tr>'. 329 '<td>'.$Row['SubjectName'].'</td>'. 330 '<td>'.$Row['Monthly'].'</td>'. 331 '<td>'.$Row['Cash'].'</td>'. 332 '<td>'.date('j.n.Y', $Row['LastDate']).'</td>'. 333 '<td>'.$Row['ServicesNextMonth'].'</td>'. 334 '<td>'.$Row['BillingPeriodName'].'</td>'. 335 '</tr>'; 336 } 337 $Output .= '</table>'; 338 $Output .= $PageList['Output']; 339 $Output .= '<a href="?Operation=ProcessMonthlyPayment">Generovat faktury</a>'; 340 return($Output); 341 } 342 343 function ProcessMonthlyPayment() 290 344 { 291 345 if(!$this->System->Modules['User']->CheckPermission('Finance', 'Manage')) return('Nemáte oprávnění'); -
trunk/form_classes.php
r479 r480 62 62 ), 63 63 ), 64 'ServiceCustomerRel' => array( 65 'Title' => 'Vztahy služba - zákazník', 66 'Table' => 'ServiceCustomerRel', 67 'Items' => array( 68 'Service' => array('Type' => 'TService', 'Caption' => 'Služba', 'Default' => ''), 69 'Customer' => array('Type' => 'TMember', 'Caption' => 'Zákazník', 'Default' => ''), 70 'Period' => array('Type' => 'Integer', 'Caption' => 'Období', 'Default' => ''), 71 ), 72 ), 64 73 'Work' => array( 65 74 'Title' => 'Práce', … … 266 275 'Price' => array('Type' => 'Integer', 'Caption' => 'Cena', 'Default' => '0', 'Suffix' => 'Kč'), 267 276 'CustomerCount' => array('Type' => 'Integer', 'Caption' => 'Počet zákazníků', 'Default' => ''), 268 'ReplaceId' => array('Type' => 'TService', 'Caption' => 'Nahradit', 'Default' => '', 'Null' => true),269 277 'Public' => array('Type' => 'Boolean', 'Caption' => 'Veřejné', 'Default' => ''), 270 278 'InternetSpeedMin' => array('Type' => 'Integer', 'Caption' => 'Min. rychlost internetu', 'Default' => '0', 'Suffix' => 'kbit/s'), … … 275 283 'Storage' => array('Type' => 'Integer', 'Caption' => 'Úložiště', 'Default' => '0', 'Suffix' => 'GB'), 276 284 'CPUCount' => array('Type' => 'Integer', 'Caption' => 'Počet jader', 'Default' => '0', 'Suffix' => ''), 285 'ReplaceId' => array('Type' => 'TService', 'Caption' => 'Nahradit', 'Default' => '', 'Null' => true), 277 286 ), 278 287 ), … … 296 305 'Devices' => array('Type' => 'TDeviceList', 'Caption' => 'Registrovaná zařízení', 'Default' => ''), 297 306 'UserRel' => array('Type' => 'TUserCustomerRelListCustomer', 'Caption' => 'Přiřazení uživatelé', 'Default' => ''), 307 'ServiceRel' => array('Type' => 'TServiceCustomerRelListCustomer', 'Caption' => 'Placené služby', 'Default' => ''), 298 308 ), 299 309 ), … … 637 647 ), 638 648 ), 649 'ServiceCategory' => array( 650 'Title' => 'Kategorie služeb', 651 'Table' => 'ServiceCategory', 652 'Items' => array( 653 'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''), 654 'Items' => array('Type' => 'TServiceListServiceCategory', 'Caption' => 'Služby', 'Default' => ''), 655 ), 656 ), 639 657 ); 640 658 … … 946 964 'Filter' => '1', 947 965 ), 966 'TServiceCustomerRelListCustomer' => array( 967 'Type' => 'ManyToOne', 968 'Table' => 'ServiceCustomerRel', 969 'Id' => 'Id', 970 'Ref' => 'Customer', 971 'Filter' => '1', 972 ), 948 973 'TPermissionUserAssignmentListUser' => array( 949 974 'Type' => 'ManyToOne', … … 972 997 'Id' => 'Id', 973 998 'Ref' => 'AssignedGroup', 999 'Filter' => '1', 1000 ), 1001 'TServiceListServiceCategory' => array( 1002 'Type' => 'ManyToOne', 1003 'Table' => 'Service', 1004 'Id' => 'Id', 1005 'Ref' => 'Category', 974 1006 'Filter' => '1', 975 1007 ),
Note:
See TracChangeset
for help on using the changeset viewer.