|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.rice.kns.bo.BusinessObjectBase
org.kuali.rice.kns.bo.PersistableBusinessObjectBase
org.kuali.rice.kns.document.DocumentBase
org.kuali.rice.kns.document.TransactionalDocumentBase
org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase
org.kuali.kfs.sys.document.LedgerPostingDocumentBase
org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase
org.kuali.kfs.sys.document.AccountingDocumentBase
org.kuali.kfs.fp.document.AuxiliaryVoucherDocument
public class AuxiliaryVoucherDocument
This is the business object that represents the AuxiliaryVoucherDocument in Kuali. This is a transactional document that will eventually post transactions to the G/L. It integrates with workflow and also contains two groupings of accounting lines: Expense and target. Expense is the expense and target is the income lines.
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
LOG
|
protected Date |
reversalDate
|
protected String |
typeCode
|
Fields inherited from class org.kuali.kfs.sys.document.AccountingDocumentBase |
---|
dataDictionaryEntry, nextSourceLineNumber, nextTargetLineNumber, sourceAccountingLineClass, sourceAccountingLines, targetAccountingLineClass, targetAccountingLines |
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 | |
---|---|
AuxiliaryVoucherDocument()
Initializes the array lists and some basic info. |
Method Summary | |
---|---|
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.dto.DocumentRouteStatusChangeDTO 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.kns.util.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.kns.util.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.kns.util.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. |
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 |
---|
answerSplitNodeQuestion, 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, getAdHocRoutePersons, getAdHocRouteWorkgroups, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentBusinessObject, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getNonLockingActionTakenCodes, getPessimisticLocks, getWorkflowEngineDocumentIdsToLock, 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.GeneralLedgerPostingDocument |
---|
checkSufficientFunds, getGeneralLedgerPendingEntries, getGeneralLedgerPendingEntry, getPendingLedgerEntriesForSufficientFundsChecking, setGeneralLedgerPendingEntries |
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 |
---|
answerSplitNodeQuestion, 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, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, populateDocumentForRouting, postProcessSave, prepareForSave, prepareForSave, processAfterRetrieve, refreshPessimisticLocks, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setDocumentNumber, useCustomLockDescriptors, validateBusinessRules, wrapDocumentWithMetadataForXmlSerialization |
Methods inherited from interface org.kuali.rice.kns.bo.PersistableBusinessObject |
---|
addNote, buildListOfDeletionAwareLists, 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 |
Methods inherited from interface org.kuali.kfs.sys.document.GeneralLedgerPendingEntrySource |
---|
addPendingEntry, clearAnyGeneralLedgerPendingEntries, generateDocumentGeneralLedgerPendingEntries, generateGeneralLedgerPendingEntries, getDocumentHeader, getFinancialDocumentTypeCode, getGeneralLedgerPendingEntryAmountForDetail, getGeneralLedgerPendingEntrySourceDetails, getPostingYear |
Field Detail |
---|
protected static org.apache.log4j.Logger LOG
protected String typeCode
protected Date reversalDate
Constructor Detail |
---|
public AuxiliaryVoucherDocument()
Method Detail |
---|
public boolean documentPerformsSufficientFundsCheck()
GeneralLedgerPostingDocumentBase
documentPerformsSufficientFundsCheck
in class GeneralLedgerPostingDocumentBase
GeneralLedgerPostingDocumentBase.documentPerformsSufficientFundsCheck()
public Date getReversalDate()
getReversalDate
in interface VoucherDocument
public void setReversalDate(Date reversalDate)
setReversalDate
in interface VoucherDocument
reversalDate
- public String getTypeCode()
public void setTypeCode(String typeCode)
typeCode
- public boolean isAdjustmentType()
public boolean isRecodeType()
public boolean isAccrualType()
public org.kuali.rice.kns.util.KualiDecimal getDebitTotal()
getDebitTotal
in interface VoucherDocument
public org.kuali.rice.kns.util.KualiDecimal getCreditTotal()
getCreditTotal
in interface VoucherDocument
public org.kuali.rice.kns.util.KualiDecimal getTotalDollarAmount()
getTotalDollarAmount
in interface AmountTotaling
getTotalDollarAmount
in class AccountingDocumentBase
AccountingDocumentBase.getTotalDollarAmount()
public void toCopy() throws org.kuali.rice.kew.exception.WorkflowException
LedgerPostingDocumentBase
toCopy
in interface org.kuali.rice.kns.document.Copyable
toCopy
in class AccountingDocumentBase
org.kuali.rice.kew.exception.WorkflowException
AccountingDocumentBase.toCopy()
public void doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO statusChangeEvent)
doRouteStatusChange
in interface org.kuali.rice.kns.document.Document
doRouteStatusChange
in class GeneralLedgerPostingDocumentBase
Document#doRouteStatusChange()
protected void updateReversalDate()
protected boolean refreshReversalDate()
public void toErrorCorrection() throws org.kuali.rice.kew.exception.WorkflowException
Correctable
toErrorCorrection
in interface Correctable
toErrorCorrection
in class AccountingDocumentBase
org.kuali.rice.kew.exception.WorkflowException
AccountingDocumentBase.toErrorCorrection()
protected void processAuxiliaryVoucherErrorCorrections()
public boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable) throws IllegalStateException
IllegalStateException
)
isDebit
in interface GeneralLedgerPendingEntrySource
isDebit
in class AccountingDocumentBase
financialDocument
- submitted accounting documentaccounttingLine
- accounting line being tested if it is a debit or not
IllegalStateException
org.kuali.rice.kns.rule.AccountingLineRule#isDebit(org.kuali.rice.kns.document.FinancialDocument,
org.kuali.rice.kns.bo.AccountingLine)
public void customizeExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable, GeneralLedgerPendingEntry explicitEntry)
customizeExplicitGeneralLedgerPendingEntry
in class AccountingDocumentBase
document
- 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.kns.document.FinancialDocument,
org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper, org.kuali.rice.kns.bo.AccountingLine,
org.kuali.module.gl.bo.GeneralLedgerPendingEntry)
public boolean customizeOffsetGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)
customizeOffsetGeneralLedgerPendingEntry
in class AccountingDocumentBase
financialDocument
- submitted accounting documentaccountingLine
- accounting line from accounting documentexplicitEntry
- represents explicit entryoffsetEntry
- represents offset entryorg.kuali.module.financial.rules.FinancialDocumentRuleBase#customizeOffsetGeneralLedgerPendingEntry(org.kuali.rice.kns.document.FinancialDocument,
org.kuali.rice.kns.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 from
protected String getGeneralLedgerPendingEntryOffsetObjectCode()
GeneralLedgerPendingEntry
public boolean processOffsetGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntrySourceDetail glpeSourceDetail, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)
processOffsetGeneralLedgerPendingEntry
in class AccountingDocumentBase
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 entry
org.kuali.module.financial.rules.FinancialDocumentRuleBase#processOffsetGeneralLedgerPendingEntry(org.kuali.rice.kns.document.FinancialDocument,
org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper, org.kuali.rice.kns.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 entry
protected 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 entry
protected boolean isDocumentForMultipleAccounts()
financialDocument
- submitted accounting document
protected 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 against
public int comparableDateForm(Date d)
d
- the date to convert
public Date calculateFirstDayOfMonth(Date d)
d
- date to find first of month for
public boolean isEndOfPreviousFiscalYear(AccountingPeriod acctPeriod)
acctPeriod
- accounting period to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |