/** * Total amount to be paid to Vendor * * @return */ public KualiDecimal getTotalPaidAmountToVendor() { KualiDecimal totalPaidAmountToVendor = KualiDecimal.ZERO; List<Document> relatedDisbursementList = getTravelDocumentService().getDocumentsRelatedTo(this, DISBURSEMENT_VOUCHER_DOCTYPE); for (Document document : relatedDisbursementList) { if (document instanceof DisbursementVoucherDocument) { DisbursementVoucherDocument dv = (DisbursementVoucherDocument) document; if (dv.getDocumentHeader().getWorkflowDocument().isFinal()) { totalPaidAmountToVendor = totalPaidAmountToVendor.add(dv.getDisbVchrCheckTotalAmount()); } } } return totalPaidAmountToVendor; }