org.kuali.kfs.module.ar.document
Class PaymentApplicationDocument

java.lang.Object
  extended by org.kuali.rice.kns.bo.BusinessObjectBase
      extended by org.kuali.rice.kns.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.kns.document.DocumentBase
              extended by org.kuali.rice.kns.document.TransactionalDocumentBase
                  extended by org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase
                      extended by org.kuali.kfs.sys.document.LedgerPostingDocumentBase
                          extended by org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase
                              extended by org.kuali.kfs.module.ar.document.PaymentApplicationDocument
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, FinancialSystemTransactionalDocument, GeneralLedgerPendingEntrySource, GeneralLedgerPostingDocument, LedgerPostingDocument, org.kuali.rice.kns.bo.BusinessObject, org.kuali.rice.kns.bo.PersistableBusinessObject, org.kuali.rice.kns.document.Document, org.kuali.rice.kns.document.SessionDocument, org.kuali.rice.kns.document.TransactionalDocument

public class PaymentApplicationDocument
extends GeneralLedgerPostingDocumentBase
implements GeneralLedgerPendingEntrySource

See Also:
Serialized Form

Field Summary
protected  AccountsReceivableDocumentHeader accountsReceivableDocumentHeader
           
protected  org.kuali.rice.kns.service.BusinessObjectService boService
           
protected  CashControlDetail cashControlDetail
           
protected  org.kuali.rice.kns.service.DocumentService docService
           
protected  FinancialSystemUserService fsUserService
           
protected  String hiddenFieldForErrors
           
protected  CustomerInvoiceDocumentService invoiceDocService
           
protected  List<InvoicePaidApplied> invoicePaidApplieds
           
protected static String LAUNCHED_FROM_BATCH
           
protected static org.apache.log4j.Logger LOG
           
protected  Collection<NonAppliedDistribution> nonAppliedDistributions
           
protected  NonAppliedHolding nonAppliedHolding
           
protected  NonAppliedHoldingService nonAppliedHoldingService
           
protected  ArrayList<NonAppliedHolding> nonAppliedHoldingsForCustomer
           
protected  Collection<NonInvoicedDistribution> nonInvoicedDistributions
           
protected  List<NonInvoiced> nonInvoiceds
           
protected  PaymentApplicationDocumentService paymentApplicationDocumentService
           
 
Fields inherited from class org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase
generalLedgerPendingEntries
 
Fields inherited from class org.kuali.kfs.sys.document.LedgerPostingDocumentBase
accountingPeriod, accountingPeriodService, checkPostingYearForCopy, dataDictionaryService, dateTimeService, postingPeriodCode, postingYear
 
Fields inherited from class org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase
documentHeader
 
Fields inherited from class org.kuali.rice.kns.document.DocumentBase
documentBusinessObject, documentNumber
 
Fields inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
PaymentApplicationDocument()
           
 
Method Summary
 Map<String,org.kuali.rice.kns.util.KualiDecimal> allocateFundsFromUnappliedControls(List<NonAppliedHolding> nonAppliedHoldings, org.kuali.rice.kns.util.KualiDecimal amountToBeApplied)
          Walks through the nonAppliedHoldings passed in (the control docs) and allocates how the funding should be allocated.
 boolean answerSplitNodeQuestion(String nodeName)
           
 List buildListOfDeletionAwareLists()
           
 void createDistributions()
           
protected  List<GeneralLedgerPendingEntry> createPendingEntries(GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
           
 void doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO statusChangeEvent)
          Override to call super and then iterate over all GLPEs and update the approved code appropriately.
 boolean generateDocumentGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
          Creates any GeneralLedgerPostingEntry's that are based on a document, not those based on GeneralLedgerPendingEntrySourceDetail entries
 boolean generateGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySourceDetail glpeSourceDetail, GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
          Generates any number of general ledger pending entries from a given general ledger pending entry source detail and adds them to this general ledger pending entry source
 AccountsReceivableDocumentHeader getAccountsReceivableDocumentHeader()
           
protected  org.kuali.rice.kns.service.BusinessObjectService getBoService()
           
 CashControlDetail getCashControlDetail()
           
 CashControlDocument getCashControlDocument()
           
 Map<String,org.kuali.rice.kns.util.KualiDecimal> getDistributionsFromControlDocuments()
          Collects and returns the combined distributions from NonInvoiced/NonAr and Unapplied.
protected  org.kuali.rice.kns.service.DocumentService getDocService()
           
protected  FinancialSystemUserService getFsUserService()
           
 org.kuali.rice.kns.util.KualiDecimal getGeneralLedgerPendingEntryAmountForDetail(GeneralLedgerPendingEntrySourceDetail glpeSourceDetail)
          A method to determine what the actual amount, based off of a GeneralLedgerPendingEntrySourceDetail, should be for the resultant GeneralLedgerPendingEntry
 List<GeneralLedgerPendingEntrySourceDetail> getGeneralLedgerPendingEntrySourceDetails()
          Returns a list of any GeneralLedgerPostables this helper has, to create GeneralLedgerPendingEntries
 String getHiddenFieldForErrors()
           
 String getInvoiceAppliedCustomerName()
          This method is defined to assist in the custom search implementation.
 String getInvoiceAppliedCustomerNumber()
          This method is defined to assist in the custom search implementation.
protected  CustomerInvoiceDocumentService getInvoiceDocService()
           
protected  List<String> getInvoiceNumbersToUpdateOnFinal()
          This method is used ONLY for handleRouteStatus change and other postProcessor related tasks (like getWorkflowEngineDocumentIdsToLock()) and should not otherwise be used.
 InvoicePaidApplied getInvoicePaidApplied(int index)
          This method retrieves a specific applied payment from the list, by array index
 List<InvoicePaidApplied> getInvoicePaidApplieds()
           
protected  ObjectCode getInvoiceReceivableObjectCode(InvoicePaidApplied invoicePaidApplied)
          This method gets an ObjectCode from an invoice document.
 List<CustomerInvoiceDocument> getInvoicesPaidAgainst()
          This method is very specialized for a specific use.
 org.kuali.rice.kns.util.KualiDecimal getNonAppliedControlAvailableUnappliedAmount()
          This method calculates the total amount available to be applied from previously unapplied funds for the associated customer.
 Collection<NonAppliedDistribution> getNonAppliedDistributions()
           
 NonAppliedHolding getNonAppliedHolding()
           
 org.kuali.rice.kns.util.KualiDecimal getNonAppliedHoldingAmount()
           
protected  NonAppliedHoldingService getNonAppliedHoldingService()
           
 Collection<NonAppliedHolding> getNonAppliedHoldingsForCustomer()
          Retrieves the NonApplied Holdings that are the Controls for this PaymentApplication.
 List<NonAppliedHolding> getNonAppliedHoldingsUsedAsControls()
           
 org.kuali.rice.kns.util.KualiDecimal getNonArTotal()
           
 NonInvoiced getNonInvoiced(int index)
          This method retrieves a specific non invoiced payment from the list, by array index
 Collection<NonInvoicedDistribution> getNonInvoicedDistributions()
           
 List<NonInvoiced> getNonInvoiceds()
           
 PaymentApplicationDocumentService getPaymentApplicationDocumentService()
           
 List<PaymentApplicationDocument> getPaymentApplicationDocumentsUsedAsControlDocuments()
          This is a very specialized method, that is only intended to be used once the document is in a Final/Approved state.
 String getPaymentNumber()
          Returns the PaymentMediumIdentifier on the associated CashControlDetail, if one exists, otherwise returns null.
 org.kuali.rice.kns.util.KualiDecimal getSumOfInvoicePaidApplieds()
           
 org.kuali.rice.kns.util.KualiDecimal getSumOfNonAppliedDistributions()
           
 org.kuali.rice.kns.util.KualiDecimal getSumOfNonInvoicedDistributions()
           
 org.kuali.rice.kns.util.KualiDecimal getSumOfNonInvoiceds()
           
 org.kuali.rice.kns.util.KualiDecimal getTotalApplied()
          This method returns the total amount allocated against the cash control total.
 org.kuali.rice.kns.util.KualiDecimal getTotalFromControl()
          This method calculates the total amount available to be applied on this document.
 org.kuali.rice.kns.util.KualiDecimal getUnallocatedBalance()
          This method subtracts the sum of the invoice paid applieds, non-ar and unapplied totals from the outstanding amount received via the cash control document.
 String getUnappliedCustomerName()
          This method is defined to assist in the custom search implementation.
 String getUnappliedCustomerNumber()
          This method is defined to assist in the custom search implementation.
 List<Long> getWorkflowEngineDocumentIdsToLock()
           
 boolean hasCashControlDetail()
           
 boolean hasCashControlDocument()
           
 boolean isApproved()
           
 boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
          This method determines if the passed in GeneralLedgerPendingEntrySourceDetail is a debit or not.
 boolean isFinal()
           
