public class AuxiliaryVoucherDocument extends AccountingDocumentBase implements VoucherDocument, org.kuali.rice.krad.document.Copyable, Correctable, AmountTotaling
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.log4j.Logger |
LOG |
protected Date |
reversalDate |
protected String |
typeCode |
dataDictionaryEntry, nextSourceLineNumber, nextTargetLineNumber, sourceAccountingLineClass, sourceAccountingLines, targetAccountingLineClass, targetAccountingLinesgeneralLedgerPendingEntriesaccountingPeriod, accountingPeriodService, checkPostingYearForCopy, dataDictionaryService, dateTimeService, postingPeriodCode, postingYearUPDATE_TOTAL_AMOUNT_IN_POST_PROCESSING_PARAMETER_NAME| Constructor and Description |
|---|
AuxiliaryVoucherDocument()
Initializes the array lists and some basic info.
|
| Modifier and Type | Method and Description |
|---|---|
Date |
calculateFirstDayOfMonth(Date d)
Given a day, this method calculates what the first day of that month was.
|
boolean |
calculateIfWithinGracePeriod(Date today,
AccountingPeriod periodToCheck)
This method checks if a given moment of time is within an accounting period, or its auxiliary voucher grace period.
|
int |
comparableDateForm(Date d)
This method returns a date as an approximate count of days since the BCE epoch.
|
void |
customizeExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable,
GeneralLedgerPendingEntry explicitEntry)
This method sets the appropriate document type and object type codes into the GLPEs based on the type of AV document chosen.
|
boolean |
customizeOffsetGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable,
GeneralLedgerPendingEntry explicitEntry,
GeneralLedgerPendingEntry offsetEntry)
Offset entries are created for recodes (AVRC) always, so this method is one of 2 offsets that get created for an AVRC.
|
boolean |
documentPerformsSufficientFundsCheck()
This method checks to see if SF checking should be done for this document.
|
void |
doRouteStatusChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange statusChangeEvent)
Overrides to call super and then change the reversal date if the type is accrual and the date is greater than the set
reversal date.
|
org.kuali.rice.core.api.util.type.KualiDecimal |
getCreditTotal()
This method calculates the credit total for a JV document keying off of the debit/credit code, only summing the accounting
lines with a debitCreditCode that matched the debit constant, and returns the results.
|
org.kuali.rice.core.api.util.type.KualiDecimal |
getDebitTotal()
This method calculates the debit total for a JV document keying off of the debit/debit code, only summing the accounting
lines with a debitDebitCode that matched the debit constant, and returns the results.
|
protected String |
getGeneralLedgerPendingEntryOffsetObjectCode()
Get from APC the offset object code that is used for the
|
protected String |
getObjectTypeCode(GeneralLedgerPendingEntrySourceDetail line)
This method examines the accounting line passed in and returns the appropriate object type code.
|
protected String |
getObjectTypeCodeForRecodeDistributionOfIncomeAndExpenseEntry(GeneralLedgerPendingEntry explicitEntry)
This method examines the explicit entry's object type and returns the appropriate object type code.
|
Date |
getReversalDate()
Read Accessor for Reversal Date
|
org.kuali.rice.core.api.util.type.KualiDecimal |
getTotalDollarAmount()
Same as default implementation but uses debit / credit totals instead.
|
String |
getTypeCode()
Read Accessor for Auxiliary Voucher Type
|
boolean |
isAccrualType()
A helper to test whether this document is an accrual type AV.
|
boolean |
isAdjustmentType()
A helper to test whether this document is an adjustment type AV.
|
boolean |
isDebit(GeneralLedgerPendingEntrySourceDetail postable)
Returns true if an accounting line is a debit or credit The following are credits (return false)
debitCreditCode != 'D'
the following are debits (return true)
debitCreditCode == 'D'
the following are invalid ( throws an
IllegalStateException)
debitCreditCode isBlank
|
protected boolean |
isDocumentForMultipleAccounts()
This method is responsible for iterating through all of the accounting lines in the document (source only) and checking to
see if they are all for the same account or not.
|
boolean |
isEndOfPreviousFiscalYear(AccountingPeriod acctPeriod)
This method checks if the given accounting period ends on the last day of the previous fiscal year
|
boolean |
isRecodeType()
A helper to test whether this document is an recode type AV.
|
protected void |
processAuxiliaryVoucherErrorCorrections()
KULEDOCS-1700 This method iterates over each source line and flip the sign on the amount to nullify the super's effect, then
flip the debit/credit code b/c an error corrected AV flips the debit/credit code.
|
protected void |
processAuxiliaryVoucherRecodeDistributionOfIncomeAndExpenseGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySequenceHelper sequenceHelper,
GeneralLedgerPendingEntry explicitEntry)
This method creates an AV recode specific GLPE with a document type of DI.
|
boolean |
processOffsetGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySequenceHelper sequenceHelper,
GeneralLedgerPendingEntrySourceDetail glpeSourceDetail,
GeneralLedgerPendingEntry explicitEntry,
GeneralLedgerPendingEntry offsetEntry)
An Accrual Voucher only generates offsets if it is a recode (AVRC).
|
protected boolean |
processOffsetGeneralLedgerPendingEntryForAccrualsAndAdjustments(GeneralLedgerPendingEntrySequenceHelper sequenceHelper,
AccountingLine accountingLineCopy,
GeneralLedgerPendingEntry explicitEntry,
GeneralLedgerPendingEntry offsetEntry)
This method handles generating or not generating the appropriate offsets if the AV type is accrual or adjustment.
|
protected boolean |
processOffsetGeneralLedgerPendingEntryForRecodes(GeneralLedgerPendingEntrySequenceHelper sequenceHelper,
AccountingLine accountingLineCopy,
GeneralLedgerPendingEntry explicitEntry,
GeneralLedgerPendingEntry offsetEntry)
This method handles generating or not generating the appropriate offsets if the AV type is a recode.
|
protected boolean |
refreshReversalDate()
If the reversal date on this document is in need of refreshing, refreshes the reveral date.
|
void |
setReversalDate(Date reversalDate)
Write Accessor for Reversal Date
|
void |
setTypeCode(String typeCode)
Write Accessor for Auxiliary Voucher Type
|
void |
toCopy()
If we've copied, we need to update the posting period and year
|
void |
toErrorCorrection()
Converts this Document instance into an error correction of itself.
|
protected void |
updateReversalDate()
This method handles updating the reversal data on the document in addition to all of the GLPEs, but only for the accrual and
recode types.
|
addSourceAccountingLine, addTargetAccountingLine, buildAccountingLineMap, buildListOfDeletionAwareLists, copyAccountingLines, generateDocumentGeneralLedgerPendingEntries, generateEvents, generateGeneralLedgerPendingEntries, generateSaveEvents, getAccountingLineParser, getDataDictionaryEntry, getDocumentClassForAccountingLineValueAllowedValidation, getEntryValue, getGeneralLedgerPendingEntryAmountForDetail, getGeneralLedgerPendingEntrySourceDetails, getNextSourceLineNumber, getNextTargetLineNumber, getPersistedSourceAccountingLinesForComparison, getPersistedTargetAccountingLinesForComparison, getSourceAccountingLine, getSourceAccountingLineClass, getSourceAccountingLineEntryName, getSourceAccountingLines, getSourceAccountingLinesForComparison, getSourceAccountingLinesSectionTitle, getSourceTotal, getTargetAccountingLine, getTargetAccountingLineClass, getTargetAccountingLineEntryName, getTargetAccountingLines, getTargetAccountingLinesForComparison, getTargetAccountingLinesSectionTitle, getTargetTotal, isDocumentFinalOrProcessed, prepareForSave, processExplicitGeneralLedgerPendingEntry, setNextSourceLineNumber, setNextTargetLineNumber, setSourceAccountingLines, setTargetAccountingLines, updatePostingYearForAccountingLinesaddPendingEntry, changeGeneralLedgerPendingEntriesApprovedStatusCode, checkSufficientFunds, clearAnyGeneralLedgerPendingEntries, getGeneralLedgerPendingEntries, getGeneralLedgerPendingEntry, getPendingLedgerEntriesForSufficientFundsChecking, removeGeneralLedgerPendingEntries, setGeneralLedgerPendingEntriescreateInitialAccountingPeriod, getAccountingPeriod, getAccountingPeriodCompositeString, getAccountingPeriodService, getDataDictionaryService, getDateTimeService, getFinancialDocumentTypeCode, getPostingPeriodCode, getPostingYear, retrieveCurrentAccountingPeriod, setAccountingPeriod, setAccountingPeriodCompositeString, setPostingPeriodCode, setPostingYearanswerSplitNodeQuestion, doRouteLevelChange, getApplicationDocumentStatus, getBusinessObjectService, getFinancialSystemDocumentHeader, getFinancialSystemDocumentService, getParameterService, prepareForSave, processAfterRetrieve, setApplicationDocumentStatus, setDocumentHeader, updateAndSaveAppDocStatusgetAllowsCopy, isSessionDocumentaddCopyErrorDocumentNote, addNote, addPessimisticLock, afterActionTaken, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, createPropertySerializabilityEvaluator, doActionTaken, getAdHocRoutePersons, getAdHocRouteWorkgroups, getAttachmentService, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentHeader, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getNonLockingActionTakenCodes, getNote, getNotes, getNoteService, getNoteTarget, getNoteType, getPessimisticLocks, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, logErrors, populateDocumentForRouting, postLoad, postProcessSave, refresh, refreshIfEmpty, refreshPessimisticLocks, refreshReferenceObject, removeNote, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentNumber, setNewDocumentHeader, setNotes, setPessimisticLocks, useCustomLockDescriptors, validateBusinessRules, wrapDocumentWithMetadataForXmlSerializationafterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, getExtension, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postPersist, postRemove, postUpdate, prePersist, preRemove, preUpdate, refreshNonUpdateableReferences, setExtension, setNewCollectionRecord, setObjectId, setVersionNumberclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddSourceAccountingLine, addTargetAccountingLine, getAccountingLineParser, getDocumentClassForAccountingLineValueAllowedValidation, getNextSourceLineNumber, getNextTargetLineNumber, getSourceAccountingLine, getSourceAccountingLineClass, getSourceAccountingLineEntryName, getSourceAccountingLines, getSourceAccountingLinesSectionTitle, getSourceTotal, getTargetAccountingLine, getTargetAccountingLineClass, getTargetAccountingLineEntryName, getTargetAccountingLines, getTargetAccountingLinesSectionTitle, getTargetTotal, isDocumentFinalOrProcessed, setNextSourceLineNumber, setNextTargetLineNumber, setSourceAccountingLines, setTargetAccountingLinescheckSufficientFunds, getGeneralLedgerPendingEntries, getGeneralLedgerPendingEntry, getPendingLedgerEntriesForSufficientFundsChecking, setGeneralLedgerPendingEntriesgetAccountingPeriod, getPostingPeriodCode, getPostingYear, setAccountingPeriod, setPostingPeriodCode, setPostingYearanswerSplitNodeQuestion, getFinancialSystemDocumentHeaderaddNote, addPessimisticLock, afterActionTaken, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, doActionTaken, doRouteLevelChange, generateSaveEvents, getAdHocRoutePersons, getAdHocRouteWorkgroups, getAllowsCopy, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentHeader, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getNote, getNotes, getNoteTarget, getNoteType, getPessimisticLocks, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, populateDocumentForRouting, postProcessSave, prepareForSave, prepareForSave, processAfterRetrieve, refreshPessimisticLocks, removeNote, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setDocumentNumber, setNotes, useCustomLockDescriptors, validateBusinessRules, wrapDocumentWithMetadataForXmlSerializationbuildListOfDeletionAwareLists, getExtension, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, refreshReferenceObject, setExtension, setNewCollectionRecord, setObjectId, setVersionNumberaddPendingEntry, clearAnyGeneralLedgerPendingEntries, generateDocumentGeneralLedgerPendingEntries, generateGeneralLedgerPendingEntries, getDocumentHeader, getFinancialDocumentTypeCode, getFinancialSystemDocumentHeader, getGeneralLedgerPendingEntryAmountForDetail, getGeneralLedgerPendingEntrySourceDetails, getPostingYearprotected static org.apache.log4j.Logger LOG
protected Date reversalDate
public AuxiliaryVoucherDocument()
public boolean documentPerformsSufficientFundsCheck()
GeneralLedgerPostingDocumentBasedocumentPerformsSufficientFundsCheck in class GeneralLedgerPostingDocumentBaseGeneralLedgerPostingDocumentBase.documentPerformsSufficientFundsCheck()public Date getReversalDate()
getReversalDate in interface VoucherDocumentpublic void setReversalDate(Date reversalDate)
setReversalDate in interface VoucherDocumentreversalDate - public String getTypeCode()
public void setTypeCode(String typeCode)
typeCode - public boolean isAdjustmentType()
public boolean isRecodeType()
public boolean isAccrualType()
public org.kuali.rice.core.api.util.type.KualiDecimal getDebitTotal()
getDebitTotal in interface VoucherDocumentpublic org.kuali.rice.core.api.util.type.KualiDecimal getCreditTotal()
getCreditTotal in interface VoucherDocumentpublic org.kuali.rice.core.api.util.type.KualiDecimal getTotalDollarAmount()
getTotalDollarAmount in interface AmountTotalinggetTotalDollarAmount in class AccountingDocumentBaseAccountingDocumentBase.getTotalDollarAmount()public void toCopy() throws org.kuali.rice.kew.api.exception.WorkflowException
LedgerPostingDocumentBasetoCopy in interface org.kuali.rice.krad.document.CopyabletoCopy in class AccountingDocumentBaseorg.kuali.rice.kew.api.exception.WorkflowExceptionAccountingDocumentBase.toCopy()public void doRouteStatusChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange statusChangeEvent)
doRouteStatusChange in interface org.kuali.rice.krad.document.DocumentdoRouteStatusChange in class GeneralLedgerPostingDocumentBaseDocument#doRouteStatusChange()protected void updateReversalDate()
protected boolean refreshReversalDate()
public void toErrorCorrection() throws org.kuali.rice.kew.api.exception.WorkflowException
CorrectabletoErrorCorrection in interface CorrectabletoErrorCorrection in class AccountingDocumentBaseorg.kuali.rice.kew.api.exception.WorkflowExceptionAccountingDocumentBase.toErrorCorrection()protected void processAuxiliaryVoucherErrorCorrections()
public boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable) throws IllegalStateException
IllegalStateException)
isDebit in interface GeneralLedgerPendingEntrySourceisDebit in class AccountingDocumentBasefinancialDocument - submitted accounting documentaccounttingLine - accounting line being tested if it is a debit or notIllegalStateExceptionorg.kuali.rice.krad.rule.AccountingLineRule#isDebit(org.kuali.rice.krad.document.FinancialDocument,
org.kuali.rice.krad.bo.AccountingLine)public void customizeExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable, GeneralLedgerPendingEntry explicitEntry)
customizeExplicitGeneralLedgerPendingEntry in class AccountingDocumentBasedocument - submitted AccountingDocumentaccountingLine - represents accounting line where object type code is retrieved fromexplicitEntry - GeneralPendingLedgerEntry object that has its document type, object type, period code, and fiscal year
setFinancialDocumentRuleBase#customizeExplicitGeneralLedgerPendingEntry(FinancialDocument, AccountingLine,
GeneralLedgerPendingEntry),
org.kuali.module.financial.rules.FinancialDocumentRuleBase#processExplicitGeneralLedgerPendingEntry(org.kuali.rice.krad.document.FinancialDocument,
org.kuali.ole.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper, org.kuali.rice.krad.bo.AccountingLine,
org.kuali.module.gl.bo.GeneralLedgerPendingEntry)public boolean customizeOffsetGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)
customizeOffsetGeneralLedgerPendingEntry in class AccountingDocumentBasefinancialDocument - submitted accounting documentaccountingLine - accounting line from accounting documentexplicitEntry - represents explicit entryoffsetEntry - represents offset entryorg.kuali.module.financial.rules.FinancialDocumentRuleBase#customizeOffsetGeneralLedgerPendingEntry(org.kuali.rice.krad.document.FinancialDocument,
org.kuali.rice.krad.bo.AccountingLine, org.kuali.module.gl.bo.GeneralLedgerPendingEntry,
org.kuali.module.gl.bo.GeneralLedgerPendingEntry)protected String getObjectTypeCode(GeneralLedgerPendingEntrySourceDetail line)
line - accounting line where object type code is retrieved fromprotected String getGeneralLedgerPendingEntryOffsetObjectCode()
GeneralLedgerPendingEntrypublic boolean processOffsetGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntrySourceDetail glpeSourceDetail, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)
processOffsetGeneralLedgerPendingEntry in class AccountingDocumentBasefinancialDocument - submitted accounting documentsequenceHelper - helper class which will allows us to increment a reference without using an IntegeraccountingLineCopy - accounting line from accounting documentexplicitEntry - represents explicit entryoffsetEntry - represents offset entryorg.kuali.module.financial.rules.FinancialDocumentRuleBase#processOffsetGeneralLedgerPendingEntry(org.kuali.rice.krad.document.FinancialDocument,
org.kuali.ole.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper, org.kuali.rice.krad.bo.AccountingLine,
org.kuali.module.gl.bo.GeneralLedgerPendingEntry, org.kuali.module.gl.bo.GeneralLedgerPendingEntry)protected boolean processOffsetGeneralLedgerPendingEntryForRecodes(GeneralLedgerPendingEntrySequenceHelper sequenceHelper, AccountingLine accountingLineCopy, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)
financialDocument - submitted accounting documentsequenceHelper - helper class which will allows us to increment a reference without using an IntegeraccountingLineCopy - accounting line from accounting documentexplicitEntry - represents explicit entryoffsetEntry - represents offset entryprotected boolean processOffsetGeneralLedgerPendingEntryForAccrualsAndAdjustments(GeneralLedgerPendingEntrySequenceHelper sequenceHelper, AccountingLine accountingLineCopy, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)
financialDocument - submitted accounting documentsequenceHelper - helper class which will allows us to increment a reference without using an IntegeraccountingLineCopy - accounting line from accounting documentexplicitEntry - represents explicit entryoffsetEntry - represents offset entryprotected boolean isDocumentForMultipleAccounts()
financialDocument - submitted accounting documentprotected void processAuxiliaryVoucherRecodeDistributionOfIncomeAndExpenseGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntry explicitEntry)
financialDocument - submitted accounting documentsequenceHelper - helper class which will allows us to increment a reference without using an IntegerexplicitEntry - represents explicit entryprotected String getObjectTypeCodeForRecodeDistributionOfIncomeAndExpenseEntry(GeneralLedgerPendingEntry explicitEntry)
explicitEntry - public boolean calculateIfWithinGracePeriod(Date today, AccountingPeriod periodToCheck)
today - a date to check if it is within the periodperiodToCheck - the account period to check againstpublic int comparableDateForm(Date d)
d - the date to convertpublic Date calculateFirstDayOfMonth(Date d)
d - date to find first of month forpublic boolean isEndOfPreviousFiscalYear(AccountingPeriod acctPeriod)
acctPeriod - accounting period to checkCopyright © 2004–2014 The Kuali Foundation. All rights reserved.