use of edu.cornell.kfs.fp.businessobject.AchIncomeTransaction in project cu-kfs by CU-CommunityApps.
the class AdvanceDepositServiceImpl method createDocuments.
/**
* @see AdvanceDepositService#createDocuments()
*/
public void createDocuments() {
List<AchIncomeTransaction> transactions = (List<AchIncomeTransaction>) businessObjectService.findMatchingOrderBy(AchIncomeTransaction.class, new HashMap<String, Object>(), ACH_TRANSACTION_SEQUENCE_NUMBER, true);
for (AchIncomeTransaction transaction : transactions) {
AdvanceDepositDocument document = createAdvanceDepositDocument(transaction);
saveDocument(document);
createNotes(transaction, document);
}
}
use of edu.cornell.kfs.fp.businessobject.AchIncomeTransaction in project cu-kfs by CU-CommunityApps.
the class AdvanceDepositServiceImpl method loadAchIncomeTransactions.
private void loadAchIncomeTransactions(Object parsedObject) {
List<AchIncomeTransaction> achIncomeTransactions = new ArrayList();
List<AchIncomeFile> achIncomeFiles = (List<AchIncomeFile>) parsedObject;
for (AchIncomeFile achIncomeFile : achIncomeFiles) {
setAchTransactions(achIncomeFile, achIncomeTransactions);
}
saveTransaction(achIncomeTransactions);
}
use of edu.cornell.kfs.fp.businessobject.AchIncomeTransaction in project cu-kfs by CU-CommunityApps.
the class AdvanceDepositServiceImpl method setAchTransactions.
protected void setAchTransactions(AchIncomeFile achIncomeFile, List achIncomeTransactions) {
Timestamp bankTimestamp = getFormattedTimestamp(achIncomeFile, "fileDate/time");
for (AchIncomeFileGroup achIncomeFileGroup : achIncomeFile.getGroups()) {
for (AchIncomeFileTransactionSet achIncomeFileTransactionSet : achIncomeFileGroup.getTransactionSets()) {
for (AchIncomeFileTransaction achIncomeFileTransaction : achIncomeFileTransactionSet.getTransactionGuts()) {
if (KFSConstants.GL_CREDIT_CODE.equals(achIncomeFileTransaction.getCreditDebitIndicator())) {
AchIncomeTransaction achIncomeTransaction = new AchIncomeTransaction();
achIncomeTransaction.setPaymentMethodCode(achIncomeFileTransaction.getPaymentMethodCode());
achIncomeTransaction.setEffectiveDate(achIncomeFileTransaction.getEffectiveDate());
achIncomeTransaction.setLoadTimestamp(dateTimeService.getCurrentTimestamp());
achIncomeTransaction.setBankTimestamp(bankTimestamp);
achIncomeTransaction.setTransactionAmount(achIncomeFileTransaction.getTransactionAmount());
achIncomeTransaction.setPayerName(truncatePayerNameIfNecessary(achIncomeFileTransaction));
achIncomeTransaction.setNotes(createNotes(achIncomeFileTransaction));
achIncomeTransactions.add(achIncomeTransaction);
}
}
}
}
}
use of edu.cornell.kfs.fp.businessobject.AchIncomeTransaction in project cu-kfs by CU-CommunityApps.
the class AdvanceDepositServiceImplTest method testCreateSourceAccountingLineMatchingNote.
@Test
public void testCreateSourceAccountingLineMatchingNote() {
AchIncomeTransaction transaction = new AchIncomeTransaction();
List<AchIncomeNote> notes = setupNotes("an ARMY of one");
transaction.setNotes(notes);
advanceDepositService.createSourceAccountingLine(transaction, advanceDepositDocument);
assertNotNull(advanceDepositDocument.getSourceAccountingLines());
assertEquals(1, advanceDepositDocument.getSourceAccountingLines().size());
assertEquals("CU", advanceDepositDocument.getSourceAccountingLine(0).getChartOfAccountsCode());
assertEquals("5000", advanceDepositDocument.getSourceAccountingLine(0).getFinancialObjectCode());
assertEquals("1234567", advanceDepositDocument.getSourceAccountingLine(0).getAccountNumber());
}
use of edu.cornell.kfs.fp.businessobject.AchIncomeTransaction in project cu-kfs by CU-CommunityApps.
the class AdvanceDepositServiceImplTest method testSetupSourceAccountingLine_NegativeAmount.
@Test
public void testSetupSourceAccountingLine_NegativeAmount() {
SourceAccountingLine sourceAccountingLine = new SourceAccountingLine();
AchIncomeTransaction achIncomeTransaction = new AchIncomeTransaction();
achIncomeTransaction.setTransactionAmount(new KualiDecimal(10));
advanceDepositService.setupSourceAccountingLine(achIncomeTransaction, advanceDepositDocument, "IT", EXPENSE_OBJECT_CODE, "1234567");
assertEquals("Accounting line amount should be the transaction amount negated", achIncomeTransaction.getTransactionAmount().negated(), advanceDepositDocument.getSourceAccountingLine(0).getAmount());
}
Aggregations