protected  boolean launchedFromBatch()
           
 void prepareForSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent event)
           
 void setAccountsReceivableDocumentHeader(AccountsReceivableDocumentHeader accountsReceivableDocumentHeader)
           
 void setCashControlDetail(CashControlDetail cashControlDetail)
           
 void setHiddenFieldForErrors(String hiddenFieldForErrors)
           
 void setInvoicePaidApplieds(List<InvoicePaidApplied> appliedPayments)
           
 void setNonAppliedDistributions(Collection<NonAppliedDistribution> nonAppliedDistributions)
           
 void setNonAppliedHolding(NonAppliedHolding nonAppliedHolding)
           
 void setNonAppliedHoldingsForCustomer(ArrayList<NonAppliedHolding> nonApplieds)
          Warning, this property is not ever persisted to the database, and is only used during workflow processing (since its been serialized) and during presentation of the document on the webapp.
 void setNonInvoicedDistributions(Collection<NonInvoicedDistribution> nonInvoicedDistributions)
           
 void setNonInvoiceds(List<NonInvoiced> nonInvoiceds)
           
 
Methods inherited from class org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase
addPendingEntry, changeGeneralLedgerPendingEntriesApprovedStatusCode, checkSufficientFunds, clearAnyGeneralLedgerPendingEntries, documentPerformsSufficientFundsCheck, getGeneralLedgerPendingEntries, getGeneralLedgerPendingEntry, getPendingLedgerEntriesForSufficientFundsChecking, removeGeneralLedgerPendingEntries, setGeneralLedgerPendingEntries, toCopy, toErrorCorrection
 
Methods inherited from class org.kuali.kfs.sys.document.LedgerPostingDocumentBase
createInitialAccountingPeriod, getAccountingPeriod, getAccountingPeriodService, getDataDictionaryService, getDateTimeService, getFinancialDocumentTypeCode, getPostingPeriodCode, getPostingYear, retrieveCurrentAccountingPeriod, setAccountingPeriod, setPostingPeriodCode, setPostingYear
 
Methods inherited from class org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase
getDocumentHeader, prepareForSave, processAfterRetrieve, setDocumentHeader
 
Methods inherited from class org.kuali.rice.kns.document.TransactionalDocumentBase
getAllowsCopy, isSessionDocument
 
Methods inherited from class org.kuali.rice.kns.document.DocumentBase
addCopyErrorDocumentNote, addPessimisticLock, afterLookup, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, createPropertySerializabilityEvaluator, doActionTaken, doRouteLevelChange, generateSaveEvents, getAdHocRoutePersons, getAdHocRouteWorkgroups, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentBusinessObject, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getNonLockingActionTakenCodes, getPessimisticLocks, getXmlForRouteReport, logErrors, populateDocumentForRouting, postProcessSave, refresh, refreshIfEmpty, refreshPessimisticLocks, refreshReferenceObject, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentNumber, setNewDocumentHeader, setPessimisticLocks, toString, toStringBuilder, toStringMapper, useCustomLockDescriptors, validateBusinessRules, wrapDocumentWithMetadataForXmlSerialization
 
Methods inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
addNote, afterDelete, afterInsert, afterUpdate, beforeDelete, beforeInsert, beforeInsert, beforeUpdate, beforeUpdate, deleteNote, getAttachmentService, getBoNote, getBoNotes, getExtension, getNoteService, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isAutoIncrementSet, isBoNotesSupport, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, setAutoIncrementSet, setBoNotes, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber, supportsBoNotes
 
Methods inherited from class org.kuali.rice.kns.bo.BusinessObjectBase
prepareForWorkflow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.kfs.sys.document.GeneralLedgerPendingEntrySource
addPendingEntry, clearAnyGeneralLedgerPendingEntries, getDocumentHeader, getFinancialDocumentTypeCode, getPostingYear
 
Methods inherited from interface org.kuali.kfs.sys.document.LedgerPostingDocument
getAccountingPeriod, getPostingPeriodCode, getPostingYear, setAccountingPeriod, setPostingPeriodCode, setPostingYear
 
Methods inherited from interface org.kuali.kfs.sys.document.FinancialSystemTransactionalDocument
getDocumentHeader
 
