Search in sources :

Example 1 with PreEncumbranceDocument

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

the class CuPreEncumbranceAction method route.

@Override
public ActionForward route(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    KualiAccountingDocumentFormBase tmpForm = (KualiAccountingDocumentFormBase) form;
    String docNum = tmpForm.getDocId();
    PreEncumbranceDocument preEncDoc = SpringContext.getBean(BusinessObjectService.class).findBySinglePrimaryKey(PreEncumbranceDocument.class, docNum);
    if (preEncDoc == null) {
        GlobalVariables.getMessageMap().putErrorWithoutFullErrorPath(dot + "Save", KFSKeyConstants.ERROR_CUSTOM, "This Document needs to be saved before Submit");
    }
    ActionForward forward = super.route(mapping, form, request, response);
    checkSalesTaxRequiredAllLines(tmpForm, tmpForm.getFinancialDocument().getSourceAccountingLines());
    checkSalesTaxRequiredAllLines(tmpForm, tmpForm.getFinancialDocument().getTargetAccountingLines());
    return forward;
}
Also used : KualiAccountingDocumentFormBase(org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase) ActionForward(org.apache.struts.action.ActionForward) PreEncumbranceDocument(org.kuali.kfs.fp.document.PreEncumbranceDocument) BusinessObjectService(org.kuali.kfs.krad.service.BusinessObjectService)

Aggregations

ActionForward (org.apache.struts.action.ActionForward)1 PreEncumbranceDocument (org.kuali.kfs.fp.document.PreEncumbranceDocument)1 BusinessObjectService (org.kuali.kfs.krad.service.BusinessObjectService)1 KualiAccountingDocumentFormBase (org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase)1