org.kuali.kfs.module.purap.document.web.struts
Class PaymentRequestAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.apache.struts.actions.DispatchAction
          extended by org.kuali.rice.kns.web.struts.action.KualiAction
              extended by org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
                  extended by org.kuali.rice.kns.web.struts.action.KualiTransactionalDocumentActionBase
                      extended by org.kuali.kfs.sys.document.web.struts.FinancialSystemTransactionalDocumentActionBase
                          extended by org.kuali.kfs.sys.web.struts.KualiAccountingDocumentActionBase
                              extended by org.kuali.kfs.module.purap.document.web.struts.PurchasingAccountsPayableActionBase
                                  extended by org.kuali.kfs.module.purap.document.web.struts.AccountsPayableActionBase
                                      extended by org.kuali.kfs.module.purap.document.web.struts.PaymentRequestAction

public class PaymentRequestAction
extends AccountsPayableActionBase

Struts Action for Payment Request document.


Field Summary
 
Fields inherited from class org.kuali.kfs.sys.web.struts.KualiAccountingDocumentActionBase
UPDATE_EVENT_ACTIONS
 
Fields inherited from class org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
DOCUMENT_LOAD_COMMANDS
 
Fields inherited from class org.kuali.rice.kns.web.struts.action.KualiAction
FORM_ACTION, FORWARD_NEXT, FORWARD_TEXT_AREA_UPDATE, METHOD_TO_CALL, POST_TEXT_AREA_TO_PARENT, TEXT_AREA_FIELD_ANCHOR, TEXT_AREA_FIELD_LABEL, TEXT_AREA_FIELD_NAME, TEXT_AREA_MAX_LENGTH, TEXT_AREA_READ_ONLY
 