Methods inherited from interface org.kuali.rice.kns.document.Document
addPessimisticLock, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, doActionTaken, doRouteLevelChange, generateSaveEvents, getAdHocRoutePersons, getAdHocRouteWorkgroups, getAllowsCopy, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentBusinessObject, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getPessimisticLocks, getXmlForRouteReport, populateDocumentForRouting, postProcessSave, prepareForSave, processAfterRetrieve, refreshPessimisticLocks, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setDocumentNumber, useCustomLockDescriptors, validateBusinessRules, wrapDocumentWithMetadataForXmlSerialization
 
Methods inherited from interface org.kuali.rice.kns.bo.PersistableBusinessObject
addNote, deleteNote, getBoNote, getBoNotes, getExtension, getObjectId, getVersionNumber, isBoNotesSupport, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, refreshReferenceObject, setAutoIncrementSet, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
Methods inherited from interface org.kuali.rice.kns.bo.BusinessObject
prepareForWorkflow, refresh
 
Methods inherited from interface org.apache.ojb.broker.PersistenceBrokerAware
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate
 

Field Detail

LOG

protected static org.apache.log4j.Logger LOG

LAUNCHED_FROM_BATCH

protected static final String LAUNCHED_FROM_BATCH
See Also:
Constant Field Values

hiddenFieldForErrors

protected String hiddenFieldForErrors

invoicePaidApplieds

protected List<InvoicePaidApplied> invoicePaidApplieds

nonInvoiceds

protected List<NonInvoiced> nonInvoiceds

nonInvoicedDistributions

protected Collection<NonInvoicedDistribution> nonInvoicedDistributions

nonAppliedDistributions

protected Collection<NonAppliedDistribution> nonAppliedDistributions

nonAppliedHolding

protected NonAppliedHolding nonAppliedHolding

accountsReceivableDocumentHeader

protected AccountsReceivableDocumentHeader accountsReceivableDocumentHeader

paymentApplicationDocumentService

protected transient PaymentApplicationDocumentService paymentApplicationDocumentService

cashControlDetail

protected transient CashControlDetail cashControlDetail

fsUserService

protected transient FinancialSystemUserService fsUserService

invoiceDocService

protected transient CustomerInvoiceDocumentService invoiceDocService

docService

protected transient org.kuali.rice.kns.service.DocumentService docService

nonAppliedHoldingService

protected transient NonAppliedHoldingService nonAppliedHoldingService

boService

protected transient org.kuali.rice.kns.service.BusinessObjectService boService

nonAppliedHoldingsForCustomer

protected ArrayList<NonAppliedHolding> nonAppliedHoldingsForCustomer
Constructor Detail

PaymentApplicationDocument

public PaymentApplicationDocument()
Method Detail

getPaymentNumber

public String getPaymentNumber()
Returns the PaymentMediumIdentifier on the associated CashControlDetail, if one exists, otherwise returns null.

Returns:
CustomerPaymentMediumIdentifier from the associated CashControlDetail if one exists, otherwise null.

hasCashControlDocument

public boolean hasCashControlDocument()

getCashControlDocument

public CashControlDocument getCashControlDocument()
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

hasCashControlDetail

public boolean hasCashControlDetail()

getCashControlDetail

public CashControlDetail getCashControlDetail()
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

setCashControlDetail

public void setCashControlDetail(CashControlDetail cashControlDetail)

getTotalFromControl

public org.kuali.rice.kns.util.KualiDecimal getTotalFromControl()
This method calculates the total amount available to be applied on this document.

Returns:
The total from the cash control detail if this is a cash-control based payapp. Otherwise, it just returns the total available to be applied from previously unapplied holdings.

getNonAppliedControlAvailableUnappliedAmount

public org.kuali.rice.kns.util.KualiDecimal getNonAppliedControlAvailableUnappliedAmount()
This method calculates the total amount available to be applied from previously unapplied funds for the associated customer.

Returns:
The total amount of previously NonApplied funds available to apply to invoices and other applications on this document.

getSumOfInvoicePaidApplieds

public org.kuali.rice.kns.util.KualiDecimal getSumOfInvoicePaidApplieds()
Returns:
the sum of all invoice paid applieds.

getSumOfNonInvoiceds

public org.kuali.rice.kns.util.KualiDecimal getSumOfNonInvoiceds()
Returns:
the sum of all non-invoiced amounts

