Search in sources :

Example 16 with ConcurStandardAccountingExtractDetailLine

use of edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractDetailLine in project cu-kfs by CU-CommunityApps.

the class ConcurStandardAccountingExtractCashAdvanceServiceImplTest method buildSAELines.

private List<ConcurStandardAccountingExtractDetailLine> buildSAELines() {
    List<ConcurSAEDetailLineFixture> lineFixtures = ConcurFixtureUtils.getFixturesContainingParentFixture(ConcurSAEDetailLineFixture.class, ConcurSAEFileFixture.PDP_TEST, ConcurSAEDetailLineFixture::getExtractFile);
    List<ConcurStandardAccountingExtractDetailLine> saeLines = new ArrayList<ConcurStandardAccountingExtractDetailLine>();
    for (ConcurSAEDetailLineFixture fixture : lineFixtures) {
        saeLines.add(fixture.toDetailLine());
    }
    return saeLines;
}
Also used : ConcurSAEDetailLineFixture(edu.cornell.kfs.concur.batch.fixture.ConcurSAEDetailLineFixture) ArrayList(java.util.ArrayList) ConcurStandardAccountingExtractDetailLine(edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractDetailLine)

Example 17 with ConcurStandardAccountingExtractDetailLine

use of edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractDetailLine in project cu-kfs by CU-CommunityApps.

the class ConcurStandardAccountingExtractCashAdvanceServiceImplTest method validateIsCashAdvanceTrue.

@Test
public void validateIsCashAdvanceTrue() {
    ConcurStandardAccountingExtractDetailLine line = ConcurSAEDetailLineFixture.PDP_TEST_CASH_ADVANCE_500.toDetailLine();
    line.setCashAdvanceKey("1242");
    assertTrue("Should be a cash advance line", concurStandardAccountingExtractCashAdvanceService.isCashAdvanceLine(line));
}
Also used : ConcurStandardAccountingExtractDetailLine(edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractDetailLine) Test(org.junit.Test)

Example 18 with ConcurStandardAccountingExtractDetailLine

use of edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractDetailLine in project cu-kfs by CU-CommunityApps.

the class ConcurStandardAccountingExtractServiceImplTest method assertCorrectResultForPDPInclusionCheck.

protected void assertCorrectResultForPDPInclusionCheck(boolean expectedResult, ConcurSAEDetailLineFixture fixture) throws Exception {
    ConcurStandardAccountingExtractDetailLine line = fixture.toDetailLine();
    boolean actualResult = concurStandardAccountingExtractServiceImpl.shouldProcessSAELineToPDP(line);
    assertEquals("Wrong result when checking whether SAE line should be included in PDP output", expectedResult, actualResult);
}
Also used : ConcurStandardAccountingExtractDetailLine(edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractDetailLine)

Example 19 with ConcurStandardAccountingExtractDetailLine

use of edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractDetailLine in project cu-kfs by CU-CommunityApps.

the class ConcurStandardAccountingExtractFileFixture method buildConcurStandardAccountingExtractDetailLine.

private static ConcurStandardAccountingExtractDetailLine buildConcurStandardAccountingExtractDetailLine(String debitCredit, KualiDecimal amount, String employeeGroupId) {
    ConcurStandardAccountingExtractDetailLine line = new ConcurStandardAccountingExtractDetailLine();
    line.setJounalDebitCredit(debitCredit);
    line.setJournalAmount(amount);
    line.setEmployeeGroupId(employeeGroupId);
    line.setEmployeeLastName(EMPLOYEE_LAST_NAME);
    line.setEmployeeFirstName(EMPLOYEE_FIRST_NAME);
    line.setEmployeeMiddleInitial(EMPLOYEE_MIDDLE_INITIAL);
    line.setPolicy(DEFAULT_POLICY);
    line.setExpenseType(DEFAULT_EXPENSE_TYPE_NAME);
    return line;
}
Also used : ConcurStandardAccountingExtractDetailLine(edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractDetailLine)

Aggregations

ConcurStandardAccountingExtractDetailLine (edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractDetailLine)19 KualiDecimal (org.kuali.rice.core.api.util.type.KualiDecimal)8 Test (org.junit.Test)3 OriginEntryFull (org.kuali.kfs.gl.businessobject.OriginEntryFull)3 ConcurAccountInfo (edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo)2 ConcurSAEDetailLineFixture (edu.cornell.kfs.concur.batch.fixture.ConcurSAEDetailLineFixture)1 ConcurBatchReportLineValidationErrorItem (edu.cornell.kfs.concur.batch.report.ConcurBatchReportLineValidationErrorItem)1 PdpFeedFileBaseEntry (edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedFileBaseEntry)1 ArrayList (java.util.ArrayList)1