Changeset 899 for trunk/Modules/Finance
- Timestamp:
- Feb 17, 2021, 12:30:23 PM (4 years ago)
- Location:
- trunk/Modules/Finance
- Files:
-
- 2 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 } -
trunk/Modules/Finance/FinanceModels.php
r894 r899 217 217 class FinanceGroup extends Model 218 218 { 219 static function Get Desc(): ModelDesc219 static function GetModelDesc(): ModelDesc 220 220 { 221 221 $Desc = new ModelDesc(self::GetClassName()); … … 227 227 class FinanceOperation extends Model 228 228 { 229 static function Get Desc(): ModelDesc229 static function GetModelDesc(): ModelDesc 230 230 { 231 231 $Desc = new ModelDesc(self::GetClassName()); … … 250 250 class FinanceOperationGroup extends Model 251 251 { 252 static function Get Desc(): ModelDesc252 static function GetModelDesc(): ModelDesc 253 253 { 254 254 $Desc = new ModelDesc(self::GetClassName()); … … 263 263 class FinanceInvoice extends Model 264 264 { 265 static function Get Desc(): ModelDesc265 static function GetModelDesc(): ModelDesc 266 266 { 267 267 $Desc = new ModelDesc(self::GetClassName()); … … 285 285 class FinanceInvoiceGroup extends Model 286 286 { 287 static function Get Desc(): ModelDesc287 static function GetModelDesc(): ModelDesc 288 288 { 289 289 $Desc = new ModelDesc(self::GetClassName()); … … 298 298 class Company extends Model 299 299 { 300 static function Get Desc(): ModelDesc300 static function GetModelDesc(): ModelDesc 301 301 { 302 302 $Desc = new ModelDesc(self::GetClassName()); … … 309 309 class FinanceInvoiceItem extends Model 310 310 { 311 static function Get Desc(): ModelDesc311 static function GetModelDesc(): ModelDesc 312 312 { 313 313 $Desc = new ModelDesc(self::GetClassName()); … … 323 323 class FinanceTreasury extends Model 324 324 { 325 static function Get Desc(): ModelDesc325 static function GetModelDesc(): ModelDesc 326 326 { 327 327 $Desc = new ModelDesc(self::GetClassName()); … … 334 334 class FinanceTreasuryCheck extends Model 335 335 { 336 static function Get Desc(): ModelDesc336 static function GetModelDesc(): ModelDesc 337 337 { 338 338 $Desc = new ModelDesc(self::GetClassName()); … … 357 357 class FinanceBankAccount extends Model 358 358 { 359 static function Get Desc(): ModelDesc359 static function GetModelDesc(): ModelDesc 360 360 { 361 361 $Desc = new ModelDesc(self::GetClassName()); … … 379 379 class FinanceBank extends Model 380 380 { 381 static function Get Desc(): ModelDesc381 static function GetModelDesc(): ModelDesc 382 382 { 383 383 $Desc = new ModelDesc(self::GetClassName()); … … 392 392 class Currency extends Model 393 393 { 394 static function Get Desc(): ModelDesc394 static function GetModelDesc(): ModelDesc 395 395 { 396 396 $Desc = new ModelDesc(self::GetClassName()); … … 404 404 class FinanceCharge extends Model 405 405 { 406 static function Get Desc(): ModelDesc406 static function GetModelDesc(): ModelDesc 407 407 { 408 408 $Desc = new ModelDesc(self::GetClassName()); … … 422 422 class FinanceVat extends Model 423 423 { 424 static function Get Desc(): ModelDesc424 static function GetModelDesc(): ModelDesc 425 425 { 426 426 $Desc = new ModelDesc(self::GetClassName()); … … 435 435 class FinanceVatType extends Model 436 436 { 437 static function Get Desc(): ModelDesc437 static function GetModelDesc(): ModelDesc 438 438 { 439 439 $Desc = new ModelDesc(self::GetClassName()); … … 445 445 class Contract extends Model 446 446 { 447 static function Get Desc(): ModelDesc447 static function GetModelDesc(): ModelDesc 448 448 { 449 449 $Desc = new ModelDesc(self::GetClassName()); … … 460 460 class FinanceBillingPeriod extends Model 461 461 { 462 static function Get Desc(): ModelDesc462 static function GetModelDesc(): ModelDesc 463 463 { 464 464 $Desc = new ModelDesc(self::GetClassName()); … … 471 471 class FinanceInvoiceOperationRel extends Model 472 472 { 473 static function Get Desc(): ModelDesc473 static function GetModelDesc(): ModelDesc 474 474 { 475 475 $Desc = new ModelDesc(self::GetClassName());
Note:
See TracChangeset
for help on using the changeset viewer.