Changeset 916 for trunk/Modules/Finance/Finance.php
- Timestamp:
- Dec 7, 2021, 11:08:42 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Finance.php
r910 r916 36 36 function DoStart(): void 37 37 { 38 global $Config;39 40 38 $this->System->RegisterPage(['finance', 'sprava'], 'PageFinanceManage'); 41 39 $this->System->RegisterPage(['finance', 'platby'], 'PageFinanceUserState'); … … 162 160 'Value' => array('Type' => 'Integer', 'Caption' => 'Částka absolutní', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true), 163 161 'ValueUser' => array('Type' => 'Integer', 'Caption' => 'Částka', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 164 'SQL' => 'SELECT ROUND(SUM(`Price`*`Quantity`), '.$ Config['Finance']['Rounding'].') FROM `FinanceInvoiceItem` WHERE `FinanceInvoiceItem`.`FinanceInvoice`=#Id'),162 'SQL' => 'SELECT ROUND(SUM(`Price`*`Quantity`), '.$this->System->Config['Finance']['Rounding'].') FROM `FinanceInvoiceItem` WHERE `FinanceInvoiceItem`.`FinanceInvoice`=#Id'), 165 163 'File' => array('Type' => 'TFile', 'Caption' => 'Doklad', 'Default' => '', 'Null' => true), 166 164 'Generate' => array('Type' => 'Boolean', 'Caption' => 'Generovat', 'Default' => ''), … … 244 242 'VAT' => array('Type' => 'Integer', 'Caption' => 'Daň', 'Default' => '21', 'Suffix' => '%'), 245 243 'Total' => array('Type' => 'Integer', 'Caption' => 'Celkem', 'Default' => '', 'Suffix' => 'Kč', 246 'ReadOnly' => true, 'SQL' => 'ROUND(`Price` * `Quantity`, '.$ Config['Finance']['Rounding'].')'),244 'ReadOnly' => true, 'SQL' => 'ROUND(`Price` * `Quantity`, '.$this->System->Config['Finance']['Rounding'].')'), 247 245 ), 248 246 'AfterInsert' => array($this, 'AfterInsertFinanceInvoiceItem'), … … 259 257 'State' => array('Type' => 'Float', 'Caption' => 'Stav', 'Default' => '', 260 258 'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => 'IFNULL(ROUND((SELECT SUM(`FinanceOperation`.`Value`) FROM `FinanceOperation` '. 261 'WHERE `FinanceOperation`.`Treasury`=#Id), '.$ Config['Finance']['Rounding'].'), 0)'),259 'WHERE `FinanceOperation`.`Treasury`=#Id), '.$this->System->Config['Finance']['Rounding'].'), 0)'), 262 260 'Operations' => array('Type' => 'TFinanceOperationListTreasury', 'Caption' => 'Operace', 'Default' => ''), 263 261 'Check' => array('Type' => 'TFinanceTreasuryCheckListTreasury', 'Caption' => 'Kontrola', 'Default' => ''), … … 568 566 )); 569 567 570 $this->Finance->MainSubject = $ Config['Finance']['MainSubjectId'];571 $this->Finance->DirectoryId = $ Config['Finance']['DirectoryId'];568 $this->Finance->MainSubject = $this->System->Config['Finance']['MainSubjectId']; 569 $this->Finance->DirectoryId = $this->System->Config['Finance']['DirectoryId']; 572 570 573 571 ModuleIS::Cast($this->System->GetModule('IS'))->RegisterDashboardItem('Finance', array($this, 'ShowDashboardItem'));
Note:
See TracChangeset
for help on using the changeset viewer.