Ignore:
Timestamp:
Apr 14, 2015, 10:20:16 PM (9 years ago)
Author:
chronos
Message:
  • Removed: Spaces on end of line.
  • Modified: Tabs converted to spaces.
File:
1 edited

Legend:

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

    r737 r738  
    159159  function GetVATByType($TypeId)
    160160  {
    161         $Time = time();
    162         $DbResult = $this->Database->select('FinanceVAT', 'Value', '(Type='.$TypeId.
     161    $Time = time();
     162    $DbResult = $this->Database->select('FinanceVAT', 'Value', '(Type='.$TypeId.
    163163      ') AND (ValidFrom <= "'.TimeToMysqlDate($Time).'") AND ((ValidTo >= "'.
    164164      TimeToMysqlDate($Time).'") OR (ValidTo IS NULL)) LIMIT 1');
     
    204204      'DefaultSortOrder' => 1,
    205205      'Items' => array(
    206         'Direction' => array('Type' => 'TFinanceOperationDirection', 'Caption' => 'Směr', 'Default' => '1'),
    207         'DocumentLine' => array('Type' => 'TDocumentLine', 'Caption' => 'Dokladová řada', 'Default' => ''),
     206        'Direction' => array('Type' => 'TFinanceOperationDirection', 'Caption' => 'Směr', 'Default' => '1'),
     207        'DocumentLine' => array('Type' => 'TDocumentLine', 'Caption' => 'Dokladová řada', 'Default' => ''),
    208208        'BillCode' => array('Type' => 'String', 'Caption' => 'Označení', 'Default' => ''),
    209209        'Subject' => array('Type' => 'TSubject', 'Caption' => 'Subjekt', 'Default' => ''),
     
    274274      'DefaultSortOrder' => 1,
    275275      'Items' => array(
    276         'Direction' => array('Type' => 'TFinanceInvoiceDirection', 'Caption' => 'Směr', 'Default' => '1'),
    277         'DocumentLine' => array('Type' => 'TDocumentLine', 'Caption' => 'Dokladová řada', 'Default' => ''),
     276        'Direction' => array('Type' => 'TFinanceInvoiceDirection', 'Caption' => 'Směr', 'Default' => '1'),
     277        'DocumentLine' => array('Type' => 'TDocumentLine', 'Caption' => 'Dokladová řada', 'Default' => ''),
    278278        'BillCode' => array('Type' => 'String', 'Caption' => 'Označení', 'Default' => ''),
    279279        'Subject' => array('Type' => 'TSubject', 'Caption' => 'Subjekt', 'Default' => ''),
     
    286286        'PeriodFrom' => array('Type' => 'Date', 'Caption' => 'Období od', 'Default' => '', 'Null' => true),
    287287        'PeriodTo' => array('Type' => 'Date', 'Caption' => 'Období do', 'Default' => '', 'Null' => true),
    288         'Cash' => array('Type' => 'Boolean', 'Caption' => 'Platit hotově', 'Default' => ''),
     288        'Cash' => array('Type' => 'Boolean', 'Caption' => 'Platit hotově', 'Default' => ''),
    289289        'Items' => array('Type' => 'TFinanceInvoiceItemListInvoice', 'Caption' => 'Položky', 'Default' => ''),
    290290        'OperationRel' => array('Type' => 'TFinanceInvoiceOperationRelListInvoice', 'Caption' => 'Platba', 'Default' => ''),
     
    314314
    315315    $this->System->FormManager->RegisterFormType('TFinanceInvoiceDirection', array(
    316                 'Type' => 'Enumeration',
    317                 'States' => array(-1 => 'Příjem', 1 => 'Výdej'),
     316        'Type' => 'Enumeration',
     317        'States' => array(-1 => 'Příjem', 1 => 'Výdej'),
    318318    ));
    319319
     
    323323      'Items' => array(
    324324        'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => '0'),
    325         'Subject' => array('Type' => 'TSubject', 'Caption' => 'Subjekt', 'Default' => '0'),
     325        'Subject' => array('Type' => 'TSubject', 'Caption' => 'Subjekt', 'Default' => '0'),
    326326      ),
    327327    ));
     
    353353    ));
    354354    $this->System->FormManager->RegisterFormType('TFinanceTreasury', array(
    355         'Type' => 'Reference',
    356         'Table' => 'FinanceTreasury',
    357         'Id' => 'Id',
    358         'Name' => 'Name',
    359         'Filter' => '1',
     355      'Type' => 'Reference',
     356      'Table' => 'FinanceTreasury',
     357      'Id' => 'Id',
     358      'Name' => 'Name',
     359      'Filter' => '1',
    360360    ));
    361361    $this->System->FormManager->RegisterClass('FinanceBankAccount', array(
     
    374374        'LoginPassword' => array('Type' => 'String', 'Caption' => 'Přihlašovací heslo', 'Default' => ''),
    375375        'Operations' => array('Type' => 'TFinanceOperationListAccount', 'Caption' => 'Operace', 'Default' => ''),
    376         'Use' => array('Type' => 'Boolean', 'Caption' => 'Používat', 'Default' => '0'),
     376        'Use' => array('Type' => 'Boolean', 'Caption' => 'Používat', 'Default' => '0'),
    377377        'LastImportDate' => array('Type' => 'Date', 'Caption' => 'Datum posledního importu', 'Default' => ''),
    378378        'LastImportId' => array('Type' => 'String', 'Caption' => 'Id posledního importu', 'Default' => ''),
     
    380380          'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => '(SELECT SUM(`FinanceOperation`.`Value` * `FinanceOperation`.`Direction`) FROM `FinanceOperation` '.
    381381          'WHERE `FinanceOperation`.`BankAccount`=#Id)'),
    382         'AutoImport' => array('Type' => 'Boolean', 'Caption' => 'Automaticky stahovat z banky', 'Default' => ''),
     382        'AutoImport' => array('Type' => 'Boolean', 'Caption' => 'Automaticky stahovat z banky', 'Default' => ''),
    383383      ),
    384384      'ItemActions' => array(
     
    388388    ));
    389389    $this->System->FormManager->RegisterFormType('TFinanceBankAccount', array(
    390         'Type' => 'Reference',
    391         'Table' => 'FinanceBankAccount',
    392         'Id' => 'Id',
    393         'Name' => 'Comment',
    394         'Filter' => '1',
     390      'Type' => 'Reference',
     391      'Table' => 'FinanceBankAccount',
     392      'Id' => 'Id',
     393      'Name' => 'Comment',
     394      'Filter' => '1',
    395395    ));
    396396    $this->System->FormManager->RegisterClass('FinanceBank', array(
     
    433433        'TopTariffPrice' => array('Type' => 'Integer', 'Caption' => 'Nejvyšší cena tarifu', 'Default' => '0', 'Suffix' => 'Kč'),
    434434        'ChangeAction' => array('Type' => 'TActionEnum', 'Caption' => 'Změna - akce', 'Default' => '', 'Null' => true),
    435                 'ChangeTime' => array('Type' => 'DateTime', 'Caption' => 'Změna - čas', 'Default' => '', 'Null' => true),
    436         'ChangeReplaceId' => array('Type' => 'TFinanceCharge', 'Caption' => 'Změna - položka', 'Default' => '0', 'Null' => true),
     435        'ChangeTime' => array('Type' => 'DateTime', 'Caption' => 'Změna - čas', 'Default' => '', 'Null' => true),
     436        'ChangeReplaceId' => array('Type' => 'TFinanceCharge', 'Caption' => 'Změna - položka', 'Default' => '0', 'Null' => true),
    437437      ),
    438438    ));
     
    475475    ));
    476476    $this->System->FormManager->RegisterFormType('TFinanceVAT', array(
    477         'Type' => 'Reference',
    478         'Table' => 'FinanceVAT',
    479         'Id' => 'Id',
    480         'Name' => 'Name',
    481         'Filter' => '1',
     477      'Type' => 'Reference',
     478      'Table' => 'FinanceVAT',
     479      'Id' => 'Id',
     480      'Name' => 'Name',
     481      'Filter' => '1',
    482482    ));
    483483    $this->System->FormManager->RegisterFormType('TFinanceVATType', array(
    484                 'Type' => 'Reference',
    485                 'Table' => 'FinanceVATType',
    486                 'Id' => 'Id',
    487                 'Name' => 'Name',
    488                 'Filter' => '1',
     484      'Type' => 'Reference',
     485      'Table' => 'FinanceVATType',
     486      'Id' => 'Id',
     487      'Name' => 'Name',
     488      'Filter' => '1',
    489489    ));
    490490    $this->System->FormManager->RegisterFormType('TBankAccount', array(
    491         'Type' => 'Reference',
    492         'Table' => 'FinanceBankAccount',
    493         'Id' => 'Id',
    494         'Name' => 'CONCAT(`Comment`, " (", `Number`, "/", '.
    495         '(SELECT `FinanceBank`.`Code` FROM `FinanceBank` WHERE `FinanceBank`.`Id`=`FinanceBankAccount`.`Bank`), ")")',
    496         'Filter' => '1',
     491      'Type' => 'Reference',
     492      'Table' => 'FinanceBankAccount',
     493      'Id' => 'Id',
     494      'Name' => 'CONCAT(`Comment`, " (", `Number`, "/", '.
     495      '(SELECT `FinanceBank`.`Code` FROM `FinanceBank` WHERE `FinanceBank`.`Id`=`FinanceBankAccount`.`Bank`), ")")',
     496      'Filter' => '1',
    497497    ));
    498498
     
    509509  function BeforeInsertFinanceOperation($Form)
    510510  {
    511         if(array_key_exists('Time', $Form->Values)) $Year = date("Y", $Form->Values['Time']);
    512           else $Year = date("Y", $Form->Values['ValidFrom']);
     511    if(array_key_exists('Time', $Form->Values)) $Year = date("Y", $Form->Values['Time']);
     512      else $Year = date("Y", $Form->Values['ValidFrom']);
    513513    $DocumentLine = $Form->Values['DocumentLine'];
    514514    $Form->Values['BillCode'] = $this->System->Modules['Finance']->GetNextDocumentLineNumber($DocumentLine, $Year);
Note: See TracChangeset for help on using the changeset viewer.