Changeset 933 for trunk/Modules/Finance/Finance.php
- Timestamp:
- May 11, 2022, 9:51:06 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Finance.php
r916 r933 36 36 function DoStart(): void 37 37 { 38 $this->Finance->MainSubject = $this->System->Config['Finance']['MainSubjectId']; 39 $this->Finance->DirectoryId = $this->System->Config['Finance']['DirectoryId']; 40 38 41 $this->System->RegisterPage(['finance', 'sprava'], 'PageFinanceManage'); 39 42 $this->System->RegisterPage(['finance', 'platby'], 'PageFinanceUserState'); … … 453 456 'Id' => array('Type' => 'TFinanceYear', 'Caption' => 'Rok', 'Default' => '', 454 457 'ReadOnly' => true), 455 'Income' => array('Type' => 'Integer', 'Caption' => ' Příjmy', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true,458 'Income' => array('Type' => 'Integer', 'Caption' => 'Evidenční příjmy', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 456 459 'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value`)) FROM `FinanceOperation` '. 457 460 'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id`=`FinanceOperation`.`Group` '. 458 461 'WHERE (`FinanceOperation`.`Time` <= `DateEnd`) '. 459 462 'AND (`FinanceOperation`.`Time` >= `DateStart`) AND (`FinanceOperationGroup`.`ValueSign` = 1))'), 460 'Spending' => array('Type' => 'Integer', 'Caption' => ' Výdaje', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true,463 'Spending' => array('Type' => 'Integer', 'Caption' => 'Evidenční výdaje', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 461 464 'SQL' => '(SELECT -ROUND(SUM(`FinanceOperation`.`Value`)) FROM `FinanceOperation` '. 462 465 'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id`=`FinanceOperation`.`Group` '. 463 466 'WHERE (`FinanceOperation`.`Time` <= `DateEnd`) '. 464 467 'AND (`FinanceOperation`.`Time` >= `DateStart`) AND (`FinanceOperationGroup`.`ValueSign` = -1))'), 465 'OperationBalance' => array('Type' => 'Integer', 'Caption' => ' Zisk', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true,468 'OperationBalance' => array('Type' => 'Integer', 'Caption' => 'Evidenční zisk', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 466 469 'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value`)) FROM `FinanceOperation` '. 467 470 'WHERE (`FinanceOperation`.`Time` <= `DateEnd`) '. 471 'AND (`FinanceOperation`.`Time` >= `DateStart`))'), 472 'RealIncome' => array('Type' => 'Integer', 'Caption' => 'Skutečné příjmy', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 473 'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value`)) FROM `FinanceOperation` '. 474 'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id`=`FinanceOperation`.`Group` '. 475 'WHERE (`FinanceOperation`.`Time` <= `DateEnd`) AND (`FinanceOperation`.`Subject` != '.$this->Finance->MainSubject.')'. 476 'AND (`FinanceOperation`.`Time` >= `DateStart`) AND (`FinanceOperationGroup`.`ValueSign` = 1))'), 477 'RealSpending' => array('Type' => 'Integer', 'Caption' => 'Skutečné výdaje', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 478 'SQL' => '(SELECT -ROUND(SUM(`FinanceOperation`.`Value`)) FROM `FinanceOperation` '. 479 'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id`=`FinanceOperation`.`Group` '. 480 'WHERE (`FinanceOperation`.`Time` <= `DateEnd`) AND (`FinanceOperation`.`Subject` != '.$this->Finance->MainSubject.')'. 481 'AND (`FinanceOperation`.`Time` >= `DateStart`) AND (`FinanceOperationGroup`.`ValueSign` = -1))'), 482 'RealOperationBalance' => array('Type' => 'Integer', 'Caption' => 'Skutečný zisk', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 483 'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value`)) FROM `FinanceOperation` '. 484 'WHERE (`FinanceOperation`.`Time` <= `DateEnd`) AND (`FinanceOperation`.`Subject` != '.$this->Finance->MainSubject.')'. 468 485 'AND (`FinanceOperation`.`Time` >= `DateStart`))'), 469 486 'TaxIncome' => array('Type' => 'Integer', 'Caption' => 'Daňové příjmy', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, … … 566 583 )); 567 584 568 $this->Finance->MainSubject = $this->System->Config['Finance']['MainSubjectId'];569 $this->Finance->DirectoryId = $this->System->Config['Finance']['DirectoryId'];570 571 585 ModuleIS::Cast($this->System->GetModule('IS'))->RegisterDashboardItem('Finance', array($this, 'ShowDashboardItem')); 572 586 }
Note:
See TracChangeset
for help on using the changeset viewer.