| org.kuali.kfs.rules.AccountingDocumentRuleBase org.kuali.module.financial.rules.AuxiliaryVoucherDocumentRule
Method Summary | |
public static Date | calculateFirstDayOfMonth(Date d) Given a day, this method calculates what the first day of that month was. | public static 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. | public static int | comparableDateForm(Date d) This method returns a date as an approximate count of days since the BCE epoch. | protected void | customizeExplicitGeneralLedgerPendingEntry(AccountingDocument document, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry) This method sets the appropriate document type and object type codes into the GLPEs based on the type of AV document chosen. | protected boolean | customizeOffsetGeneralLedgerPendingEntry(AccountingDocument financialDocument, AccountingLine accountingLine, 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. | protected String | getGeneralLedgerPendingEntryOffsetObjectCode() | protected String | getObjectTypeCode(AccountingLine 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. | public boolean | isAmountValid(AccountingDocument document, AccountingLine accountingLine) | public boolean | isDebit(AccountingDocument FinancialDocument, AccountingLine accountingLine) | protected boolean | isDocumentBalanceValidConsideringDebitsAndCredits(AccountingDocument finanacialDocument) Overrides the parent implementation to sum all of the debit GLPEs up and sum all of the credit GLPEs up and then compare the
totals to each other, returning true if they are equal and false if they are not. | public static boolean | isEndOfPreviousFiscalYear(AccountingPeriod acctPeriod) | public boolean | isObjectCodeAllowed(Class documentClass, AccountingLine accountingLine) Overrides the parent to return true, because Auxiliary Voucher documents aren't restricted from using any object code. | protected boolean | isPeriodAllowed(AuxiliaryVoucherDocument document) This method determines if the posting period is valid for the document type. | protected boolean | isSingleChartUsed(AccountingDocument document) Iterates
AccountingLine instances in a given
FinancialDocument instance and
compares them to see if they are all in the same Chart. | protected boolean | isSingleSubFundGroupUsed(AccountingDocument document) Iterates
AccountingLine instances in a given
FinancialDocument instance and
compares them to see if they are all in the same Sub-Fund Group. | protected boolean | isSourceAccountingLinesRequiredNumberForRoutingMet(AccountingDocument financialDocument) | protected boolean | isTargetAccountingLinesRequiredNumberForRoutingMet(AccountingDocument financialDocument) Overrides the parent to return true, because Auxiliary Voucher documents only use the SourceAccountingLines data structures.
The list that holds TargetAccountingLines should be empty. | protected boolean | isValidReversalDate(AuxiliaryVoucherDocument document) This method verifies that the user entered a reversal date, but only if it's an accrual. | public boolean | processCustomAddAccountingLineBusinessRules(AccountingDocument document, AccountingLine accountingLine) Validates added accounting line. | public boolean | processCustomReviewAccountingLineBusinessRules(AccountingDocument document, AccountingLine accountingLine) Validates reviewed accounting line. | protected boolean | processCustomRouteDocumentBusinessRules(Document document) This method performs common validation for Transactional Document routes. | protected boolean | processOffsetGeneralLedgerPendingEntry(AccountingDocument financialDocument, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, AccountingLine accountingLineCopy, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry) An Accrual Voucher only generates offsets if it is a recode (AVRC). |
calculateFirstDayOfMonth | public static Date calculateFirstDayOfMonth(Date d)(Code) | | Given a day, this method calculates what the first day of that month was.
Parameters: d - date to find first of month for date of the first day of the month |
calculateIfWithinGracePeriod | public static boolean calculateIfWithinGracePeriod(Date today, AccountingPeriod periodToCheck)(Code) | | This method checks if a given moment of time is within an accounting period, or its auxiliary voucher grace period.
Parameters: today - a date to check if it is within the period Parameters: periodToCheck - the account period to check against true if a given moment in time is within an accounting period or an auxiliary voucher grace period |
comparableDateForm | public static int comparableDateForm(Date d)(Code) | | This method returns a date as an approximate count of days since the BCE epoch.
Parameters: d - the date to convert an integer count of days, very approximate |
customizeExplicitGeneralLedgerPendingEntry | protected void customizeExplicitGeneralLedgerPendingEntry(AccountingDocument document, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry)(Code) | | This method sets the appropriate document type and object type codes into the GLPEs based on the type of AV document chosen.
Parameters: document - submitted AccountingDocument Parameters: accountingLine - represents accounting line where object type code is retrieved from Parameters: explicitEntry - GeneralPendingLedgerEntry object that has its document type, object type, period code, and fiscal yearset See Also: FinancialDocumentRuleBase.customizeExplicitGeneralLedgerPendingEntry(FinancialDocumentAccountingLineGeneralLedgerPendingEntry) See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.processExplicitGeneralLedgerPendingEntry(org.kuali.core.document.FinancialDocumentorg.kuali.core.util.GeneralLedgerPendingEntrySequenceHelperorg.kuali.core.bo.AccountingLineorg.kuali.module.gl.bo.GeneralLedgerPendingEntry) |
customizeOffsetGeneralLedgerPendingEntry | protected boolean customizeOffsetGeneralLedgerPendingEntry(AccountingDocument financialDocument, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)(Code) | | Offset entries are created for recodes (AVRC) always, so this method is one of 2 offsets that get created for an AVRC. Its
document type is set to DI. This uses the explicit entry as its model. In addition, an offset is generated for accruals
(AVAE) and adjustments (AVAD), but only if the document contains accounting lines for more than one account.
Parameters: financialDocument - submitted accounting document Parameters: accountingLine - accounting line from accounting document Parameters: explicitEntry - represents explicit entry Parameters: offsetEntry - represents offset entry See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.customizeOffsetGeneralLedgerPendingEntry(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLineorg.kuali.module.gl.bo.GeneralLedgerPendingEntryorg.kuali.module.gl.bo.GeneralLedgerPendingEntry) |
getGeneralLedgerPendingEntryOffsetObjectCode | protected String getGeneralLedgerPendingEntryOffsetObjectCode()(Code) | | Get from APC the offset object code that is used for the
GeneralLedgerPendingEntry
String returns GLPE parameter name |
getObjectTypeCode | protected String getObjectTypeCode(AccountingLine line)(Code) | | This method examines the accounting line passed in and returns the appropriate object type code. This rule converts specific
objects types from an object code on an accounting line to more general values. This is specific to the AV document.
Parameters: line - accounting line where object type code is retrieved from object type from a accounting line ((either financial object type code, financial object type not expenditure code,or financial object type income not cash code)) |
getObjectTypeCodeForRecodeDistributionOfIncomeAndExpenseEntry | protected String getObjectTypeCodeForRecodeDistributionOfIncomeAndExpenseEntry(GeneralLedgerPendingEntry explicitEntry)(Code) | | This method examines the explicit entry's object type and returns the appropriate object type code. This is specific to AV
recodes (AVRCs).
Parameters: explicitEntry - object type code from explicit entry (either financial object type code, financial object type expenditure code, orfinancial object type income cash code) |
isAmountValid | public boolean isAmountValid(AccountingDocument document, AccountingLine accountingLine)(Code) | | Accounting lines for Auxiliary Vouchers can only be positive non-zero numbers
Parameters: document - submitted AccountingDocument Parameters: accountingLine - accountingLine where amount is being validated true if amount is NOT 0 or negative See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.isAmountValid(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLine) |
isDebit | public boolean isDebit(AccountingDocument FinancialDocument, AccountingLine accountingLine) throws IllegalStateException(Code) | | 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
Parameters: financialDocument - submitted accounting document Parameters: accounttingLine - accounting line being tested if it is a debit or not See Also: org.kuali.core.rule.AccountingLineRule.isDebit(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLine) |
isDocumentBalanceValidConsideringDebitsAndCredits | protected boolean isDocumentBalanceValidConsideringDebitsAndCredits(AccountingDocument finanacialDocument)(Code) | | Overrides the parent implementation to sum all of the debit GLPEs up and sum all of the credit GLPEs up and then compare the
totals to each other, returning true if they are equal and false if they are not. The difference is that we ignore any DI
specific entries because while these are offsets, their offset indicators do not show this, so they would be counted in the
balancing and we don't want that. Added a check for simple balance between credit and debit values as entered on the
accountingLines, since that is also a requirement.
Parameters: financialDocument - submitted accounting document true if a document's accounting lines credit/debit lines are in balance and a document's non-DI credit and debitGLPEs are also in balance |
isEndOfPreviousFiscalYear | public static boolean isEndOfPreviousFiscalYear(AccountingPeriod acctPeriod)(Code) | | This method checks if the given accounting period ends on the last day of the previous fiscal year
Parameters: acctPeriod - accounting period to check true if the accounting period ends with the fiscal year, false if otherwise |
isObjectCodeAllowed | public boolean isObjectCodeAllowed(Class documentClass, AccountingLine accountingLine)(Code) | | Overrides the parent to return true, because Auxiliary Voucher documents aren't restricted from using any object code. This
is part of the "save" check that gets done. This method is called automatically by the parent's processSaveDocument method.
Parameters: documentClass - submitted document class (not used in overriden method) Parameters: accountingLine - accountingLine where object code is being checked (not used in overriden method) See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.isObjectCodeAllowed(org.kuali.core.bo.AccountingLine) |
isPeriodAllowed | protected boolean isPeriodAllowed(AuxiliaryVoucherDocument document)(Code) | | This method determines if the posting period is valid for the document type.
Parameters: document - submitted AuxiliaryVoucherDocument true if it is a valid period for posting into |
isSingleChartUsed | protected boolean isSingleChartUsed(AccountingDocument document)(Code) | | Iterates
AccountingLine instances in a given
FinancialDocument instance and
compares them to see if they are all in the same Chart.
Parameters: document - submitted document true if only one chart of accounts code is used in a document's source accounting lines |
isSingleSubFundGroupUsed | protected boolean isSingleSubFundGroupUsed(AccountingDocument document)(Code) | | Iterates
AccountingLine instances in a given
FinancialDocument instance and
compares them to see if they are all in the same Sub-Fund Group.
Parameters: document - submitted document true if only one sub fund group code is used in a document's source accounting lines |
isSourceAccountingLinesRequiredNumberForRoutingMet | protected boolean isSourceAccountingLinesRequiredNumberForRoutingMet(AccountingDocument financialDocument)(Code) | | Overrides the parent to display correct error message for a single sided document
Parameters: financialDocument - submitted accounting document See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.isSourceAccountingLinesRequiredNumberForRoutingMet(org.kuali.core.document.FinancialDocument) |
isTargetAccountingLinesRequiredNumberForRoutingMet | protected boolean isTargetAccountingLinesRequiredNumberForRoutingMet(AccountingDocument financialDocument)(Code) | | Overrides the parent to return true, because Auxiliary Voucher documents only use the SourceAccountingLines data structures.
The list that holds TargetAccountingLines should be empty. This will be checked when the document is "routed" or submitted to
post - it's called automatically by the parent's processRouteDocument method.
Parameters: financialDocument - submitted accounting document See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.isTargetAccountingLinesRequiredNumberForRoutingMet(org.kuali.core.document.FinancialDocument) |
isValidReversalDate | protected boolean isValidReversalDate(AuxiliaryVoucherDocument document)(Code) | | This method verifies that the user entered a reversal date, but only if it's an accrual.
Parameters: document - submitted document returns true if document is NOT an accrual type OR has a reversal date |
processCustomAddAccountingLineBusinessRules | public boolean processCustomAddAccountingLineBusinessRules(AccountingDocument document, AccountingLine accountingLine)(Code) | | Validates added accounting line. Override calls parent method and also checks whether or not the document and line have a
valid sub object and object level
Parameters: document - submitted accounting document Parameters: accountingLine - validated accounting line from accounting document return true if accounting line is valid See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.processCustomAddAccountingLineBusinessRules(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLine) |
processCustomReviewAccountingLineBusinessRules | public boolean processCustomReviewAccountingLineBusinessRules(AccountingDocument document, AccountingLine accountingLine)(Code) | | Validates reviewed accounting line. Override calls parent method and also checks whether or not the document and line have a
valid sub object and object level
Parameters: document - submitted accounting document Parameters: accountingLine - validated accounting line from accounting document return true if accounting line is valid See Also: FinancialDocumentRuleBase.processCustomReviewAccountingLineBusinessRules(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLine) |
processCustomRouteDocumentBusinessRules | protected boolean processCustomRouteDocumentBusinessRules(Document document)(Code) | | This method performs common validation for Transactional Document routes. Note the rule framework will handle validating all
of the accounting lines and also those checks that would normally be done on a save, automatically for us.
AuxiliaryVoucherDocument is different from other
Document instances because it
requires all
AccountingLine instances belong to the same Fund Group. That's done here by iterating
through the
AccountingLine instances.
Parameters: document - submitted document See Also: FinancialDocumentRuleBase.processCustomRouteDocumentBusinessRules(Document) |
processOffsetGeneralLedgerPendingEntry | protected boolean processOffsetGeneralLedgerPendingEntry(AccountingDocument financialDocument, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, AccountingLine accountingLineCopy, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)(Code) | | An Accrual Voucher only generates offsets if it is a recode (AVRC). So this method overrides to do nothing more than return
true if it's not a recode. If it is a recode, then it is responsible for generating two offsets with a document type of DI.
Parameters: financialDocument - submitted accounting document Parameters: sequenceHelper - helper class which will allows us to increment a reference without using an Integer Parameters: accountingLineCopy - accounting line from accounting document Parameters: explicitEntry - represents explicit entry Parameters: offsetEntry - represents offset entry true if general ledger pending entry is processed successfully for accurals, adjustments, and recodes See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.processOffsetGeneralLedgerPendingEntry(org.kuali.core.document.FinancialDocumentorg.kuali.core.util.GeneralLedgerPendingEntrySequenceHelperorg.kuali.core.bo.AccountingLineorg.kuali.module.gl.bo.GeneralLedgerPendingEntryorg.kuali.module.gl.bo.GeneralLedgerPendingEntry) |
Fields inherited from org.kuali.kfs.rules.AccountingDocumentRuleBase | protected static org.apache.log4j.Logger LOG(Code)(Java Doc)
|
Methods inherited from org.kuali.kfs.rules.AccountingDocumentRuleBase | protected boolean accountIsAccessible(AccountingDocument financialDocument, AccountingLine accountingLine)(Code)(Java Doc) protected void buildTotalChangeErrorMessage(String propertyName, KualiDecimal persistedSourceLineTotal, KualiDecimal currentSourceLineTotal)(Code)(Java Doc) protected boolean checkAccountingLineAccountAccessibility(AccountingDocument financialDocument, AccountingLine accountingLine, AccountingLineAction action)(Code)(Java Doc) protected void customizeExplicitGeneralLedgerPendingEntry(AccountingDocument accountingDocument, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry)(Code)(Java Doc) protected boolean customizeOffsetGeneralLedgerPendingEntry(AccountingDocument accountingDocument, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)(Code)(Java Doc) protected Class getAccountingLineDocumentClass(AccountingDocument financialDocument)(Code)(Java Doc) protected KualiDecimal getGeneralLedgerPendingEntryAmountForAccountingLine(AccountingLine accountingLine)(Code)(Java Doc) protected ParameterService getParameterService()(Code)(Java Doc) final protected void handleNonExistentDocumentWhenApproving(AccountingDocument accountingDocument)(Code)(Java Doc) protected boolean hasAccessibleAccountingLines(AccountingDocument financialDocument, int min)(Code)(Java Doc) protected boolean isAccountingLineTotalsUnchanged(AccountingDocument accountingDocument)(Code)(Java Doc) protected boolean isAccountingLinesRequiredNumberForRoutingMet(AccountingDocument accountingDocument)(Code)(Java Doc) public boolean isAmountValid(AccountingDocument document, AccountingLine accountingLine)(Code)(Java Doc) final public boolean isAsset(AccountingLine accountingLine)(Code)(Java Doc) final public boolean isAssetTypeCode(String objectTypeCode)(Code)(Java Doc) final public boolean isBudgetOnlyCodesSubType(String objectCode)(Code)(Java Doc) final public boolean isCashSubType(String objectCode)(Code)(Java Doc) final public boolean isCostRecoveryExpenseSubType(String objectCode)(Code)(Java Doc) public boolean isCredit(AccountingLine accountingLine, AccountingDocument financialDocument) throws IllegalStateException(Code)(Java Doc) protected boolean isDocumentBalanceValid(AccountingDocument accountingDocument)(Code)(Java Doc) protected boolean isDocumentBalanceValidConsideringDebitsAndCredits(AccountingDocument accountingDocument)(Code)(Java Doc) protected boolean isErrorCorrection(AccountingDocument accountingDocument)(Code)(Java Doc) public boolean isExpense(AccountingLine accountingLine)(Code)(Java Doc) final public boolean isExpenseOrAsset(AccountingLine line)(Code)(Java Doc) final public boolean isFringeBenefitsSubType(String objectCode)(Code)(Java Doc) final public boolean isFundBalanceCode(String objectCode)(Code)(Java Doc) final public boolean isFundBalanceSubType(String objectCode)(Code)(Java Doc) public boolean isFundGroupAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) protected boolean isFundGroupSetBalanceValid(AccountingDocument tranDoc, Class componentClass, String parameterName)(Code)(Java Doc) final public boolean isHourlyWagesSubType(String objectCode)(Code)(Java Doc) final public boolean isIncome(AccountingLine accountingLine)(Code)(Java Doc) final public boolean isIncomeOrLiability(AccountingLine line)(Code)(Java Doc) final public boolean isLiability(AccountingLine accountingLine)(Code)(Java Doc) final public boolean isLiabilityTypeCode(String objectTypeCode)(Code)(Java Doc) final public boolean isMandatoryTransfersSubType(String objectSubTypeCode)(Code)(Java Doc) final public boolean isNonMandatoryTransfersSubType(String objectSubTypeCode)(Code)(Java Doc) public boolean isObjectCodeAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) public boolean isObjectConsolidationAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) public boolean isObjectLevelAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) public boolean isObjectSubTypeAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) public boolean isObjectTypeAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) protected boolean isOptionalOneSidedDocumentAccountingLinesRequiredNumberForRoutingMet(AccountingDocument accountingDocument)(Code)(Java Doc) final public boolean isRevenue(AccountingLine line)(Code)(Java Doc) final public boolean isSalariesSubType(String objectCode)(Code)(Java Doc) protected boolean isSourceAccountingLinesRequiredNumberForRoutingMet(AccountingDocument accountingDocument)(Code)(Java Doc) public boolean isSubFundGroupAllowed(Class documentClass, AccountingLine accountingLine)(Code)(Java Doc) protected boolean isTargetAccountingLinesRequiredNumberForRoutingMet(AccountingDocument accountingDocument)(Code)(Java Doc) final public boolean isValuationsAndAdjustmentsSubType(String objectSubTypeCode)(Code)(Java Doc) protected void populateExplicitGeneralLedgerPendingEntry(AccountingDocument accountingDocument, AccountingLine accountingLine, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntry explicitEntry)(Code)(Java Doc) public boolean processAddAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine)(Code)(Java Doc) protected boolean processCustomAddAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine)(Code)(Java Doc) protected boolean processCustomApproveDocumentBusinessRules(ApproveDocumentEvent approveEvent)(Code)(Java Doc) protected boolean processCustomDeleteAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine, boolean lineWasAlreadyDeletedFromDocument)(Code)(Java Doc) protected boolean processCustomReviewAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine)(Code)(Java Doc) protected boolean processCustomRouteDocumentBusinessRules(Document document)(Code)(Java Doc) protected boolean processCustomUpdateAccountingLineBusinessRules(AccountingDocument accountingDocument, AccountingLine originalAccountingLine, AccountingLine updatedAccountingLine)(Code)(Java Doc) public boolean processDeleteAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine, boolean lineWasAlreadyDeletedFromDocument)(Code)(Java Doc) protected boolean processExplicitGeneralLedgerPendingEntry(AccountingDocument accountingDocument, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry)(Code)(Java Doc) public boolean processGenerateGeneralLedgerPendingEntries(AccountingDocument accountingDocument, AccountingLine accountingLine, GeneralLedgerPendingEntrySequenceHelper sequenceHelper)(Code)(Java Doc) protected boolean processOffsetGeneralLedgerPendingEntry(AccountingDocument accountingDocument, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)(Code)(Java Doc) public boolean processReviewAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine)(Code)(Java Doc) public boolean processUpdateAccountingLineBusinessRules(AccountingDocument financialDocument, AccountingLine accountingLine, AccountingLine updatedAccountingLine)(Code)(Java Doc) public static void putRequiredPropertyError(BusinessObjectEntry boe, String propertyName)(Code)(Java Doc) protected void reportError(String propertyName, String errorKey, String... errorParams)(Code)(Java Doc) protected AccountingDocument retrievePersistedDocument(AccountingDocument accountingDocument)(Code)(Java Doc)
|
|
|