Changeset 899 for trunk/Modules/Finance/Finance.php
- Timestamp:
- Feb 17, 2021, 12:30:23 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Finance.php
r894 r899 8 8 include_once(dirname(__FILE__).'/Trade.php'); 9 9 10 class ModuleFinance extends AppModule10 class ModuleFinance extends Module 11 11 { 12 12 public Finance $Finance; … … 21 21 $this->License = 'GNU/GPLv3'; 22 22 $this->Description = 'Base module for finance management'; 23 $this->Dependencies = array('File', 'EmailQueue', 'Subject', 'Document'); 24 25 $this->Bill = new Bill($this->System); 26 $this->Finance = new Finance($this->System); 27 } 28 29 function GetModels(): array 30 { 31 return array(FinanceBillingPeriod::GetClassName(), FinanceVatType::GetClassName(), FinanceVat::GetClassName(), 23 $this->Dependencies = array(ModuleFile::GetName(), ModuleEmailQueue::GetName(), ModuleSubject::GetName(), ModuleDocument::GetName()); 24 $this->Models = array(FinanceBillingPeriod::GetClassName(), FinanceVatType::GetClassName(), FinanceVat::GetClassName(), 32 25 FinanceGroup::GetClassName(), FinanceOperationGroup::GetClassName(), FinanceOperation::GetClassName(), 33 26 FinanceInvoiceGroup::GetClassName(), FinanceInvoice::GetClassName(), FinanceInvoiceItem::GetClassName(), … … 35 28 Currency::GetClassName(), FinanceBank::GetClassName(), FinanceBankAccount::GetClassName(), FinanceCharge::GetClassName(), 36 29 Contract::GetClassName(), FinanceInvoiceOperationRel::GetClassName()); 30 31 $this->Bill = new Bill($this->System); 32 $this->Finance = new Finance($this->System); 37 33 } 38 34 … … 632 628 } 633 629 634 static function Cast( AppModule $AppModule): ModuleFinance635 { 636 if ($ AppModule instanceof ModuleFinance)630 static function Cast(Module $Module): ModuleFinance 631 { 632 if ($Module instanceof ModuleFinance) 637 633 { 638 return $ AppModule;634 return $Module; 639 635 } 640 throw new Exception('Expected ModuleFinance type but '.gettype($ AppModule));636 throw new Exception('Expected ModuleFinance type but '.gettype($Module)); 641 637 } 642 638 }
Note:
See TracChangeset
for help on using the changeset viewer.