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;
}
Aggregations