Ignore:
Timestamp:
Dec 29, 2020, 11:11:12 PM (4 years ago)
Author:
chronos
Message:
  • Fixed: Modules dependencies evaluation.
  • Modified: Better installation/uninstallation of models in more modules.
File:
1 edited

Legend:

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

    r888 r890  
    277277        'Treasury' => array('Type' => 'TFinanceTreasury', 'Caption' => 'Pokladna', 'Default' => '', 'Null' => true),
    278278        'Generate' => array('Type' => 'Boolean', 'Caption' => 'Generovat', 'Default' => ''),
     279        'Balance' => array('Type' => 'Integer', 'Caption' => 'Zůstatek', 'Default' => '',
     280          'ReadOnly' => true, 'SQL' => '(SELECT SUM(`FinanceOperation2`.`Value`) FROM `FinanceOperation` AS `FinanceOperation2` WHERE `FinanceOperation2`.`Time`<`Time`)'),
    279281        'InvoiceRel' => array('Type' => 'TFinanceInvoiceOperationRelListOperation', 'Caption' => 'Zaplacené faktury', 'Default' => ''),
    280282        'InvoiceRelCount' => array('Type' => 'Integer', 'Caption' => 'Faktur',
     
    289291      ),
    290292    ));
    291 
     293   
    292294    $this->System->FormManager->RegisterClass('FinanceTreasuryIn', $this->System->FormManager->Classes['FinanceOperation']);
    293295    $this->System->FormManager->Classes['FinanceTreasuryIn']['Title'] = 'Pokladní příjmy';
     
    543545      ),
    544546    ));
     547    $this->System->FormManager->RegisterClass('FinanceBankAccountReport', array(
     548      'Title' => 'Roční výkaz operací',
     549      'Table' => 'FinanceBankAccountReport',
     550      'SQL' => 'SELECT Id, DateEnd, DateStart FROM FinanceYear',
     551      'DefaultSortColumn' => 'Id',
     552      'Items' => array(
     553        'Id' => array('Type' => 'TFinanceYear', 'Caption' => 'Rok', 'Default' => '',
     554          'ReadOnly' => true),
     555        //'Account' => array('Type' => 'TFinanceBankAccount', 'Caption' => 'Bankovní účet', 'Default' => '',
     556        //  'ReadOnly' => true),
     557        'StartBalance' => array('Type' => 'Integer', 'Caption' => 'Starý zůstatek', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true,
     558          'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value`)) FROM `FinanceOperation` '.
     559          'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id`=`FinanceOperation`.`Group` '.
     560          'WHERE (`FinanceOperation`.`Time` <= `DateStart`) AND (`FinanceOperation`.`BankAccount` = 2))'),
     561        'EndBalance' => array('Type' => 'Integer', 'Caption' => 'Nový zůstatek', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true,
     562          'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value`)) FROM `FinanceOperation` '.
     563          'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id`=`FinanceOperation`.`Group` '.
     564          'WHERE (`FinanceOperation`.`Time` <= `DateEnd`) AND (`FinanceOperation`.`BankAccount` = 2))'),
     565        'Change' => array('Type' => 'Integer', 'Caption' => 'Změna', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true,
     566          'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value`)) FROM `FinanceOperation` '.
     567          'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id`=`FinanceOperation`.`Group` '.
     568          'WHERE (`FinanceOperation`.`Time` <= `DateEnd`) '.
     569          'AND (`FinanceOperation`.`Time` >= `DateStart`) AND (`FinanceOperation`.`BankAccount` = 2))'),
     570      ),
     571      //'AfterInsert' => array($this, 'AfterInsertFinanceYear'),
     572    ));
    545573    $this->System->FormManager->RegisterFormType('TFinanceBankAccount', array(
    546574      'Type' => 'Reference',
Note: See TracChangeset for help on using the changeset viewer.