Changeset 639 for trunk/Modules/Finance/Finance.php
- Timestamp:
- Mar 16, 2014, 1:33:22 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Finance.php
r632 r639 15 15 define('TARIFF_FREE', 7); 16 16 define('INVOICE_DUE_DAYS', 15); 17 define('INVOICE_OUT_DOC_LINE', 6); 17 define('DOC_LINE_INVOICE_OUT', 6); 18 define('DOC_LINE_ACCOUNT_IN', 3); 19 define('DOC_LINE_ACCOUNT_OUT', 4); 20 18 21 19 22 class Finance extends Model … … 302 305 $this->Description = 'Base module for finance management'; 303 306 $this->Dependencies = array('File', 'EmailQueue'); 304 } 307 } 305 308 306 309 function DoInstall() 307 310 { 308 311 } 309 312 310 313 function DoUninstall() 311 { 312 } 313 314 { 315 } 316 314 317 function DoStart() 315 318 { 316 319 global $Config; 317 320 318 321 $this->System->RegisterPage('finance', 'PageFinance'); 319 322 $this->System->RegisterPage(array('finance', 'spotreba'), 'PageFinanceConsumption'); … … 324 327 $this->System->RegisterPage(array('finance', 'sprava'), 'PageFinanceManage'); 325 328 $this->System->RegisterPage(array('finance', 'platby'), 'PageFinanceUserState'); 326 $this->System->RegisterPage(array('finance', 'import'), 'PageFinanceImportPayment'); 329 $this->System->RegisterPage(array('finance', 'import'), 'PageFinanceImportPayment'); 327 330 $this->System->RegisterPage(array('finance', 'zivnost'), 'PageFinanceTaxFiling'); 328 331 … … 345 348 'Treasury' => array('Type' => 'TFinanceTreasury', 'Caption' => 'Pokladna', 'Default' => '', 'Null' => true), 346 349 'Generate' => array('Type' => 'Boolean', 'Caption' => 'Generovat', 'Default' => ''), 347 'InvoiceRel' => array('Type' => 'TFinanceInvoiceOperationRelListOperation', 'Caption' => 'Zaplacené faktury', 'Default' => ''), 350 'InvoiceRel' => array('Type' => 'TFinanceInvoiceOperationRelListOperation', 'Caption' => 'Zaplacené faktury', 'Default' => ''), 348 351 ), 349 352 'BeforeInsert' => array($this, 'BeforeInsertFinanceOperation'), … … 378 381 'VAT' => array('Type' => 'Integer', 'Caption' => 'Daň', 'Default' => '21', 'Suffix' => '%'), 379 382 ), 380 )); 383 )); 381 384 $this->System->FormManager->RegisterClass('FinanceTreasury', array( 382 385 'Title' => 'Pokladny', … … 386 389 'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''), 387 390 'TimeCreate' => array('Type' => 'Date', 'Caption' => 'Čas vytvoření', 'Default' => ''), 388 'State' => array('Type' => 'Float', 'Caption' => 'Stav', 'Default' => '', 391 'State' => array('Type' => 'Float', 'Caption' => 'Stav', 'Default' => '', 389 392 'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => '(SELECT SUM(`FinanceOperation`.`Value`) FROM `FinanceOperation` '. 390 393 'WHERE `FinanceOperation`.`Treasury`=#Id)'), … … 409 412 'LastImportDate' => array('Type' => 'Date', 'Caption' => 'Datum posledního importu', 'Default' => ''), 410 413 'LastImportId' => array('Type' => 'String', 'Caption' => 'Id posledního importu', 'Default' => ''), 411 'State' => array('Type' => 'Float', 'Caption' => 'Stav', 'Default' => '', 414 'State' => array('Type' => 'Float', 'Caption' => 'Stav', 'Default' => '', 412 415 'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => '(SELECT SUM(`FinanceOperation`.`Value`) FROM `FinanceOperation` '. 413 416 'WHERE `FinanceOperation`.`BankAccount`=#Id)'), … … 432 435 'Table' => 'Currency', 433 436 'Items' => array( 434 'Code' => array('Type' => 'String', 'Caption' => 'Kód' ),437 'Code' => array('Type' => 'String', 'Caption' => 'Kód', 'Default' => ''), 435 438 'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''), 436 439 'Symbol' => array('Type' => 'String', 'Caption' => 'Symbol', 'Default' => ''), … … 452 455 'ReplaceId' => array('Type' => 'TFinanceCharge', 'Caption' => 'Cílová položka', 'Default' => '0', 'Null' => true), 453 456 ), 454 )); 455 457 )); 458 456 459 $this->System->AddModule(new Bill($this->System)); 457 460 $this->System->AddModule(new Finance($this->System)); 458 461 $this->System->Modules['Finance']->MainSubject = $Config['Finance']['MainSubjectId']; 459 462 $this->System->Modules['Finance']->DirectoryId = $Config['Finance']['DirectoryId']; 460 } 461 463 } 464 462 465 function DoStop() 463 { 464 } 465 466 { 467 } 468 466 469 function BeforeInsertFinanceOperation($Form) 467 470 { … … 470 473 $Form->Values['BillCode'] = $this->System->Modules['Finance']->GetNextDocumentLineNumber($DocumentLine, $Year); 471 474 return($Form->Values); 472 } 475 } 473 476 }
Note:
See TracChangeset
for help on using the changeset viewer.