getSumOfNonInvoicedDistributions

public org.kuali.rice.kns.util.KualiDecimal getSumOfNonInvoicedDistributions()
Returns:
the sum of all non-invoiced distributions

getSumOfNonAppliedDistributions

public org.kuali.rice.kns.util.KualiDecimal getSumOfNonAppliedDistributions()
Returns:
the sum of all non-applied distributions

getNonAppliedHoldingAmount

public org.kuali.rice.kns.util.KualiDecimal getNonAppliedHoldingAmount()
Returns:
the non-applied holding total.

getTotalApplied

public org.kuali.rice.kns.util.KualiDecimal getTotalApplied()
This method returns the total amount allocated against the cash control total.

Returns:

getUnallocatedBalance

public org.kuali.rice.kns.util.KualiDecimal getUnallocatedBalance()
This method subtracts the sum of the invoice paid applieds, non-ar and unapplied totals from the outstanding amount received via the cash control document. NOTE this method is not useful for a non-cash control PayApp, as it doesnt have access to the control documents until it is saved. Use the same named method on the Form instead.

Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

getNonArTotal

public org.kuali.rice.kns.util.KualiDecimal getNonArTotal()

isFinal

public boolean isFinal()

isApproved

public boolean isApproved()

getInvoicesPaidAgainst

public List<CustomerInvoiceDocument> getInvoicesPaidAgainst()
This method is very specialized for a specific use. It retrieves the list of invoices that have been paid-applied by this PayApp document. It is only used to retrieve what invoices were applied to it, when the document is being viewed in Final state.

Returns:

getPaymentApplicationDocumentsUsedAsControlDocuments

public List<PaymentApplicationDocument> getPaymentApplicationDocumentsUsedAsControlDocuments()
This is a very specialized method, that is only intended to be used once the document is in a Final/Approved state. It retrieves the PaymentApplication documents that were used as a control source for this document, if any, or none, if none.

Returns:

getNonAppliedHoldingsUsedAsControls

public List<NonAppliedHolding> getNonAppliedHoldingsUsedAsControls()

getInvoicePaidApplieds

public List<InvoicePaidApplied> getInvoicePaidApplieds()

setInvoicePaidApplieds

public void setInvoicePaidApplieds(List<InvoicePaidApplied> appliedPayments)

getNonInvoiceds

public List<NonInvoiced> getNonInvoiceds()

setNonInvoiceds

public void setNonInvoiceds(List<NonInvoiced> nonInvoiceds)

getNonInvoicedDistributions

public Collection<NonInvoicedDistribution> getNonInvoicedDistributions()

setNonInvoicedDistributions

public void setNonInvoicedDistributions(Collection<NonInvoicedDistribution> nonInvoicedDistributions)

getNonAppliedDistributions

public Collection<NonAppliedDistribution> getNonAppliedDistributions()

setNonAppliedDistributions

public void setNonAppliedDistributions(Collection<NonAppliedDistribution> nonAppliedDistributions)

getNonAppliedHolding

public NonAppliedHolding getNonAppliedHolding()

setNonAppliedHolding

public void setNonAppliedHolding(NonAppliedHolding nonAppliedHolding)

getAccountsReceivableDocumentHeader

public AccountsReceivableDocumentHeader getAccountsReceivableDocumentHeader()

setAccountsReceivableDocumentHeader

public void setAccountsReceivableDocumentHeader(AccountsReceivableDocumentHeader accountsReceivableDocumentHeader)

getInvoicePaidApplied

public InvoicePaidApplied getInvoicePaidApplied(int index)
This method retrieves a specific applied payment from the list, by array index

Parameters:
index - the index of the applied payment to retrieve
Returns:
an InvoicePaidApplied

getNonInvoiced

public NonInvoiced getNonInvoiced(int index)
This method retrieves a specific non invoiced payment from the list, by array index

Parameters:
index - the index of the non invoiced payment to retrieve
Returns:
an NonInvoiced

getInvoiceReceivableObjectCode

protected ObjectCode getInvoiceReceivableObjectCode(InvoicePaidApplied invoicePaidApplied)
                                             throws org.kuali.rice.kew.exception.WorkflowException
This method gets an ObjectCode from an invoice document.

Parameters:
invoicePaidApplied -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

createPendingEntries

