Search in sources :

Example 6 with AchIncomeTransaction

use of edu.cornell.kfs.fp.businessobject.AchIncomeTransaction in project cu-kfs by CU-CommunityApps.

the class AdvanceDepositServiceImplTest method testSetupSourceAccountingLine_PositiveAmount.

@Test
public void testSetupSourceAccountingLine_PositiveAmount() {
    SourceAccountingLine sourceAccountingLine = new SourceAccountingLine();
    AchIncomeTransaction achIncomeTransaction = new AchIncomeTransaction();
    achIncomeTransaction.setTransactionAmount(new KualiDecimal(10));
    advanceDepositService.setupSourceAccountingLine(achIncomeTransaction, advanceDepositDocument, "IT", NON_ASSET_EXPENSE_OBJECT_CODE, "1234567");
    assertEquals("Accounting line amount should equal the transaction amount", achIncomeTransaction.getTransactionAmount(), advanceDepositDocument.getSourceAccountingLine(0).getAmount());
}
Also used : AchIncomeTransaction(edu.cornell.kfs.fp.businessobject.AchIncomeTransaction) KualiDecimal(org.kuali.rice.core.api.util.type.KualiDecimal) SourceAccountingLine(org.kuali.kfs.sys.businessobject.SourceAccountingLine) Test(org.junit.Test)

Example 7 with AchIncomeTransaction

use of edu.cornell.kfs.fp.businessobject.AchIncomeTransaction in project cu-kfs by CU-CommunityApps.

the class AdvanceDepositServiceImplTest method testCreateSourceAccountingLineDefault.

@Test
public void testCreateSourceAccountingLineDefault() {
    AchIncomeTransaction transaction = new AchIncomeTransaction();
    transaction.setNotes(new ArrayList<AchIncomeNote>());
    advanceDepositService.createSourceAccountingLine(transaction, advanceDepositDocument);
    assertNotNull(advanceDepositDocument.getSourceAccountingLines());
    assertEquals(1, advanceDepositDocument.getSourceAccountingLines().size());
    assertEquals("IT", advanceDepositDocument.getSourceAccountingLine(0).getChartOfAccountsCode());
    assertEquals("2240", advanceDepositDocument.getSourceAccountingLine(0).getFinancialObjectCode());
    assertEquals("G621060", advanceDepositDocument.getSourceAccountingLine(0).getAccountNumber());
}
Also used : AchIncomeTransaction(edu.cornell.kfs.fp.businessobject.AchIncomeTransaction) AchIncomeNote(edu.cornell.kfs.fp.businessobject.AchIncomeNote) Test(org.junit.Test)

Aggregations

AchIncomeTransaction (edu.cornell.kfs.fp.businessobject.AchIncomeTransaction)7 Test (org.junit.Test)4 AchIncomeNote (edu.cornell.kfs.fp.businessobject.AchIncomeNote)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 SourceAccountingLine (org.kuali.kfs.sys.businessobject.SourceAccountingLine)2 KualiDecimal (org.kuali.rice.core.api.util.type.KualiDecimal)2 AchIncomeFile (edu.cornell.kfs.fp.businessobject.AchIncomeFile)1 AchIncomeFileGroup (edu.cornell.kfs.fp.businessobject.AchIncomeFileGroup)1 AchIncomeFileTransaction (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransaction)1 AchIncomeFileTransactionSet (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionSet)1 Timestamp (java.sql.Timestamp)1 HashMap (java.util.HashMap)1 AdvanceDepositDocument (org.kuali.kfs.fp.document.AdvanceDepositDocument)1