Search in sources :

Example 1 with DistributionOfIncomeAndExpenseDocument

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

the class CuDistributionOfIncomeAndExpenseDocumentPresentationController method getDocumentActions.

@Override
public Set<String> getDocumentActions(Document document) {
    Set<String> documentActions = super.getDocumentActions(document);
    DistributionOfIncomeAndExpenseDocument distributionOfIncomeAndExpenseDocument = (DistributionOfIncomeAndExpenseDocument) document;
    String docInError = distributionOfIncomeAndExpenseDocument.getFinancialSystemDocumentHeader().getFinancialDocumentInErrorNumber();
    if (StringUtils.isNotBlank(docInError)) {
        Boolean allowBlanketApproveNoRequest = getParameterService().getParameterValueAsBoolean(KRADConstants.KNS_NAMESPACE, KRADConstants.DetailTypes.DOCUMENT_DETAIL_TYPE, KRADConstants.SystemGroupParameterNames.ALLOW_ENROUTE_BLANKET_APPROVE_WITHOUT_APPROVAL_REQUEST_IND);
        if (allowBlanketApproveNoRequest != null && allowBlanketApproveNoRequest.booleanValue()) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_BLANKET_APPROVE);
        }
    }
    return documentActions;
}
Also used : DistributionOfIncomeAndExpenseDocument(org.kuali.kfs.fp.document.DistributionOfIncomeAndExpenseDocument)

Aggregations

DistributionOfIncomeAndExpenseDocument (org.kuali.kfs.fp.document.DistributionOfIncomeAndExpenseDocument)1