<?php

include_once(dirname(__FILE__).'/FileImport.php');
include_once(dirname(__FILE__).'/ImportPS.php');
include_once(dirname(__FILE__).'/ImportFio.php');

class ModuleFinanceBankAPI extends AppModule
{
  function __construct($System)
  {
    parent::__construct($System);
    $this->Name = 'FinanceBankAPI';
    $this->Version = '1.0';
    $this->Creator = 'Chronos';
    $this->License = 'GNU/GPLv3';
    $this->Description = 'Communication through API to various banks, manual file import';
    $this->Dependencies = array('Finance');
  }  

  function Install()
  {
  }
  
  function Uninstall()
  {     
  }
  
  function Start()
  {
    parent::Start();
    $FormClass = array(
      'Title' => 'Import souborů s platbami',
      'Table' => 'FinanceBank',
      'SubmitText' => 'Načíst',
      'Items' => array(
        'BankAccount' => array('Type' => 'TBankAccount', 'Caption' => 'Bankovní účet', 'Default' => ''),
        'File' => array('Type' => 'File', 'Caption' => 'Soubor', 'Default' => ''),
      ),
    );
    $this->System->FormManager->RegisterClass('ImportBankFile', $FormClass);
    $this->System->RegisterPage(array('finance', 'import-api'), 'PageImportAPI');
    $this->System->RegisterPage(array('finance', 'import-soubor'), 'PageImportFile');
  }  
  
  function Stop()
  { 
  } 
}


?>
