Changeset 711 for trunk/Modules/Employee


Ignore:
Timestamp:
Dec 29, 2014, 12:43:16 AM (10 years ago)
Author:
chronos
Message:
  • Modified: Some FormType definition moved from global file to corresponding modules.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Employee/Employee.php

    r638 r711  
    1919      'Title' => 'Zaměstnanci',
    2020      'Table' => 'Employee',
    21       'DefaultSortColumn' => 'Name',
    2221      'Items' => array(
    2322        'FirstName' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
    24         'SecondName' => array('Type' => 'String', 'Caption' => 'Přijímení', 'Default' => ''),
    25         'PeriodicSalary' => array('Type' => 'Integer', 'Caption' => 'Pravidlená mzda', 'Default' => '0', 'Suffix' => 'Kč'),
    26         'ValidFrom' => array('Type' => 'Date', 'Caption' => 'Platnost od', 'Default' => '0'),
     23        'SecondName' => array('Type' => 'String', 'Caption' => 'Příjmení', 'Default' => ''),
     24        'Salary' => array('Type' => 'Integer', 'Caption' => 'Pevná mzda', 'Default' => '0', 'Suffix' => 'Kč'),
     25        'ValidFrom' => array('Type' => 'Date', 'Caption' => 'Platnost od', 'Default' => ''),
    2726        'ValidTo' => array('Type' => 'Date', 'Caption' => 'Platnost do', 'Default' => '', 'Null' => true),
     27        'SalaryList' => array('Type' => 'TEmployeeSalaryList', 'Caption' => 'Mzda', 'Default' => ''),
    2828      ),
    2929    ));
    30     $this->System->FormManager->RegisterClass('EmployeePayment', array(
    31       'Title' => 'Výplaty zaměstnacům',
    32       'Table' => 'EmployeePayment',
     30    $this->System->FormManager->RegisterClass('EmployeeSalary', array(
     31      'Title' => 'Výplaty zaměstnanců',
     32      'Table' => 'EmployeeSalary',
    3333      'Items' => array(
    34         'Employee' => array('Type' => 'TEmployee', 'Caption' => 'Zaměstnanec', 'Default' => ''),
    35         'PeriodFrom' => array('Type' => 'Date', 'Caption' => 'Období od', 'Default' => '0'),
    36         'PeriodTo' => array('Type' => 'Date', 'Caption' => 'Období do', 'Default' => ''),
    37         'Salary' => array('Type' => 'Integer', 'Caption' => 'Částka', 'Default' => '', 'Suffix' => 'Kč'),
    38         'DatePayment' => array('Type' => 'Date', 'Caption' => 'Datum vyplacení', 'Default' => ''),
    39         'WorkHours' => array('Type' => 'Integer', 'Caption' => 'Počet hodin', 'Default' => '0'),
    40         'PayPerHour' => array('Type' => 'Integer', 'Caption' => 'Hodinová mzda', 'Default' => '0'),
    41         'TaxAdvance' => array('Type' => 'Integer', 'Caption' => 'Záloha daně', 'Default' => '0'),
     34        'Date' => array('Type' => 'Date', 'Caption' => 'Datum', 'Default' => ''),
     35        'Employee' => array('Type' => 'TEmployee', 'Caption' => 'Zaměstnance', 'Default' => ''),
     36        'Amount' => array('Type' => 'Integer', 'Caption' => 'Částka', 'Default' => '0', 'Suffix' => 'Kč'),
     37        'Contract' => array('Type' => 'TContract', 'Caption' => 'Smlouva', 'Default' => ''),
    4238      ),
     39    ));         
     40        $this->System->FormManager->RegisterFormType('TEmployee', array(
     41      'Type' => 'Reference',
     42        'Table' => 'Employee',
     43        'Id' => 'Id',
     44        'Name' => 'CONCAT(FirstName, " ", SecondName)',
     45        'Filter' => '1',
     46    ));   
     47    $this->System->FormManager->RegisterFormType('TEmployeeSalaryList', array(
     48        'Type' => 'ManyToOne',
     49        'Table' => 'EmployeeSalary',
     50        'Id' => 'Id',
     51        'Ref' => 'Employee',
     52        'Filter' => '1',
    4353    ));
    44 
    4554  }
    4655}
Note: See TracChangeset for help on using the changeset viewer.