| org.kuali.kfs.rules.AccountingDocumentRuleBase org.kuali.module.financial.rules.ProcurementCardDocumentRule
ProcurementCardDocumentRule | public class ProcurementCardDocumentRule extends AccountingDocumentRuleBase (Code) | | Business rule(s) applicable to Procurement Card document.
|
Method Summary | |
protected boolean | accountIsAccessible(AccountingDocument transactionalDocument, AccountingLine accountingLine) This method determines if an account associated with the given accounting line is accessible (ie. | protected void | buildTotalChangeErrorMessage(String propertyName, KualiDecimal persistedSourceLineTotal, KualiDecimal currentSourceLineTotal) This method is being overridden to avoid seeing ERROR_DOCUMENT_SINGLE_ACCOUNTING_LINE_SECTION_TOTAL_CHANGED
error message on procurement card documents. | public boolean | isAmountValid(AccountingDocument document, AccountingLine accountingLine) This method validates an amount for an accounting line given. | public boolean | isDebit(AccountingDocument transactionalDocument, AccountingLine accountingLine) On procurement card documents, positive source amounts are credits, negative source amounts are debits.
Parameters: transactionalDocument - The document the accounting line being checked is located in. Parameters: accountingLine - The accounting line being analyzed. | protected boolean | isDocumentBalanceValid(AccountingDocument transactionalDocument) Overrides FinancialDocumentRuleBase.isDocumentBalanceValid() and changes the default debit/credit comparison
to checking the target total against the total balance. | protected boolean | isTransactionBalanceValid(ProcurementCardTransactionDetail pcTransactionDetail) This method validates the balance of the transaction given. | protected boolean | processCustomAddAccountingLineBusinessRules(AccountingDocument transactionalDocument, AccountingLine accountingLine) This method performs business rule checks on the accounting line being added to the document to ensure the accounting line
is valid and appropriate for the document. | protected boolean | processCustomReviewAccountingLineBusinessRules(AccountingDocument transactionalDocument, AccountingLine accountingLine) This method performs business rule checks on the accounting line being provided to ensure the accounting line
is valid and appropriate for the document. | protected boolean | processCustomUpdateAccountingLineBusinessRules(AccountingDocument transactionalDocument, AccountingLine accountingLine, AccountingLine updatedAccountingLine) This method performs business rule checks on the accounting line being updated to the document to ensure the accounting line
is valid and appropriate for the document. | public boolean | processUpdateAccountingLineBusinessRules(AccountingDocument transactionalDocument, AccountingLine accountingLine, AccountingLine updatedAccountingLine) This method inserts modifies the errorPath due to architecture variations necessary in the procurement card document
design. | public boolean | validateAccountNumber(AccountingDocument transactionalDocument, AccountingLine accountingLine) This method validates the account number for a given accounting line by checking the object codes restrictions,
including any restrictions in parameters table. | public boolean | validateObjectCode(AccountingDocument transactionalDocument, AccountingLine accountingLine) This method validates the object code for a given accounting line by checking the object codes restrictions,
including any restrictions in parameters table. |
accountIsAccessible | protected boolean accountIsAccessible(AccountingDocument transactionalDocument, AccountingLine accountingLine)(Code) | | This method determines if an account associated with the given accounting line is accessible (ie. editable).
This method performs an additional check by looking at the status of the document passed in if the
document is 'enroute' and there is an active route node equal to RouteLevelNames.ACCOUNT_REVIEW_FULL_EDIT,
then the account is declared accessible. If the prior criteria are not met, then the method simply calls the super
method and returns the results.
Parameters: transactionalDocument - The document the accounting line is located in. Parameters: accountingLine - The accounting line which contains the account to be analyzed. True if the document is 'enroute' and will pass through the account review full edit node or if the super method returns true, false otherwise. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.accountIsAccessible(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLine) |
buildTotalChangeErrorMessage | protected void buildTotalChangeErrorMessage(String propertyName, KualiDecimal persistedSourceLineTotal, KualiDecimal currentSourceLineTotal)(Code) | | This method is being overridden to avoid seeing ERROR_DOCUMENT_SINGLE_ACCOUNTING_LINE_SECTION_TOTAL_CHANGED
error message on procurement card documents.
Parameters: propertyName - The property name the error will be linked to. Parameters: persistedSourceLineTotal - The total amount that has already been persisted to the database. Parameters: currentSourceLineTotal - The new total amount being set. |
isAmountValid | public boolean isAmountValid(AccountingDocument document, AccountingLine accountingLine)(Code) | | This method validates an amount for an accounting line given. The following checks are performed to ensure
validity:
- Checks that an amount is not zero.
Parameters: document - The document that the accounting line being validated is contained within. Parameters: accountingLine - The accountingline the amount will be retrieved from. True if the amount is not zero, false otherwise. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.isAmountValid(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLine) |
isDebit | public boolean isDebit(AccountingDocument transactionalDocument, AccountingLine accountingLine) throws IllegalStateException(Code) | | On procurement card documents, positive source amounts are credits, negative source amounts are debits.
Parameters: transactionalDocument - The document the accounting line being checked is located in. Parameters: accountingLine - The accounting line being analyzed. True if the accounting line given is a debit accounting line, false otherwise. throws: Throws - an IllegalStateException if one of the following rules are violated: the accounting line amountis zero or the accounting line is not an expense or income accounting line. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.isDebit(FinancialDocumentorg.kuali.core.bo.AccountingLine) See Also: org.kuali.kfs.rules.AccountingDocumentRuleBase.IsDebitUtils.isDebitConsideringSection(AccountingDocumentRuleBaseAccountingDocumentAccountingLine) |
isDocumentBalanceValid | protected boolean isDocumentBalanceValid(AccountingDocument transactionalDocument)(Code) | | Overrides FinancialDocumentRuleBase.isDocumentBalanceValid() and changes the default debit/credit comparison
to checking the target total against the total balance. If they don't balance, and error message is produced
that is more appropriate for procurement card documents.
Parameters: transactionalDocument - The document balance will be retrieved from. True if the document is balanced, false otherwise. |
isTransactionBalanceValid | protected boolean isTransactionBalanceValid(ProcurementCardTransactionDetail pcTransactionDetail)(Code) | | This method validates the balance of the transaction given. A procurement card transaction is in balance if
the total amount of the transaction equals the total of the target accounting lines corresponding to the transaction.
Parameters: pcTransaction - The transaction detail used to retrieve the procurement card transaction and target accounting lines used to check for in balance. True if the amounts are equal and the transaction is in balance, false otherwise. |
processCustomAddAccountingLineBusinessRules | protected boolean processCustomAddAccountingLineBusinessRules(AccountingDocument transactionalDocument, AccountingLine accountingLine)(Code) | | This method performs business rule checks on the accounting line being added to the document to ensure the accounting line
is valid and appropriate for the document. Currently, this method validates the account number and object code
associated with the new accounting line. Only target lines can be changed, so we only need to validate them.
Parameters: transactionalDocument - The document the new line is being added to. Parameters: accountingLine - The new accounting line being added. True if the business rules all pass, false otherwise. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.processCustomAddAccountingLineBusinessRules(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLine) |
processCustomReviewAccountingLineBusinessRules | protected boolean processCustomReviewAccountingLineBusinessRules(AccountingDocument transactionalDocument, AccountingLine accountingLine)(Code) | | This method performs business rule checks on the accounting line being provided to ensure the accounting line
is valid and appropriate for the document. Only target lines can be changed, so we only need to validate them.
Parameters: transactionalDocument - The document associated with the accounting line being validated. Parameters: accountingLine - The accounting line being validated. True if the business rules all pass, false otherwise. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.processCustomReviewAccountingLineBusinessRules(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLine) |
processCustomUpdateAccountingLineBusinessRules | protected boolean processCustomUpdateAccountingLineBusinessRules(AccountingDocument transactionalDocument, AccountingLine accountingLine, AccountingLine updatedAccountingLine)(Code) | | This method performs business rule checks on the accounting line being updated to the document to ensure the accounting line
is valid and appropriate for the document. Only target lines can be changed, so we only need to validate them.
Parameters: transactionalDocument - The document the accounting line being updated resides within. Parameters: accountingLine - The original accounting line. Parameters: updatedAccoutingLine - The updated version of the accounting line. True if the business rules all pass for the update, false otherwise. See Also: org.kuali.module.financial.rules.FinancialDocumentRuleBase.processCustomUpdateAccountingLineBusinessRules(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLineorg.kuali.core.bo.AccountingLine) |
processUpdateAccountingLineBusinessRules | public boolean processUpdateAccountingLineBusinessRules(AccountingDocument transactionalDocument, AccountingLine accountingLine, AccountingLine updatedAccountingLine)(Code) | | This method inserts modifies the errorPath due to architecture variations necessary in the procurement card document
design. Finally, this method calls the super method to complete the validation and business rule checks..
Parameters: transactionalDocument - The document the accounting line being updated resides within. Parameters: accountingLine - The original accounting line. Parameters: updatedAccoutingLine - The updated version of the accounting line. True if the business rules all pass for the update, false otherwise. See Also: org.kuali.core.rule.UpdateAccountingLineRule.processUpdateAccountingLineBusinessRules(org.kuali.core.document.FinancialDocumentorg.kuali.core.bo.AccountingLineorg.kuali.core.bo.AccountingLine) |
validateAccountNumber | public boolean validateAccountNumber(AccountingDocument transactionalDocument, AccountingLine accountingLine)(Code) | | This method validates the account number for a given accounting line by checking the object codes restrictions,
including any restrictions in parameters table.
Parameters: transactionalDocument - The transaction document to retrieve transactions from for validation. Parameters: accountingLine - The accounting line containing the account number to be validated. True if the account number is valid and permitted for this type of transaction, false otherwise. |
validateObjectCode | public boolean validateObjectCode(AccountingDocument transactionalDocument, AccountingLine accountingLine)(Code) | | This method validates the object code for a given accounting line by checking the object codes restrictions,
including any restrictions in parameters table. Additional validation checks include:
- Confirm object code is not null.
- Confirm object code is active.
- Confirm object code is permitted for the list of merchant category codes.
- Confirm object code sub type is permitted for the list of merchant category codes.
Parameters: transactionalDocument - The transaction document to retrieve transactions from for validation. Parameters: accountingLine - The accounting line containing the object code to be validated. True if the object code is valid and permitted for this type of transaction, false otherwise. |
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)
|
|
|