Ignore:
Timestamp:
Jan 19, 2012, 8:23:04 AM (13 years ago)
Author:
chronos
Message:
  • Přidáno: Definice některých modelů modulu Finance.
File:
1 edited

Legend:

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

    r366 r367  
    66include_once('spotreba.php');
    77include_once('inventory.php');
     8include_once('clenove.php');
    89include_once('monthly_overall.php');
    910include_once('manage.php');
    1011include_once('user_state.php');
     12include_once('import.php');
     13include_once('zivnost.php');
    1114
    1215class FinancePage extends Page
     
    2831        else if($this->System->PathItems[1] == 'clenove') $PageClass = 'FinanceUserList';
    2932        else if($this->System->PathItems[1] == 'sprava') $PageClass = 'FinanceManagePage';
     33        else if($this->System->PathItems[1] == 'import') $PageClass = 'FinanceImportPayment';
     34        else if($this->System->PathItems[1] == 'zivnost') $PageClass = 'FinanceTaxFilingPage';
    3035        else if($this->System->PathItems[1] == 'mesicni-prehled') $PageClass = 'FinanceMonthlyOverallPage';
    3136        else return(PAGE_NOT_FOUND);
     
    4247}
    4348
     49class DocumentLine extends Model
     50{
     51  function __construct($Database, $System)
     52  {
     53    parent::__construct($Database, $System);
     54    $this->Name = 'DocumentLine';
     55    $this->AddPropertyString('Name');
     56    $this->AddPropertyString('ShortCut');
     57  }
     58}
     59
     60class DocumentLineSequence extends Model
     61{
     62  function __construct($Database, $System)
     63  {
     64    parent::__construct($Database, $System);
     65    $this->Name = 'DocumentLineSequence';
     66    $this->AddPropertyOneToMany('DocumentLine', 'DocumentLine');
     67    $this->AddPropertyOneToMany('FinanceYear', 'FinanceYear');
     68    $this->AddPropertyInteger('NextNumber');
     69    $this->AddPropertyBoolean('YearPrefix');
     70  }
     71}
     72
     73class FinanceYear extends Model
     74{
     75  function __construct($Database, $System)
     76  {
     77    parent::__construct($Database, $System);
     78    $this->Name = 'FinanceYear';
     79    $this->AddPropertyInteger('Year');
     80    $this->AddPropertyDate('DateStart');
     81    $this->AddPropertyDate('DateEnd');
     82  }
     83}
     84
     85class FinanceTariff extends Model
     86{
     87  function __construct($Database, $System)
     88  {
     89    parent::__construct($Database, $System);
     90    $this->Name = 'FinanceTariff';
     91    $this->AddPropertyString('Name');
     92    $this->AddPropertyInteger('Group');
     93    $this->AddPropertyInteger('SpeedMin');
     94    $this->AddPropertyInteger('SpeedMax');
     95    $this->AddPropertyInteger('UploadAsymmetry');
     96    $this->AddPropertyInteger('Price');
     97    $this->AddPropertyInteger('MemberCount');
     98    $this->AddPropertyOneToMany('ReplaceId', 'FinanceTariff');
     99    $this->AddPropertyBoolean('Public');
     100  }
     101}
     102
     103class FinanceOperation extends Model
     104{
     105  function __construct($Database, $System)
     106  {
     107    parent::__construct($Database, $System);
     108    $this->Name = 'FinanceOperation';
     109    $this->AddPropertyDateTime('Time');
     110    $this->AddPropertyOneToMany('Subject', 'Subject');
     111    $this->AddPropertyBoolean('Cash');
     112    $this->AddPropertyFloat('Value');
     113    $this->AddPropertyString('BillCode');
     114    $this->AddPropertyBoolean('Taxable');
     115    $this->AddPropertyOneToMany('Bill', 'FinanceBills');
     116    $this->AddPropertyString('Text');
     117    $this->AddPropertyBoolean('Network');
     118  }
     119}
     120
     121class FinanceClaimsLiabilities extends Model
     122{
     123  function __construct($Database, $System)
     124  {
     125    parent::__construct($Database, $System);
     126    $this->Name = 'FinanceClaimsLiabilities';
     127    $this->AddPropertyString('BillCode');
     128    $this->AddPropertyOneToMany('Subject', 'Subject');
     129    $this->AddPropertyDateTime('TimeCreate');
     130    $this->AddPropertyDateTime('TimeDue');
     131    $this->AddPropertyDateTime('TimePayment');
     132    $this->AddPropertyFloat('Value');
     133    $this->AddPropertyOneToMany('Bill', 'FinanceBills');
     134    $this->AddPropertyString('Text');   
     135  }
     136}
     137
     138class FinanceBills extends Model
     139{
     140  function __construct($Database, $System)
     141  {
     142    parent::__construct($Database, $System);
     143    $this->Name = 'FinanceBills';
     144    $this->AddPropertyDateTime('TimeFrom');
     145    $this->AddPropertyOneToMany('Subject', 'Subject');
     146    $this->AddPropertyDateTime('TimeTo');
     147    $this->AddPropertyDateTime('TimeDue');
     148    $this->AddPropertyDateTime('TimeCreate');
     149    $this->AddPropertyString('BillCode');
     150    $this->AddPropertyString('Type');
     151    $this->AddPropertyBoolean('Cash');   
     152  }
     153}
     154
     155class FinanceBillsItems extends Model
     156{
     157  function __construct($Database, $System)
     158  {
     159    parent::__construct($Database, $System);
     160    $this->Name = 'FinanceBillsItems';
     161    $this->AddPropertyOneToMany('Bill', 'FinanceBills');
     162    $this->AddPropertyString('Description');
     163    $this->AddPropertyFloat('Price');
     164    $this->AddPropertyFloat('Quantity');
     165  }
     166}
    44167
    45168class ModuleFinance extends Module
     
    80203    $this->Description = 'Accounting processing';
    81204    $this->Dependencies = array('User');
    82     $this->Models = array();
     205    $this->Models = array('FinanceYear', 'DocumentLine', 'DocumentLineSequence',
     206      'FinanceTariff', 'FinanceOperation', 'FinanceClaimsLiabilities',
     207      'FinanceBills', 'FinanceBillsItems');
    83208  }
    84209 
Note: See TracChangeset for help on using the changeset viewer.