protected List<GeneralLedgerPendingEntry> createPendingEntries(GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
                                                        throws org.kuali.rice.kew.exception.WorkflowException
Parameters:
sequenceHelper -
Returns:
the pending entries for the document
Throws:
org.kuali.rice.kew.exception.WorkflowException

generateDocumentGeneralLedgerPendingEntries

public boolean generateDocumentGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
Description copied from interface: GeneralLedgerPendingEntrySource
Creates any GeneralLedgerPostingEntry's that are based on a document, not those based on GeneralLedgerPendingEntrySourceDetail entries

Specified by:
generateDocumentGeneralLedgerPendingEntries in interface GeneralLedgerPendingEntrySource
Parameters:
sequenceHelper - a sequence helper for the method to create more general ledger pending entries
Returns:
true if the pending entries were able to be successfully created and added to this GeneralLedgerPendingEntrySource; false if an error condition occurred with mean that GLPEs were not correctly generated
See Also:
GeneralLedgerPendingEntrySource.generateDocumentGeneralLedgerPendingEntries(org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper)

generateGeneralLedgerPendingEntries

public boolean generateGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySourceDetail glpeSourceDetail,
                                                   GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
Description copied from interface: GeneralLedgerPendingEntrySource
Generates any number of general ledger pending entries from a given general ledger pending entry source detail and adds them to this general ledger pending entry source

Specified by:
generateGeneralLedgerPendingEntries in interface GeneralLedgerPendingEntrySource
Parameters:
glpeSourceDetail - the source detail line to generate general ledger pending entries for
sequenceHelper - the sequence helper which will assign sequence number to generated general ledger pending entries
Returns:
true if general ledger pending entry generation was successful; false if an error condition prevented the successful generation of the pending entries

getGeneralLedgerPendingEntryAmountForDetail

public org.kuali.rice.kns.util.KualiDecimal getGeneralLedgerPendingEntryAmountForDetail(GeneralLedgerPendingEntrySourceDetail glpeSourceDetail)
Description copied from interface: GeneralLedgerPendingEntrySource
A method to determine what the actual amount, based off of a GeneralLedgerPendingEntrySourceDetail, should be for the resultant GeneralLedgerPendingEntry

Specified by:
getGeneralLedgerPendingEntryAmountForDetail in interface GeneralLedgerPendingEntrySource
Parameters:
glpeSourceDetail - the detail line from the general ledger pending entry source to find an amount for
Returns:
The amount that will be used to populate the amount on the generated general ledger pending entry for the given source detail

getGeneralLedgerPendingEntrySourceDetails

public List<GeneralLedgerPendingEntrySourceDetail> getGeneralLedgerPendingEntrySourceDetails()
Description copied from interface: GeneralLedgerPendingEntrySource
Returns a list of any GeneralLedgerPostables this helper has, to create GeneralLedgerPendingEntries

Specified by:
getGeneralLedgerPendingEntrySourceDetails in interface GeneralLedgerPendingEntrySource
Returns:
a list of GeneralLedgerPostables

isDebit

public boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
Description copied from interface: GeneralLedgerPendingEntrySource
This method determines if the passed in GeneralLedgerPendingEntrySourceDetail is a debit or not.

Specified by:
isDebit in interface GeneralLedgerPendingEntrySource
Returns:
true if the given GeneralLedgerPendingEntrySourceDetail is a debit, false if it is a credit

getInvoiceNumbersToUpdateOnFinal

protected List<String> getInvoiceNumbersToUpdateOnFinal()
This method is used ONLY for handleRouteStatus change and other postProcessor related tasks (like getWorkflowEngineDocumentIdsToLock()) and should not otherwise be used. The reason this is its own method is to make sure that handleRouteStatusChange and getWorkflowEngineDocumentIdsToLock use the same method to retrieve what invoices to update.

Returns:

getWorkflowEngineDocumentIdsToLock

public List<Long> getWorkflowEngineDocumentIdsToLock()
Specified by:
getWorkflowEngineDocumentIdsToLock in interface org.kuali.rice.kns.document.Document
Overrides:
getWorkflowEngineDocumentIdsToLock in class org.kuali.rice.kns.document.DocumentBase

doRouteStatusChange

public void doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO statusChangeEvent)
Description copied from class: GeneralLedgerPostingDocumentBase
Override to call super and then iterate over all GLPEs and update the approved code appropriately.

Specified by:
doRouteStatusChange in interface org.kuali.rice.kns.document.Document
Overrides:
doRouteStatusChange in class GeneralLedgerPostingDocumentBase
See Also:
Document#doRouteStatusChange()

