Changeset 729 for trunk/Modules/FinanceBankAPI
- Timestamp:
- Jan 12, 2015, 12:20:30 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/FinanceBankAPI/FinanceBankAPI.php
r639 r729 4 4 include_once(dirname(__FILE__).'/ImportPS.php'); 5 5 include_once(dirname(__FILE__).'/ImportFio.php'); 6 include_once(dirname(__FILE__).'/../Scheduler/Scheduler.php'); 6 7 7 8 class ModuleFinanceBankAPI extends AppModule … … 15 16 $this->License = 'GNU/GPLv3'; 16 17 $this->Description = 'Communication through API to various banks, manual file import'; 17 $this->Dependencies = array('Finance' );18 $this->Dependencies = array('Finance', 'Scheduler'); 18 19 } 19 20 … … 58 59 59 60 $this->System->RegisterPage(array('finance', 'import-api'), 'PageImportAPI'); 60 $this->System->RegisterPage(array('finance', 'import-soubor'), 'PageImportFile'); 61 $this->System->RegisterPage(array('finance', 'import-soubor'), 'PageImportFile'); 61 62 } 62 63 … … 81 82 } 82 83 } 84 85 class ScheduleBankImport extends SchedulerTask 86 { 87 function Execute() 88 { 89 $Output = ''; 90 $DbResult = $this->Database->select('FinanceBankAccount', 'Id', '(AutoImport=1) AND ((TimeEnd IS NULL) OR (TimeEnd > NOW()))'); 91 while($DbRow = $DbResult->fetch_assoc()) 92 { 93 $Page = new PageImportAPI($this->System); 94 $Output .= $Page->Show(); 95 } 96 return($Output); 97 } 98 }
Note:
See TracChangeset
for help on using the changeset viewer.