Changeset 906 for trunk


Ignore:
Timestamp:
Feb 19, 2021, 6:19:14 PM (4 years ago)
Author:
chronos
Message:
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r905 r906  
    11<?php
    22
    3 $Revision = 905; // Subversion revision
     3$Revision = 906; // Subversion revision
    44$DatabaseRevision = 901; // SQL structure revision
    55$ReleaseTime = strtotime('2021-02-19');
  • trunk/Modules/Finance/Finance.php

    r901 r906  
    496496          'SQL' => '(SELECT ROUND(SUM(`FinanceInvoice`.`Value`)) FROM `FinanceInvoice` WHERE (`FinanceInvoice`.`Time` <= `DateEnd`) '.
    497497          'AND (`FinanceInvoice`.`Time` >= `DateStart`))'),
     498        'IncomeList' => array('Type' => 'TIncomeList', 'Caption' => 'Příjmy', 'Default' => '0'),
     499        'SpendingList' => array('Type' => 'TSpendingList', 'Caption' => 'Výdaje', 'Default' => '0'),
     500        'TaxIncomeList' => array('Type' => 'TTaxIncomeList', 'Caption' => 'Daňové příjmy', 'Default' => '0'),
     501        'TaxSpendingList' => array('Type' => 'TTaxSpendingList', 'Caption' => 'Daňové výdaje', 'Default' => '0'),
     502        'ClaimsList' => array('Type' => 'TClaimsList', 'Caption' => 'Pohledávky', 'Default' => '0'),
     503        'LiabilitiesList' => array('Type' => 'TLiabilitiesList', 'Caption' => 'Závazky', 'Default' => '0'),
    498504      ),
    499505      //'AfterInsert' => array($this, 'AfterInsertFinanceYear'),
     506    ));
     507    $this->System->FormManager->RegisterFormType('TClaimsList', array(
     508      'Type' => 'ManyToOne',
     509      'Table' => 'FinanceInvoice',
     510      'Id' => 'Id',
     511      'Ref' => '',
     512      'Filter' => '(`TX`.`Time` <= (SELECT `FinanceYear`.`DateEnd` FROM `FinanceYear` WHERE `FinanceYear`.`Id`=#Id)) '.
     513        'AND (`TX`.`Time` >= (SELECT `FinanceYear`.`DateStart` FROM `FinanceYear` WHERE `FinanceYear`.`Id`=#Id)) '.
     514        'AND (SIGN(`TX`.`Value`) > 0)',
     515    ));
     516    $this->System->FormManager->RegisterFormType('TLiabilitiesList', array(
     517      'Type' => 'ManyToOne',
     518      'Table' => 'FinanceInvoice',
     519      'Id' => 'Id',
     520      'Ref' => '',
     521      'Filter' => '(`TX`.`Time` <= (SELECT `FinanceYear`.`DateEnd` FROM `FinanceYear` WHERE `FinanceYear`.`Id`=#Id)) '.
     522        'AND (`TX`.`Time` >= (SELECT `FinanceYear`.`DateStart` FROM `FinanceYear` WHERE `FinanceYear`.`Id`=#Id)) '.
     523        'AND (SIGN(`TX`.`Value`) < 0)',
     524    ));
     525    $this->System->FormManager->RegisterFormType('TSpendingList', array(
     526      'Type' => 'ManyToOne',
     527      'Table' => 'FinanceOperation',
     528      'Id' => 'Id',
     529      'Ref' => '',
     530      'Filter' => '(`TX`.`Time` <= (SELECT `FinanceYear`.`DateEnd` FROM `FinanceYear` WHERE `FinanceYear`.`Id`=#Id)) '.
     531        'AND (`TX`.`Time` >= (SELECT `FinanceYear`.`DateStart` FROM `FinanceYear` WHERE `FinanceYear`.`Id`=#Id)) '.
     532        'AND (SIGN(`TX`.`Value`) < 0)',
     533    ));
     534    $this->System->FormManager->RegisterFormType('TIncomeList', array(
     535      'Type' => 'ManyToOne',
     536      'Table' => 'FinanceOperation',
     537      'Id' => 'Id',
     538      'Ref' => '',
     539      'Filter' => '(`TX`.`Time` <= (SELECT `FinanceYear`.`DateEnd` FROM `FinanceYear` WHERE `FinanceYear`.`Id`=#Id)) '.
     540        'AND (`TX`.`Time` >= (SELECT `FinanceYear`.`DateStart` FROM `FinanceYear` WHERE `FinanceYear`.`Id`=#Id)) '.
     541        'AND (SIGN(`TX`.`Value`) > 0)',
     542    ));
     543    $this->System->FormManager->RegisterFormType('TTaxSpendingList', array(
     544      'Type' => 'ManyToOne',
     545      'Table' => 'FinanceOperation',
     546      'Id' => 'Id',
     547      'Ref' => '',
     548      'Filter' => '(`TX`.`Time` <= (SELECT `FinanceYear`.`DateEnd` FROM `FinanceYear` WHERE `FinanceYear`.`Id`=#Id)) '.
     549        'AND (`TX`.`Time` >= (SELECT `FinanceYear`.`DateStart` FROM `FinanceYear` WHERE `FinanceYear`.`Id`=#Id)) '.
     550        'AND (SIGN(`TX`.`Value`) < 0) AND (`TX`.`Taxable` = 1)',
     551    ));
     552    $this->System->FormManager->RegisterFormType('TTaxIncomeList', array(
     553      'Type' => 'ManyToOne',
     554      'Table' => 'FinanceOperation',
     555      'Id' => 'Id',
     556      'Ref' => '',
     557      'Filter' => '(`TX`.`Time` <= (SELECT `FinanceYear`.`DateEnd` FROM `FinanceYear` WHERE `FinanceYear`.`Id`=#Id)) '.
     558        'AND (`TX`.`Time` >= (SELECT `FinanceYear`.`DateStart` FROM `FinanceYear` WHERE `FinanceYear`.`Id`=#Id)) '.
     559        'AND (SIGN(`TX`.`Value`) > 0) AND (`TX`.`Taxable` = 1)',
    500560    ));
    501561    $this->System->FormManager->RegisterClass('FinanceInvoiceOperationRel', array(
Note: See TracChangeset for help on using the changeset viewer.