buildListOfDeletionAwareLists

public List buildListOfDeletionAwareLists()
Specified by:
buildListOfDeletionAwareLists in interface org.kuali.rice.kns.bo.PersistableBusinessObject
Overrides:
buildListOfDeletionAwareLists in class org.kuali.rice.kns.bo.PersistableBusinessObjectBase

prepareForSave

public void prepareForSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent event)
Specified by:
prepareForSave in interface org.kuali.rice.kns.document.Document
Overrides:
prepareForSave in class GeneralLedgerPostingDocumentBase

getPaymentApplicationDocumentService

public PaymentApplicationDocumentService getPaymentApplicationDocumentService()

getFsUserService

protected FinancialSystemUserService getFsUserService()

getInvoiceDocService

protected CustomerInvoiceDocumentService getInvoiceDocService()

getDocService

protected org.kuali.rice.kns.service.DocumentService getDocService()

getNonAppliedHoldingService

protected NonAppliedHoldingService getNonAppliedHoldingService()

getBoService

protected org.kuali.rice.kns.service.BusinessObjectService getBoService()

getHiddenFieldForErrors

public String getHiddenFieldForErrors()

setHiddenFieldForErrors

public void setHiddenFieldForErrors(String hiddenFieldForErrors)

getNonAppliedHoldingsForCustomer

public Collection<NonAppliedHolding> getNonAppliedHoldingsForCustomer()
Retrieves the NonApplied Holdings that are the Controls for this PaymentApplication. Note that this is dangerous to use and should not be relied upon. The data is never persisted to the database, so will always be null/empty when retrieved fresh. It is only populated while the document is live from the website, or while its in flight in workflow, due to the fact that it has been serialized. You should probably not be using this method unless you are sure you know what you are doing.

Returns:

setNonAppliedHoldingsForCustomer

public void setNonAppliedHoldingsForCustomer(ArrayList<NonAppliedHolding> nonApplieds)
Warning, this property is not ever persisted to the database, and is only used during workflow processing (since its been serialized) and during presentation of the document on the webapp. You should probably not be using this method unless you are sure you know what you are doing.

Parameters:
nonApplieds -

getDistributionsFromControlDocuments

public Map<String,org.kuali.rice.kns.util.KualiDecimal> getDistributionsFromControlDocuments()
Collects and returns the combined distributions from NonInvoiced/NonAr and Unapplied. This method is intended to be used only when the document has gone to final, to show what control documents were issued what funds. The return value is a Map where the key is the NonAppliedHolding's ReferenceFinancialDocumentNumber and the value is the Amount to be applied.

Returns:

allocateFundsFromUnappliedControls

public Map<String,org.kuali.rice.kns.util.KualiDecimal> allocateFundsFromUnappliedControls(List<NonAppliedHolding> nonAppliedHoldings,
                                                                                           org.kuali.rice.kns.util.KualiDecimal amountToBeApplied)
Walks through the nonAppliedHoldings passed in (the control docs) and allocates how the funding should be allocated. This function is intended to be used when the document is still live, ie not for when its been finalized. The return value is a Map where the key is the NonAppliedHolding's ReferenceFinancialDocumentNumber and the value is the Amount to be applied.


createDistributions

public void createDistributions()

answerSplitNodeQuestion

public boolean answerSplitNodeQuestion(String nodeName)
                                throws UnsupportedOperationException
Specified by:
answerSplitNodeQuestion in interface FinancialSystemTransactionalDocument
Overrides:
answerSplitNodeQuestion in class FinancialSystemTransactionalDocumentBase
Throws:
UnsupportedOperationException
See Also:
FinancialSystemTransactionalDocumentBase.answerSplitNodeQuestion(java.lang.String)

launchedFromBatch

protected boolean launchedFromBatch()

getUnappliedCustomerNumber

public String getUnappliedCustomerNumber()
This method is defined to assist in the custom search implementation.

Returns:

getUnappliedCustomerName

public String getUnappliedCustomerName()
This method is defined to assist in the custom search implementation.

Returns:

getInvoiceAppliedCustomerNumber

public String getInvoiceAppliedCustomerNumber()
This method is defined to assist in the custom search implementation.

Returns:

getInvoiceAppliedCustomerName

public String getInvoiceAppliedCustomerName()
This method is defined to assist in the custom search implementation.

Returns:


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