Search in sources :

Example 21 with CuDisbursementVoucherDocument

use of edu.cornell.kfs.fp.document.CuDisbursementVoucherDocument in project cu-kfs by CU-CommunityApps.

the class IWantDocumentServiceImplTest method testSetUpDVDetailsFromIWantDoc.

public void testSetUpDVDetailsFromIWantDoc() throws Exception {
    IWantDocument iWantDocument = IWantDocumentFixture.I_WANT_DOC.createIWantDocument();
    CuDisbursementVoucherDocument disbursementVoucherDocument = (CuDisbursementVoucherDocument) SpringContext.getBean(DocumentService.class).getNewDocument(CuDisbursementVoucherDocument.class);
    disbursementVoucherDocument.initiateDocument();
    DisbursementVoucherForm disbursementVoucherForm = new DisbursementVoucherForm();
    iWantDocumentService.setUpDVDetailsFromIWantDoc(iWantDocument, disbursementVoucherDocument, disbursementVoucherForm);
    assertEquals(1, disbursementVoucherDocument.getSourceAccountingLines().size());
    assertEquals(iWantDocument.getTotalDollarAmount(), disbursementVoucherDocument.getDisbVchrCheckTotalAmount());
}
Also used : CuDisbursementVoucherDocument(edu.cornell.kfs.fp.document.CuDisbursementVoucherDocument) DisbursementVoucherForm(org.kuali.kfs.fp.document.web.struts.DisbursementVoucherForm) IWantDocument(edu.cornell.kfs.module.purap.document.IWantDocument)

Aggregations

CuDisbursementVoucherDocument (edu.cornell.kfs.fp.document.CuDisbursementVoucherDocument)21 Person (org.kuali.kfs.kim.api.identity.Person)7 WorkflowException (org.kuali.kfs.kew.api.exception.WorkflowException)5 KualiDecimal (org.kuali.kfs.core.api.util.type.KualiDecimal)4 VendorDetail (org.kuali.kfs.vnd.businessobject.VendorDetail)4 CuDisbursementVoucherPayeeDetail (edu.cornell.kfs.fp.businessobject.CuDisbursementVoucherPayeeDetail)3 CULegacyTravelService (edu.cornell.kfs.fp.document.service.CULegacyTravelService)3 Date (java.sql.Date)3 DocumentService (org.kuali.kfs.krad.service.DocumentService)3 MessageMap (org.kuali.kfs.krad.util.MessageMap)3 SourceAccountingLine (org.kuali.kfs.sys.businessobject.SourceAccountingLine)3 VendorAddress (org.kuali.kfs.vnd.businessobject.VendorAddress)3 RecurringDisbursementVoucherDetail (edu.cornell.kfs.fp.businessobject.RecurringDisbursementVoucherDetail)2 RecurringDisbursementVoucherDocument (edu.cornell.kfs.fp.document.RecurringDisbursementVoucherDocument)2 IWantDocument (edu.cornell.kfs.module.purap.document.IWantDocument)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 DisbursementVoucherNonEmployeeTravel (org.kuali.kfs.fp.businessobject.DisbursementVoucherNonEmployeeTravel)2 DisbursementVoucherPreConferenceDetail (org.kuali.kfs.fp.businessobject.DisbursementVoucherPreConferenceDetail)2 DisbursementVoucherDocument (org.kuali.kfs.fp.document.DisbursementVoucherDocument)2