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));
}
}
Aggregations