use of edu.cornell.kfs.fp.businessobject.RecurringDisbursementVoucherPDPStatus in project cu-kfs by CU-CommunityApps.
the class RecurringDisbursementVoucherDocumentServiceImpl method findPaymentDetailsFromRecurringDisbursementVoucher.
@Override
public Collection<PaymentDetail> findPaymentDetailsFromRecurringDisbursementVoucher(RecurringDisbursementVoucherDocument recurringDisbursementVoucherDocument) {
Collection<PaymentDetail> paymentDetails = new ArrayList<PaymentDetail>();
List<RecurringDisbursementVoucherPDPStatus> statuses = findPdpStatuses(recurringDisbursementVoucherDocument);
for (RecurringDisbursementVoucherPDPStatus status : statuses) {
Map fieldValues = new HashMap();
fieldValues.put(PdpPropertyConstants.PaymentDetail.PAYMENT_CUSTOMER_DOC_NUMBER, status.getDocumentNumber());
paymentDetails.addAll(getBusinessObjectService().findMatching(PaymentDetail.class, fieldValues));
}
return paymentDetails;
}
use of edu.cornell.kfs.fp.businessobject.RecurringDisbursementVoucherPDPStatus in project cu-kfs by CU-CommunityApps.
the class RecurringDisbursementVoucherDocumentServiceImpl method buildRecurringDisbursementVoucherPDPStatus.
private RecurringDisbursementVoucherPDPStatus buildRecurringDisbursementVoucherPDPStatus(DisbursementVoucherDocument disbursementVoucherDocument) {
RecurringDisbursementVoucherPDPStatus pdpStatus = new RecurringDisbursementVoucherPDPStatus();
pdpStatus.setDocumentNumber(disbursementVoucherDocument.getDocumentNumber());
pdpStatus.setCancelDate(disbursementVoucherDocument.getCancelDate());
pdpStatus.setExtractDate(disbursementVoucherDocument.getExtractDate());
pdpStatus.setPaidDate(disbursementVoucherDocument.getPaidDate());
pdpStatus.setPdpStatus(disbursementVoucherDocument.getDisbursementVoucherPdpStatus());
pdpStatus.setPaymentDetailDocumentType(disbursementVoucherDocument.getPaymentDetailDocumentType());
pdpStatus.setDueDate(disbursementVoucherDocument.getDisbursementVoucherDueDate());
pdpStatus.setDvStatus(disbursementVoucherDocument.getDocumentHeader().getWorkflowDocument().getStatus().getLabel());
return pdpStatus;
}
use of edu.cornell.kfs.fp.businessobject.RecurringDisbursementVoucherPDPStatus in project cu-kfs by CU-CommunityApps.
the class RecurringDisbursementVoucherDocumentServiceImpl method findPdpStatuses.
@Override
public List<RecurringDisbursementVoucherPDPStatus> findPdpStatuses(RecurringDisbursementVoucherDocument recurringDV) {
List<RecurringDisbursementVoucherPDPStatus> pdpStatuses = new ArrayList<RecurringDisbursementVoucherPDPStatus>();
for (RecurringDisbursementVoucherDetail detail : recurringDV.getRecurringDisbursementVoucherDetails()) {
if (StringUtils.isNotEmpty(detail.getDvDocumentNumber())) {
DisbursementVoucherDocument disbursementVoucherDocument;
try {
disbursementVoucherDocument = (DisbursementVoucherDocument) getDocumentService().getByDocumentHeaderId(detail.getDvDocumentNumber());
} catch (WorkflowException e) {
LOG.error("findPdpStatuses: There was a problem getting DV from the recurring DV detail: " + e);
throw new RuntimeException(e);
}
pdpStatuses.add(buildRecurringDisbursementVoucherPDPStatus(disbursementVoucherDocument));
}
}
Collections.sort(pdpStatuses);
return pdpStatuses;
}
Aggregations