org.kuali.kfs.module.ar.document.web.struts
Class CustomerInvoiceDocumentAction

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.ar.document.web.struts.CustomerInvoiceDocumentAction

public class CustomerInvoiceDocumentAction
extends KualiAccountingDocumentActionBase


Field Summary
 
Fields inherited from class org.kuali.kfs.sys.web.struts.KualiAccountingDocumentActionBase
LOG, 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
CustomerInvoiceDocumentAction()
           
 
Method Summary
 org.apache.struts.action.ActionForward copy(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Method that will take the current document, copy it, replace all references to doc header id with a new one, clear pending entries, clear notes, and reset version numbers
protected  void createDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
          Called when customer invoice document is initiated.
protected  void deleteAccountingLine(boolean isSource, KualiAccountingDocumentFormBase financialDocumentForm, int deleteIndex)
          Overrides method to delete accounting line.
 org.apache.struts.action.ActionForward discountSourceLine(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method is used for inserting a discount line based on a selected source line.
 org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Overriding to make it easier to distinguish discount lines and lines that are associated to discounts
protected  String getUrlForPrintInvoice(String basePath, String docId, String methodToCall)
          Creates a URL to be used in printing the customer invoice document.
 org.apache.struts.action.ActionForward insertSourceLine(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Removed salesTax checking.
protected  void loadDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
          All document-load operations get routed through here
protected  org.apache.struts.action.ActionForward performInvoiceWithDiscountsCheck(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, CustomerInvoiceDocument customerInvoiceDocument)
          This method checks if the user wants to copy a document that contains a discount line.
 org.apache.struts.action.ActionForward print(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method...
 org.apache.struts.action.ActionForward printInvoicePDF(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method...
 org.apache.struts.action.ActionForward recalculateSourceLine(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method is the action for recalculating the amount added line assuming that the unit price or quantity has changed
 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)
          Needed to override this to keep from losing Sales Tax information
 org.apache.struts.action.ActionForward refreshBillToAddress(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method refresh the ShipToAddress CustomerAddress object
 org.apache.struts.action.ActionForward refreshNewSourceLine(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method is the action for refreshing the added source line (or customer invoice detail) based off a provided invoice item code.
 org.apache.struts.action.ActionForward refreshShipToAddress(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method refresh the ShipToAddress CustomerAddress object
 
Methods inherited from class org.kuali.kfs.sys.web.struts.KualiAccountingDocumentActionBase
addCapitalAssetInfo, addCapitalAssetInfoDetailLines, applyCapitalAssetInformation, approve, blanketApprove, checkSalesTax, checkSalesTaxRequiredAllLines, checkUploadFile, clearCapitalAssetInfo, clearOverridesThatBecameUnneeded, deepCopyAccountingLinesList, deleteCapitalAssetInfoDetailLine, deleteSourceLine, deleteTargetLine, getCurrentCapitalAssetInformationObject, getMaxItemLineNumber, getNextItemLineNumberAndIncremented, getObjectTypeCodeFromLine, getSourceAccountingLine, getTargetAccountingLine, handleSalesTaxRequired, handleSalesTaxRequiredAllLines, hasSalesTaxBeenEntered, hideDetails, insertAccountingLine, insertTargetLine, isSalesTaxRequired, isValidSalesTaxEntered, performBalanceInquiryForAccountingLine, performBalanceInquiryForSourceLine, performBalanceInquiryForTargetLine, performLookup, populateSalesTax, processAccountingLineOverrides, processAccountingLineOverrides, processAccountingLineOverrides, processAccountingLines, refreshSalesTaxInfo, removeSalesTax, resetCapitalAssetInfo, route, save, showDetails, toggleTab, uploadAccountingLines, 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, cancel, cancelBOAttachment, canSave, checkAndWarnAboutSensitiveData, checkAuthorization, close, combineAdHocRecipients, convertSetToMap, delete, deleteAdHocRoutePerson, deleteAdHocRouteWorkgroup, deleteBONote, determineNoteWorkflowNotificationAction, disapprove, docHandler, doProcessingAfterPost, downloadBOAttachment, exitingDocument, fyi, generatePessimisticLockMessage, getAttachmentService, getBusinessObjectAuthorizationService, getBusinessObjectMetaDataService, getBusinessObjectService, getDataDictionaryService, getDocumentHelperService, getDocumentService, getEntityManagerFactory, getIdentityManagementService, getKualiConfigurationService, getKualiRuleService, getNoteService, getParameterService, getPessimisticLockService, getQuestion, hideAllTabs, insertAdHocRoutePerson, insertAdHocRouteWorkgroup, insertBONote, 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

CustomerInvoiceDocumentAction

public CustomerInvoiceDocumentAction()
Method Detail

execute

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
                                               throws Exception
Overriding to make it easier to distinguish discount lines and lines that are associated to discounts

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

createDocument

protected void createDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
                       throws org.kuali.rice.kew.exception.WorkflowException
Called when customer invoice document is initiated. Makes a call to parent's createDocument method, but also defaults values for customer invoice document. Line which inserts Customer Invoice Detail (i.e. insertSourceLine) has its values defaulted by CustomerInvoiceDocumentForm.createNewSourceAccountingLine()

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)

loadDocument

protected void loadDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase kualiDocumentFormBase)
                     throws org.kuali.rice.kew.exception.WorkflowException
All document-load operations get routed through here

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

copy

public org.apache.struts.action.ActionForward copy(org.apache.struts.action.ActionMapping mapping,
                                                   org.apache.struts.action.ActionForm form,
                                                   javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)
                                            throws Exception
Method that will take the current document, copy it, replace all references to doc header id with a new one, clear pending entries, clear notes, and reset version numbers

Overrides:
copy in class KualiAccountingDocumentActionBase
Parameters:
mapping -
form -
request -
response -
Returns:
Throws:
Exception
See Also:
KualiTransactionalDocumentActionBase.copy(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

performInvoiceWithDiscountsCheck

protected org.apache.struts.action.ActionForward performInvoiceWithDiscountsCheck(org.apache.struts.action.ActionMapping mapping,
                                                                                  org.apache.struts.action.ActionForm form,
                                                                                  javax.servlet.http.HttpServletRequest request,
                                                                                  javax.servlet.http.HttpServletResponse response,
                                                                                  CustomerInvoiceDocument customerInvoiceDocument)
                                                                           throws Exception
This method checks if the user wants to copy a document that contains a discount line. If yes, this method returns null. If no, this method returns the "basic" forward.

Parameters:
mapping -
form -
request -
response -
customerInvoiceDocument -
Returns:
Throws:
Exception

refreshNewSourceLine

public org.apache.struts.action.ActionForward refreshNewSourceLine(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 method is the action for refreshing the added source line (or customer invoice detail) based off a provided invoice item code.

Parameters:
mapping -
form -
request -
response -
Returns:
Throws:
Exception

recalculateSourceLine

public org.apache.struts.action.ActionForward recalculateSourceLine(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 method is the action for recalculating the amount added line assuming that the unit price or quantity has changed

Parameters:
mapping -
form -
request -
response -
Returns:
Throws:
Exception

discountSourceLine

public org.apache.struts.action.ActionForward discountSourceLine(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 method is used for inserting a discount line based on a selected source line.

Parameters:
mapping -
form -
request -
response -
Returns:
Throws:
Exception

insertSourceLine

public org.apache.struts.action.ActionForward insertSourceLine(org.apache.struts.action.ActionMapping mapping,
                                                               org.apache.struts.action.ActionForm form,
                                                               javax.servlet.http.HttpServletRequest request,
                                                               javax.servlet.http.HttpServletResponse response)
                                                        throws Exception
Removed salesTax checking. Need to verify if this check has be moved out later of the KualiAccountingDocumentActionBase class. If so just use the parent class' insertSourceLine method.

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

deleteAccountingLine

protected void deleteAccountingLine(boolean isSource,
                                    KualiAccountingDocumentFormBase financialDocumentForm,
                                    int deleteIndex)
Overrides method to delete accounting line. If line to be deleted has a corresponding discount line, the corresponding discount line is also deleted. If the line to be delete is a discount line, set the reference for the parent to null

Overrides:
deleteAccountingLine in class KualiAccountingDocumentActionBase
Parameters:
isSource -
financialDocumentForm -
deleteIndex -

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: KualiAccountingDocumentActionBase
Needed to override this to keep from losing Sales Tax information

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

refreshBillToAddress

public org.apache.struts.action.ActionForward refreshBillToAddress(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 method refresh the ShipToAddress CustomerAddress object

Parameters:
mapping -
form -
request -
response -
Returns:
Throws:
Exception

refreshShipToAddress

public org.apache.struts.action.ActionForward refreshShipToAddress(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 method refresh the ShipToAddress CustomerAddress object

Parameters:
mapping -
form -
request -
response -
Returns:
Throws:
Exception

print

public org.apache.struts.action.ActionForward print(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 method...

Parameters:
mapping -
form -
request -
response -
Returns:
Throws:
Exception

printInvoicePDF

public org.apache.struts.action.ActionForward printInvoicePDF(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 method...

Parameters:
mapping -
form -
request -
response -
Returns:
Throws:
Exception

getUrlForPrintInvoice

protected String getUrlForPrintInvoice(String basePath,
                                       String docId,
                                       String methodToCall)
Creates a URL to be used in printing the customer invoice document.

Parameters:
basePath - String: The base path of the current URL
docId - String: The document ID of the document to be printed
methodToCall - String: The name of the method that will be invoked to do this particular print
Returns:
The URL


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