use of org.apache.struts.action.ActionForward in project cu-kfs by CU-CommunityApps.
the class KualiAccountingDocumentActionBase method route.
@Override
public ActionForward route(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
KualiAccountingDocumentFormBase tmpForm = (KualiAccountingDocumentFormBase) form;
// this.applyCapitalAssetInformation(tmpForm);
ActionForward forward = super.route(mapping, form, request, response);
checkSalesTaxRequiredAllLines(tmpForm, tmpForm.getFinancialDocument().getSourceAccountingLines());
checkSalesTaxRequiredAllLines(tmpForm, tmpForm.getFinancialDocument().getTargetAccountingLines());
return forward;
}
use of org.apache.struts.action.ActionForward in project cu-kfs by CU-CommunityApps.
the class KualiAccountingDocumentActionBase method execute.
/**
* Adds check for accountingLine updates, generates and dispatches any events caused by such updates
*
* @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm,
* javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
KualiAccountingDocumentFormBase transForm = (KualiAccountingDocumentFormBase) form;
// handle changes to accountingLines
if (transForm.hasDocumentId()) {
AccountingDocument financialDocument = (AccountingDocument) transForm.getDocument();
processAccountingLines(financialDocument, transForm, KFSConstants.SOURCE);
processAccountingLines(financialDocument, transForm, KFSConstants.TARGET);
}
// This is after a potential handleUpdate(), to display automatically cleared overrides following a route or save.
processAccountingLineOverrides(transForm);
// proceed as usual
ActionForward result = super.execute(mapping, form, request, response);
return result;
}
use of org.apache.struts.action.ActionForward in project cu-kfs by CU-CommunityApps.
the class KualiAccountingDocumentActionBase method blanketApprove.
@Override
public ActionForward blanketApprove(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
KualiAccountingDocumentFormBase tmpForm = (KualiAccountingDocumentFormBase) form;
checkSalesTaxRequiredAllLines(tmpForm, tmpForm.getFinancialDocument().getSourceAccountingLines());
checkSalesTaxRequiredAllLines(tmpForm, tmpForm.getFinancialDocument().getTargetAccountingLines());
ActionForward forward = super.blanketApprove(mapping, form, request, response);
return forward;
}
use of org.apache.struts.action.ActionForward in project cu-kfs by CU-CommunityApps.
the class KualiAccountingDocumentActionBase method approve.
@Override
public ActionForward approve(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
KualiAccountingDocumentFormBase tmpForm = (KualiAccountingDocumentFormBase) form;
// KFSPTS-1735
ActionForward forward = super.approve(mapping, form, request, response);
if (GlobalVariables.getMessageMap().hasNoErrors()) {
// KFSPTS-1735
SpringContext.getBean(CUFinancialSystemDocumentService.class).checkAccountingLinesForChanges((AccountingDocument) tmpForm.getFinancialDocument());
// KFSPTS-1735
}
// need to check on sales tax for all the accounting lines
checkSalesTaxRequiredAllLines(tmpForm, tmpForm.getFinancialDocument().getSourceAccountingLines());
checkSalesTaxRequiredAllLines(tmpForm, tmpForm.getFinancialDocument().getTargetAccountingLines());
return forward;
}
use of org.apache.struts.action.ActionForward in project cu-kfs by CU-CommunityApps.
the class CuDisbursementVoucherAction method save.
/**
* Overridden to also perform address change notifications if the document is enroute.
*
* @see org.kuali.kfs.sys.web.struts.KualiAccountingDocumentActionBase#save()
*/
@SuppressWarnings("deprecation")
@Override
public ActionForward save(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
CuDisbursementVoucherForm dvForm = (CuDisbursementVoucherForm) form;
ActionForward forward;
// If the document is ENROUTE, then also send address change notifications as needed.
if (dvForm.getFinancialDocument().getDocumentHeader().getWorkflowDocument().isEnroute()) {
boolean passed = SpringContext.getBean(KualiRuleService.class).applyRules(new SaveDocumentEvent(dvForm.getFinancialDocument()));
if (passed) {
SpringContext.getBean(DisbursementVoucherPayeeServiceImpl.class).checkPayeeAddressForChanges((CuDisbursementVoucherDocument) dvForm.getFinancialDocument());
}
forward = super.save(mapping, form, request, response);
if (passed && CollectionUtils.isNotEmpty(dvForm.getFinancialDocument().getAdHocRoutePersons()) && GlobalVariables.getMessageMap().hasNoErrors()) {
sendAdHocRequests(mapping, form, request, response);
}
} else {
// If the document is not ENROUTE, then just proceed as in the superclass.
forward = super.save(mapping, form, request, response);
}
return forward;
}
Aggregations