Search in sources :

Example 1 with BudgetAdjustmentDocument

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

the class CuBudgetAdjustmentDocumentPresentationController method getDocumentActions.

@Override
public Set<String> getDocumentActions(Document document) {
    Set<String> documentActions = super.getDocumentActions(document);
    BudgetAdjustmentDocument budgetAdjustmentDocument = (BudgetAdjustmentDocument) document;
    String docInError = budgetAdjustmentDocument.getFinancialSystemDocumentHeader().getFinancialDocumentInErrorNumber();
    if (StringUtils.isNotBlank(docInError)) {
        Boolean allowBlanketApproveNoRequest = getParameterService().getParameterValueAsBoolean(KFSConstants.CoreModuleNamespaces.KFS, 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 : BudgetAdjustmentDocument(org.kuali.kfs.fp.document.BudgetAdjustmentDocument)

Example 2 with BudgetAdjustmentDocument

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

the class BudgetAdjustmentDocumentPreRules method doPrompts.

/**
 * Execute pre-rules for BudgetAdjustmentDocument
 *
 * @param document document with pre-rules being applied
 * @return true if pre-rules fire without problem
 */
@Override
public boolean doPrompts(Document document) {
    BudgetAdjustmentDocument budgetDocument = (BudgetAdjustmentDocument) document;
    boolean preRulesOK = askLaborBenefitsGeneration(budgetDocument);
    preRulesOK &= SpringContext.getBean(AccountingDocumentPreRuleService.class).expiredAccountOverrideQuestion((AccountingDocumentBase) document, this);
    return preRulesOK;
}
Also used : AccountingDocumentBase(org.kuali.kfs.sys.document.AccountingDocumentBase) BudgetAdjustmentDocument(org.kuali.kfs.fp.document.BudgetAdjustmentDocument)

Aggregations

BudgetAdjustmentDocument (org.kuali.kfs.fp.document.BudgetAdjustmentDocument)2 AccountingDocumentBase (org.kuali.kfs.sys.document.AccountingDocumentBase)1