Ignore:
Timestamp:
Jul 3, 2015, 11:36:07 PM (9 years ago)
Author:
chronos
Message:

to group id instead of DocumentLine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/FinanceBankAPI/FinanceBankAPI.php

    r738 r740  
    6969  {
    7070    $Preset = array();
    71     if($Item['Value'] < 0) $DocumentLine = DOC_LINE_ACCOUNT_OUT;
    72        else $DocumentLine = DOC_LINE_ACCOUNT_IN;
     71    if($Item['Value'] < 0) $OperationGroupId = OPERATION_GROUP_ACCOUNT_OUT;
     72       else $OperationGroupId = OPERATION_GROUP_ACCOUNT_IN;
     73    $FinanceGroup = $this->System->Modules['Finance']->GetFinanceGroupById($OperationGroupId, 'FinanceOperationGroup');
     74
    7375    $Preset = array(
    7476      'presetTime' => $Item['Time'],
     
    7880      'presetNetwork' => 1,
    7981      'presetBankAccount' => $Item['BankAccount'],
    80       'presetDocumentLine' => $DocumentLine);
     82      'presetDocumentLine' => $FinanceGroup['DocumentLine']);
    8183    return($Preset);
    8284  }
Note: See TracChangeset for help on using the changeset viewer.