Fields inherited from class org.apache.struts.actions.DispatchAction
clazz, log, messages, methods, types
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
PaymentRequestAction()
           
 
Method Summary
 org.apache.struts.action.ActionForward addHoldOnPayment(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Puts a payment on hold, prompting for a reason beforehand.
 org.apache.struts.action.ActionForward approve(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Overrides to invoke the updateAccountAmounts so that the account percentage will be correctly updated before validation for account percent is called.
 org.apache.struts.action.ActionForward changeUseTaxIndicator(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward clearInitFields(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Clears the initial fields on the PaymentRequestDocument which should be accessible from the given form.
 org.apache.struts.action.ActionForward continuePREQ(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Executes the continue action on a payment request.
protected  void createDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
          Do initialization for a new payment request.
protected  void customCalculate(PurchasingAccountsPayableDocument apDoc)
          Calls a service method to calculate for a payment request document.
 String getActionName()
          Returns the current action name.
protected  boolean isEncumberNextFiscalYear(PaymentRequestDocument paymentRequestDocument)
          Check if the current PREQ encumber next fiscal year from PO document.
protected  org.apache.struts.action.ActionForward performDuplicatePaymentRequestAndEncumberFiscalYearCheck(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, PaymentRequestDocument paymentRequestDocument)
          This method runs two checks based on the user input on PREQ initiate screen: Encumber next fiscal year check and Duplicate payment request check.
 org.apache.struts.action.ActionForward refresh(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Performs refresh of objects after a lookup.
 org.apache.struts.action.ActionForward removeCancelRequestFromPayment(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Removes a request for cancel on a payment request.
 org.apache.struts.action.ActionForward removeHoldFromPayment(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Removes a hold on the payment request.
 org.apache.struts.action.ActionForward requestCancelOnPayment(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This action requests a cancel on a preq, prompting for a reason before hand.
protected  boolean requiresCalculateTax(PaymentRequestForm preqForm)
          Checks if tax calculation is required.
 org.apache.struts.action.ActionForward route(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward useAlternateVendor(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward useOriginalVendor(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class org.kuali.kfs.module.purap.document.web.struts.AccountsPayableActionBase
askCancelQuestion, askQuestionsAndPerformReopenPurchaseOrder, askQuestionWithInput, askQuestionWithInput, calculate, cancel, cancelCallbackMethod, cancelPOActionCallbackMethod, clearAllTaxes, execute, getQuestionProperty, initiateReopenPurchaseOrder, loadDocument, reopenPo, requiresCaculate, save
 
Methods inherited from class org.kuali.kfs.module.purap.document.web.struts.PurchasingAccountsPayableActionBase
customAccountRetrieval, deleteSourceLine, downloadBOAttachment, getSelectedLineForAccounts, getSourceAccountingLine, hideAllAccounts, insertAccountingLine, insertAccountingLine, insertBONote, insertSourceLine, processAccountingLineOverrides, processCustomInsertAccountingLine, refreshAccountSummary, showAllAccounts, updateBaseline, uploadAccountingLines
 
Methods inherited from class org.kuali.kfs.sys.web.struts.KualiAccountingDocumentActionBase
addCapitalAssetInfo, addCapitalAssetInfoDetailLines, applyCapitalAssetInformation, blanketApprove, checkSalesTax, checkSalesTaxRequiredAllLines, checkUploadFile, clearCapitalAssetInfo, clearOverridesThatBecameUnneeded, copy, deepCopyAccountingLinesList, deleteAccountingLine, deleteCapitalAssetInfoDetailLine, deleteTargetLine, getCurrentCapitalAssetInformationObject, getMaxItemLineNumber, getNextItemLineNumberAndIncremented, getObjectTypeCodeFromLine, getTargetAccountingLine, handleSalesTaxRequired, handleSalesTaxRequiredAllLines, hasSalesTaxBeenEntered, hideDetails, insertAccountingLine, insertTargetLine, isSalesTaxRequired, isValidSalesTaxEntered, performBalanceInquiryForAccountingLine, performBalanceInquiryForSourceLine, performBalanceInquiryForTargetLine, performLookup, populateSalesTax, processAccountingLineOverrides, processAccountingLineOverrides, processAccountingLines, refreshSalesTaxInfo, removeSalesTax, resetCapitalAssetInfo, showDetails, toggleTab, uploadSourceLines, uploadTargetLines
 
Methods inherited from class org.kuali.kfs.sys.document.web.struts.FinancialSystemTransactionalDocumentActionBase
correct
 
Methods inherited from class org.kuali.rice.kns.web.struts.action.KualiTransactionalDocumentActionBase
populateAuthorizationFields
 
Methods inherited from class org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
acknowledge, attemptLockRelease, buildAuthorizationException, cancelBOAttachment, canSave, checkAndWarnAboutSensitiveData, checkAuthorization, close, combineAdHocRecipients, convertSetToMap, delete, deleteAdHocRoutePerson, deleteAdHocRouteWorkgroup, deleteBONote, determineNoteWorkflowNotificationAction, disapprove, docHandler, doProcessingAfterPost, exitingDocument, fyi, generatePessimisticLockMessage, getAttachmentService, getBusinessObjectAuthorizationService, getBusinessObjectMetaDataService, getBusinessObjectService, getDataDictionaryService, getDocumentHelperService, getDocumentService, getEntityManagerFactory, getIdentityManagementService, getKualiConfigurationService, getKualiRuleService, getNoteService, getParameterService, getPessimisticLockService, getQuestion, hideAllTabs, insertAdHocRoutePerson, insertAdHocRouteWorkgroup, isFormRepresentingLockObject, performRouteReport, populateAdHocActionRequestCodes, promptBeforeValidation, promptBeforeValidation, refreshAdHocRoutingWorkgroupLookups, releaseLocks, reload, returnToSender, selectedAttachmentIndex, sendAdHocRequests, sendNoteWorkflowNotification, setupDocumentExit, setupPessimisticLockMessages, showAllTabs, streamToResponse, supervisorFunctions
 
Methods inherited from class org.kuali.rice.kns.web.struts.action.KualiAction
addMethodToCallToUncheckedList, defaultDispatch, dispatchMethod, findMethodToCall, getApplicationBaseUrl, getBasePath, getEncryptionService, getHeaderTabDispatch, getHeaderTabNavigateTo, getImageContext, getKualiModuleService, getLineToDelete, getReturnLocation, getRoleQualification, getSelectedLine, getTabToToggle, headerTab, performInquiry, performQuestionWithInput, performQuestionWithInputAgainBecauseOfErrors, performQuestionWithoutInput, performWorkgroupLookup, postTextAreaToParent, retrieveLookupParameterValue, updateTextArea, validateLookupInquiryFullParameter
 
Methods inherited from class org.apache.struts.actions.DispatchAction
cancelled, getMethod, getMethodName, getParameter, unspecified
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaymentRequestAction

public PaymentRequestAction()
Method Detail

createDocument

protected void createDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
                       throws org.kuali.rice.kew.exception.WorkflowException
Do initialization for a new payment request.

Overrides:
createDocument in class org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase
Throws:
org.kuali.rice.kew.exception.WorkflowException
See Also:
KualiDocumentActionBase.createDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase)

refresh

public org.apache.struts.action.ActionForward refresh(org.apache.struts.action.ActionMapping mapping,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
                                               throws Exception
Description copied from class: AccountsPayableActionBase
Performs refresh of objects after a lookup.

Overrides:
refresh in class AccountsPayableActionBase
Throws:
Exception
See Also:
KualiAction.refresh(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

continuePREQ

public org.apache.struts.action.ActionForward continuePREQ(org.apache.struts.action.ActionMapping mapping,
                                                           org.apache.struts.action.ActionForm form,
                                                           javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response)
                                                    throws Exception
Executes the continue action on a payment request. Populates and initializes the rest of the payment request besides what was shown on the init screen.

Parameters:
mapping - An ActionMapping
form - An ActionForm
request - The HttpServletRequest
response - The HttpServletResponse
Returns:
An ActionForward
Throws:
Exception

clearInitFields

public org.apache.struts.action.ActionForward clearInitFields(org.apache.struts.action.ActionMapping mapping,
                                                              org.apache.struts.action.ActionForm form,
                                                              javax.servlet.http.HttpServletRequest request,
                                                              javax.servlet.http.HttpServletResponse response)
                                                       throws Exception
Clears the initial fields on the PaymentRequestDocument which should be accessible from the given form.

Parameters:
mapping - An ActionMapping
form - An ActionForm, which must be a PaymentRequestForm
request - The HttpServletRequest
response - The HttpServletResponse
Returns:
An ActionForward
Throws:
Exception

performDuplicatePaymentRequestAndEncumberFiscalYearCheck

protected org.apache.struts.action.ActionForward performDuplicatePaymentRequestAndEncumberFiscalYearCheck(org.apache.struts.action.ActionMapping mapping,
                                                                                                          org.apache.struts.action.ActionForm form,
                                                                                                          javax.servlet.http.HttpServletRequest request,
                                                                                                          javax.servlet.http.HttpServletResponse response,
                                                                                                          PaymentRequestDocument paymentRequestDocument)
                                                                                                   throws Exception
This method runs two checks based on the user input on PREQ initiate screen: Encumber next fiscal year check and Duplicate payment request check. Encumber next fiscal year is checked first and will display a warning message to the user if it's the case. Duplicate payment request check calls PaymentRequestService to perform the duplicate payment request check. If one is found, a question is setup and control is forwarded to the question action method. Coming back from the question prompt the button that was clicked is checked and if 'no' was selected they are forward back to the page still in init mode.

Parameters:
mapping - An ActionMapping
form - An ActionForm
request - The HttpServletRequest
response - The HttpServletResponse
paymentRequestDocument - The PaymentRequestDocument
Returns:
An ActionForward
Throws:
Exception
See Also:
PaymentRequestService

isEncumberNextFiscalYear

protected boolean isEncumberNextFiscalYear(PaymentRequestDocument paymentRequestDocument)
Check if the current PREQ encumber next fiscal year from PO document.

Parameters:
paymentRequestDocument -
Returns:

addHoldOnPayment

public org.apache.struts.action.ActionForward addHoldOnPayment(org.apache.struts.action.ActionMapping mapping,
                                                               org.apache.struts.action.ActionForm form,
                                                               javax.servlet.http.HttpServletRequest request,
                                                               javax.servlet.http.HttpServletResponse response)
                                                        throws Exception
Puts a payment on hold, prompting for a reason beforehand. This stops further approvals or routing.

Parameters:
mapping - An ActionMapping
form - An ActionForm
request - The HttpServletRequest
response - The HttpServletResponse
Returns:
An ActionForward
Throws:
Exception

removeHoldFromPayment

public org.apache.struts.action.ActionForward removeHoldFromPayment(org.apache.struts.action.ActionMapping mapping,
                                                                    org.apache.struts.action.ActionForm form,
                                                                    javax.servlet.http.HttpServletRequest request,
                                                                    javax.servlet.http.HttpServletResponse response)
                                                             throws Exception
Removes a hold on the payment request.

Parameters:
mapping - An ActionMapping
form - An ActionForm
request - The HttpServletRequest
response - The HttpServletResponse
Returns:
An ActionForward
Throws:
Exception

requestCancelOnPayment

public org.apache.struts.action.ActionForward requestCancelOnPayment(org.apache.struts.action.ActionMapping mapping,
                                                                     org.apache.struts.action.ActionForm form,
                                                                     javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response)
                                                              throws Exception
This action requests a cancel on a preq, prompting for a reason before hand. This stops further approvals or routing.

Parameters:
mapping - An ActionMapping
form - An ActionForm
request - The HttpServletRequest
response - The HttpServletResponse
Returns:
An ActionForward
Throws:
Exception

removeCancelRequestFromPayment

public org.apache.struts.action.ActionForward removeCancelRequestFromPayment(org.apache.struts.action.ActionMapping mapping,
                                                                             org.apache.struts.action.ActionForm form,
                                                                             javax.servlet.http.HttpServletRequest request,
                                                                             javax.servlet.http.HttpServletResponse response)
                                                                      throws Exception
Removes a request for cancel on a payment request.

Parameters:
mapping - An ActionMapping
form - An ActionForm
request - The HttpServletRequest
response - The HttpServletResponse
Returns:
An ActionForward
Throws:
Exception

customCalculate

protected void customCalculate(PurchasingAccountsPayableDocument apDoc)
Calls a service method to calculate for a payment request document.

Overrides:
customCalculate in class PurchasingAccountsPayableActionBase
Parameters:
apDoc - The AccountsPayableDocument

getActionName

public String getActionName()
Description copied from class: AccountsPayableActionBase
Returns the current action name.

Overrides:
getActionName in class AccountsPayableActionBase
Returns:
A String. Set to null!
See Also:
AccountsPayableActionBase.getActionName()

useAlternateVendor

public org.apache.struts.action.ActionForward useAlternateVendor(org.apache.struts.action.ActionMapping mapping,
                                                                 org.apache.struts.action.ActionForm form,
                                                                 javax.servlet.http.HttpServletRequest request,
                                                                 javax.servlet.http.HttpServletResponse response)
                                                          throws Exception
Throws:
Exception

useOriginalVendor

public org.apache.struts.action.ActionForward useOriginalVendor(org.apache.struts.action.ActionMapping mapping,
                                                                org.apache.struts.action.ActionForm form,
                                                                javax.servlet.http.HttpServletRequest request,
                                                                javax.servlet.http.HttpServletResponse response)
                                                         throws Exception
Throws:
Exception

route

public org.apache.struts.action.ActionForward route(org.apache.struts.action.ActionMapping mapping,
                                                    org.apache.struts.action.ActionForm form,
                                                    javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
                                             throws Exception
Overrides:
route in class AccountsPayableActionBase
Throws:
Exception
See Also:
KualiDocumentActionBase.route(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

approve

public org.apache.struts.action.ActionForward approve(org.apache.struts.action.ActionMapping mapping,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
                                               throws Exception
Overrides to invoke the updateAccountAmounts so that the account percentage will be correctly updated before validation for account percent is called.

Overrides:
approve in class KualiAccountingDocumentActionBase
Throws:
Exception
See Also:
KualiDocumentActionBase.approve(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

requiresCalculateTax

protected boolean requiresCalculateTax(PaymentRequestForm preqForm)
Checks if tax calculation is required. Currently it is required when preq is awaiting for tax approval and tax has not already been calculated.

Parameters:
apForm - A Form, which must inherit from AccountsPayableFormBase
Returns:
true if calculation is required, false otherwise

changeUseTaxIndicator

public org.apache.struts.action.ActionForward changeUseTaxIndicator(org.apache.struts.action.ActionMapping mapping,
                                                                    org.apache.struts.action.ActionForm form,
                                                                    javax.servlet.http.HttpServletRequest request,
                                                                    javax.servlet.http.HttpServletResponse response)
                                                             throws Exception
Throws:
Exception


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.