Changeset 639 for trunk/Modules/FinanceBankAPI
- Timestamp:
- Mar 16, 2014, 1:33:22 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/FinanceBankAPI/FinanceBankAPI.php
r600 r639 16 16 $this->Description = 'Communication through API to various banks, manual file import'; 17 17 $this->Dependencies = array('Finance'); 18 } 18 } 19 19 20 20 function DoInstall() 21 21 { 22 22 } 23 23 24 24 function DoUninstall() 25 { 25 { 26 26 } 27 27 28 28 function DoStart() 29 29 { … … 53 53 'Description' => array('Type' => 'String', 'Caption' => 'Popis operace', 'Default' => ''), 54 54 'OffsetAccountName' => array('Type' => 'String', 'Caption' => 'Jméno protiúčtu', 'Default' => ''), 55 'FinanceOperation' => array('Type' => 'TFinanceOperation', 'Caption' => 'Přiřazená operace', 'Default' => '', 'Null' => true ),55 'FinanceOperation' => array('Type' => 'TFinanceOperation', 'Caption' => 'Přiřazená operace', 'Default' => '', 'Null' => true, 'OnPreset' => array($this, 'PresetItem')), 56 56 ), 57 57 )); 58 58 59 59 $this->System->RegisterPage(array('finance', 'import-api'), 'PageImportAPI'); 60 60 $this->System->RegisterPage(array('finance', 'import-soubor'), 'PageImportFile'); 61 } 62 61 } 62 63 63 function DoStop() 64 { 65 } 64 { 65 } 66 67 function PresetItem($Item) 68 { 69 $Preset = array(); 70 if($Item['Value'] < 0) $DocumentLine = DOC_LINE_ACCOUNT_OUT; 71 else $DocumentLine = DOC_LINE_ACCOUNT_IN; 72 $Preset = array( 73 'presetTime' => $Item['Time'], 74 'presetValue' => $Item['Value'], 75 'presetTaxable' => 1, 76 'presetText' => $Item['Description'], 77 'presetNetwork' => 1, 78 'presetBankAccount' => $Item['BankAccount'], 79 'presetDocumentLine' => $DocumentLine); 80 return($Preset); 81 } 66 82 }
Note:
See TracChangeset
for help on using the changeset viewer.