: null;
creditAccounts = this.isAssociationParametersExists ? this.glAccountReadPlatformService.retrieveAccountsByTagId(id,
JournalEntryType.CREDIT.getValue()) : null;
} else {
creditTags = null;
final GLAccountDataForLookup creditAccount = new GLAccountDataForLookup(accountToCreditId, creditAccountName,
creditAccountGLCode);
creditAccounts = new ArrayList<>(Arrays.asList(creditAccount));
}
if (accountToDebitId == null) {
debitTags = !this.isAssociationParametersExists ? getCreditOrDebitTags(id, JournalEntryType.DEBIT.getValue())
: null;
debitAccounts = this.isAssociationParametersExists ? this.glAccountReadPlatformService.retrieveAccountsByTagId(id,
JournalEntryType.DEBIT.getValue()) : null;
} else {
debitTags = null;
final GLAccountDataForLookup debitAccount = new GLAccountDataForLookup(accountToDebitId, debitAccountName,
debitAccountGLCode);
debitAccounts = new ArrayList<>(Arrays.asList(debitAccount));
}
accountingRuleData = new AccountingRuleData(id, officeId, officeName, name, description, systemDefined,
allowMultipleDebitEntries, allowMultipleCreditEntries, creditTags, debitTags, creditAccounts, debitAccounts);