Changeset 755 for trunk/Modules/FinanceBankAPI
- Timestamp:
- Oct 25, 2015, 9:51:51 PM (9 years ago)
- Location:
- trunk/Modules/FinanceBankAPI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/FinanceBankAPI/FileImport.php
r747 r755 42 42 $BillCode = $this->System->Modules['Finance']->GetNextDocumentLineNumberId($FinanceGroup['DocumentLine'], $Year); 43 43 $DbResult3 = $this->Database->insert('FinanceOperation', array('Subject' => $DbRow2['Id'], 'Cash' => 0, 44 'Value ' => Abs($DbRow['Value']), 'Taxable' => 1, 'BankAccount' => $DbRow['BankAccount'], 'Network' => 1,44 'ValueUser' => Abs($DbRow['Value']), 'Taxable' => 1, 'BankAccount' => $DbRow['BankAccount'], 'Network' => 1, 45 45 'Time' => $DbRow['Time'], 'Text' => $DbRow['Description'], 'BillCode' => $BillCode, 'Group' => $FinanceGroup['Id'])); 46 $this->Database->update('FinanceBankImport', 'Id='.$DbRow['Id'], array('FinanceOperation' => $this->Database->insert_id)); 46 $Id = $this->Database->insert_id; 47 $this->Database->update('FinanceBankImport', 'Id='.$DbRow['Id'], array('FinanceOperation' => $Id)); 48 49 // Execute after insert event 50 $Form = new Form($this->System->FormManager); 51 $Form->SetClass('FinanceOperation'); 52 $Form->LoadValuesFromDatabase($Id); 53 if(array_key_exists('AfterInsert', $Form->Definition)) 54 { 55 $Class = $Form->Definition['AfterInsert'][0]; 56 $Method = $Form->Definition['AfterInsert'][1]; 57 $Form->Values = $Class->$Method($Form, $Id); 58 } 47 59 } 48 60 } -
trunk/Modules/FinanceBankAPI/FinanceBankAPI.php
r740 r755 60 60 $this->System->RegisterPage(array('finance', 'import-api'), 'PageImportAPI'); 61 61 $this->System->RegisterPage(array('finance', 'import-soubor'), 'PageImportFile'); 62 63 $this->System->ModuleManager->Modules['IS']->RegisterDashboardItem('FinanceBankAPI', 64 array('ModuleFinanceBankAPI', 'ShowDashboardItem')); 62 65 } 63 66 64 67 function DoStop() 65 68 { 69 } 70 71 function ShowDashboardItem() 72 { 73 $DbResult = $this->Database->select('FinanceBankImport', 'COUNT(*)', '`FinanceOperation` IS NULL'); 74 $DbRow = $DbResult->fetch_row(); 75 $Output = 'Nezpárovaných plateb: '.$DbRow['0'].'<br/>'; 76 return($Output); 66 77 } 67 78
Note:
See TracChangeset
for help on using the changeset viewer.