Changeset 755 for trunk/Modules/FinanceBankAPI/FileImport.php
- Timestamp:
- Oct 25, 2015, 9:51:51 PM (9 years ago)
- File:
-
- 1 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 }
Note:
See TracChangeset
for help on using the changeset viewer.