Search in sources :

Example 1 with InternalBillingDocument

use of org.kuali.kfs.fp.document.InternalBillingDocument in project cu-kfs by CU-CommunityApps.

the class MockDocumentUtils method performInitializationFromSkippedConstructor.

private static void performInitializationFromSkippedConstructor(Document document) {
    document.setDocumentHeader(new FinancialSystemDocumentHeader());
    document.setAdHocRoutePersons(new ArrayList<>());
    document.setAdHocRouteWorkgroups(new ArrayList<>());
    document.setNotes(new ArrayList<>());
    if (document instanceof AccountingDocument) {
        AccountingDocument accountingDocument = (AccountingDocument) document;
        accountingDocument.setSourceAccountingLines(new ArrayList<>());
        accountingDocument.setTargetAccountingLines(new ArrayList<>());
        accountingDocument.setNextSourceLineNumber(Integer.valueOf(1));
        accountingDocument.setNextTargetLineNumber(Integer.valueOf(1));
    }
    if (document instanceof InternalBillingDocument) {
        InternalBillingDocument internalBillingDocument = (InternalBillingDocument) document;
        internalBillingDocument.setItems(new ArrayList<>());
        internalBillingDocument.setNextItemLineNumber(Integer.valueOf(1));
    }
}
Also used : FinancialSystemDocumentHeader(org.kuali.kfs.sys.businessobject.FinancialSystemDocumentHeader) AccountingDocument(org.kuali.kfs.sys.document.AccountingDocument) InternalBillingDocument(org.kuali.kfs.fp.document.InternalBillingDocument)

Aggregations

InternalBillingDocument (org.kuali.kfs.fp.document.InternalBillingDocument)1 FinancialSystemDocumentHeader (org.kuali.kfs.sys.businessobject.FinancialSystemDocumentHeader)1 AccountingDocument (org.kuali.kfs.sys.document.AccountingDocument)1