org.kuali.kfs.module.endow.batch.service.impl
Class ProcessFeeTransactionsServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.endow.batch.service.impl.ProcessFeeTransactionsServiceImpl
All Implemented Interfaces:
ProcessFeeTransactionsService

@Transactional
public class ProcessFeeTransactionsServiceImpl
extends Object
implements ProcessFeeTransactionsService

This class implements the ProcessFeeTransactionsService.


Field Summary
protected  org.kuali.rice.kns.service.KualiConfigurationService configService
           
protected  CurrentTaxLotBalanceDao currentTaxLotBalanceDao
           
protected  org.kuali.rice.kns.service.DocumentService documentService
           
protected  FeeMethodService feeMethodService
           
protected  FeeProcessingTotalsProcessedDetailTotalLine feeProcessingTotalsProcessedDetailTotalLine
           
protected  FeeProcessingTotalsProcessedGrandTotalLine feeProcessingTotalsProcessedGrandTotalLine
           
protected  FeeProcessingTotalsProcessedSubTotalLine feeProcessingTotalsProcessedSubTotalLine
           
protected  FeeProcessingWaivedAndAccruedDetailTotalLine feeProcessingWaivedAndAccruedDetailTotalLine
           
protected  FeeProcessingWaivedAndAccruedGrandTotalLine feeProcessingWaivedAndAccruedGrandTotalLine
           
protected  FeeProcessingWaivedAndAccruedSubTotalLine feeProcessingWaivedAndAccruedSubTotalLine
           
protected  BigDecimal feeToBeCharged
           
protected  HoldingHistoryDao holdingHistoryDao
           
protected  KemidFeeDao kemidFeeDao
           
protected  KemidFeeService kemidFeeService
           
protected  KEMService kemService
           
protected  org.kuali.rice.kns.service.KualiRuleService kualiRuleService
           
protected static org.apache.log4j.Logger LOG
           
protected  org.kuali.rice.kns.service.NoteService noteService
           
protected  org.kuali.rice.kim.service.PersonService personService
           
protected  EndowmentExceptionReportHeader processFeeTransactionsExceptionReportHeader
           
protected  ReportWriterService processFeeTransactionsExceptionReportsWriterService
           
protected  EndowmentExceptionReportHeader processFeeTransactionsExceptionRowReason
           
protected  EndowmentExceptionReportHeader processFeeTransactionsRowValues
           
protected  FeeProcessingTotalsProcessedReportHeader processFeeTransactionsTotalProcessedReportHeader
           
protected  ReportWriterService processFeeTransactionsTotalProcessedReportsWriterService
           
protected  FeeProcessingWaivedAndAccruedReportHeader processFeeTransactionsWaivedAndAccruedFeesReportHeader
           
protected  ReportWriterService processFeeTransactionsWaivedAndAccruedFeesReportsWriterService
           
protected  BigDecimal totalAmountCalculated
           
protected  BigDecimal totalHoldingUnits
           
protected  long totalNumberOfRecords
           
protected  BigDecimal totalProcessedIncomeAmountGrandTotal
           
protected  BigDecimal totalProcessedIncomeAmountSubTotal
           
protected  BigDecimal totalProcessedIncomeAmountSubTotalEDoc
           
protected  int totalProcessedLinesGeneratedGrandTotal
           
protected  int totalProcessedLinesGeneratedSubTotal
           
protected  BigDecimal totalProcessedPrincipalAmountGrandTotal
           
protected  BigDecimal totalProcessedPrincipalAmountSubTotal
           
protected  BigDecimal totalProcessedPrincipalAmountSubTotalEDoc
           
protected  BigDecimal transacationPrincipalAmount
           
protected  TransactionArchiveDao transactionArchiveDao
           
protected  BigDecimal transactionIncomeAmount
           
 
Constructor Summary
ProcessFeeTransactionsServiceImpl()
          Constructs a HoldingHistoryMarketValuesUpdateServiceImpl instance
 
Method Summary
protected  boolean addTransactionLineToDocument(CashDecreaseDocument cashDecreaseDocument, EndowmentSourceTransactionLine endowmentSourceTransactionLine, int lineNumber, String feeMethodCode)
          Add the new transaction line after applying the validation rules to the line.
protected  void calculateMinumumFeeAmount(FeeMethod feeMethod)
          IF the calculated fee is less than the amount in END_FEE_MTHD_T: FEE_MIN_AMT, then the feee to be charged is the minimum fee amount..
protected  boolean checkForMinimumThresholdAmount(FeeMethod feeMethod, KemidFee kemidFee)
          IF the calculated fee amount is LESS than the value in END_FEE_MTHD_T: FEE_MIN_THRSHLD, then do not charge the fee (no transaction generated.
protected  EndowmentSourceTransactionLine createEndowmentSourceTransactionLine(int lineNumber, FeeMethod feeMethod, KemidFee kemidFee, String iPIndicator, BigDecimal feeAmount)
          Creates a source transaction line
protected  CashDecreaseDocument createNewCashDecreaseDocument(String documentType)
          Gets a new document of the document type from the workflow using document service.
protected  boolean createTransactionLines(CashDecreaseDocument cashDecreaseDocument, FeeMethod feeMethod, KemidFee kemidFee, int lineNumber, int maxNumberOfTransacationLines)
          IF the END_KEMID_FEE_T: PCT_CHRG_FEE_TO_INC is equal to 100%, then generate the transaction line(s) for the eDoc
protected  boolean generateCashDecreaseDocument(FeeMethod feeMethod, int maxNumberOfTransacationLines)
          Generate a CashDecreaseDocument (ECDD) and processes the document by submitting/routing it.
protected  boolean generateWaivedAndAccruedReport()
          Generates the fee waived and fee accrued report
protected  org.kuali.rice.kns.service.KualiConfigurationService getConfigService()
          Gets the configService attribute.
protected  CurrentTaxLotBalanceDao getCurrentTaxLotBalanceDao()
          Gets the currentTaxLotBalanceDao attribute.
protected  org.kuali.rice.kns.service.DocumentService getDocumentService()
          Gets the documentService attribute value.
protected  FeeMethodService getFeeMethodService()
          Gets the feeMethodService attribute.
protected  FeeProcessingTotalsProcessedDetailTotalLine getFeeProcessingTotalsProcessedDetailTotalLine()
          Gets the feeProcessingTotalsProcessedDetailTotalLine attribute.
protected  FeeProcessingTotalsProcessedGrandTotalLine getFeeProcessingTotalsProcessedGrandTotalLine()
          Gets the feeProcessingTotalsProcessedGrandTotalLine attribute.
protected  FeeProcessingTotalsProcessedSubTotalLine getFeeProcessingTotalsProcessedSubTotalLine()
          Gets the feeProcessingTotalsProcessedSubTotalLine attribute.
protected  FeeProcessingWaivedAndAccruedDetailTotalLine getFeeProcessingWaivedAndAccruedDetailTotalLine()
          Gets the feeProcessingWaivedAndAccruedDetailTotalLine attribute.
protected  FeeProcessingWaivedAndAccruedGrandTotalLine getFeeProcessingWaivedAndAccruedGrandTotalLine()
          Gets the feeProcessingWaivedAndAccruedGrandTotalLine attribute.
protected  FeeProcessingWaivedAndAccruedSubTotalLine getFeeProcessingWaivedAndAccruedSubTotalLine()
          Gets the feeProcessingWaivedAndAccruedSubTotalLine attribute.
protected  HoldingHistoryDao getHoldingHistoryDao()
          Gets the holdingHistoryDao attribute.
protected  KemidFeeDao getKemidFeeDao()
          Gets the kemidFeeDao attribute.
protected  KemidFeeService getKemidFeeService()
          Gets the holdingHistoryService attribute.
protected  KEMService getKemService()
          Gets the kemService.
protected  org.kuali.rice.kns.service.KualiRuleService getKualiRuleService()
          Gets the kualiRuleService attribute.
protected  org.kuali.rice.kns.service.NoteService getNoteService()
          Gets the NoteService, lazily initializing if necessary
protected  org.kuali.rice.kim.service.PersonService<org.kuali.rice.kim.bo.Person> getPersonService()
           
 EndowmentExceptionReportHeader getProcessFeeTransactionsExceptionReportHeader()
          Gets the processFeeTransactionsExceptionReportHeader attribute.
protected  ReportWriterService getProcessFeeTransactionsExceptionReportsWriterService()
          Gets the processFeeTransactionsExceptionReportsWriterService attribute.
 EndowmentExceptionReportHeader getProcessFeeTransactionsExceptionRowReason()
          Gets the processFeeTransactionsExceptionRowReason attribute.
 EndowmentExceptionReportHeader getProcessFeeTransactionsRowValues()
          Gets the processFeeTransactionsRowValues attribute.
 FeeProcessingTotalsProcessedReportHeader getProcessFeeTransactionsTotalProcessedReportHeader()
          Gets the processFeeTransactionsTotalProcessedReportHeader attribute.
 ReportWriterService getProcessFeeTransactionsTotalProcessedReportsWriterService()
          Gets the processFeeTransactionsTotalProcessedReportsWriterService attribute.
 FeeProcessingWaivedAndAccruedReportHeader getProcessFeeTransactionsWaivedAndAccruedFeesReportHeader()
          Gets the processFeeTransactionsWaivedAndAccruedFeesReportHeader attribute.
 ReportWriterService getProcessFeeTransactionsWaivedAndAccruedFeesReportsWriterService()
          Gets the processFeeTransactionsWaivedAndAccruedFeesReportsWriterService attribute.
protected  TransactionArchiveDao getTransactionArchiveDao()
          Gets the transactionArchiveDao attribute.
protected  void performCalculationsAgainstTotalAmountCalculated(FeeMethod feeMethod)
          Perform the calculations against the total amount calculated for each KEMID following the process outlined in step three above and calculate the fee amount by adding together the results of the following calculations: 1.
protected  void performCalculationsForKemId(FeeMethod feeMethod)
          Performs the calculations to get the fee amount to be charged against the selected kemids
protected  void performFeeRateDefintionForCountCalculations(FeeMethod feeMethod)
          performs calculations when Fee Rate Definition Code is C
protected  void performFeeRateDefintionForValueCalculations(FeeMethod feeMethod)
          performs calculations when Fee Rate Definition Code is V
protected  void processBalanceFeeType(FeeMethod feeMethod)
          IF fee rate code is equal to C (Count), then process will examine the number of units held and If fee balance type code is equal to AU (Average Units) the process will total the holding units where month end date is greater than last process date divided by number of records selected.
protected  boolean processFeeAccrual(FeeMethod feeMethod, KemidFee kemidFee)
          IF the field ACR_FEE is equal to Y (Yes), then add the calculated fee amount to the value in END_KEMID_FEE_MTHD_T: ACRD_FEE_TO_DT.
 boolean processFeeTransactions()
          The fee process is intended to provide as much flexibility to the institution as possible when designing the charges to be assessed against a KEMID.
protected  boolean processFeeWaiver(FeeMethod feeMethod, KemidFee kemidFee)
          IF the field WAIVE_FEE is equal to Y (Yes), then add the calculated fee amount to the value in END_KEMID_FEE_MTHD_T: WAIVED_FEE_TO_DT and add the calculated fee amount to the value in END_KEMID_FEE_MTHD_T: WAIVED_FEE_YDT
protected  void processTransactionArchivesCountForTransactionsFeeType(FeeMethod feeMethod)
          IF the END_FEE_MTHD_T: FEE_TYP_CD is equal to T (Transactions), then the fee will use the transaction records from END_TRAN_ARCHV_T to calculate the fee.
protected  boolean processUpdateFeeTransactions()
          Processes update Fee Transactions
protected  boolean routeCashDecreaseDocument(CashDecreaseDocument cashDecreaseDocument, String feeMethodCode)
          Routes the document
 void setConfigService(org.kuali.rice.kns.service.KualiConfigurationService configService)
          Sets the configService.
 void setCurrentTaxLotBalanceDao(CurrentTaxLotBalanceDao currentTaxLotBalanceDao)
          Sets the currentTaxLotBalanceDao attribute value.
protected  void setDocumentOverviewAndDetails(CashDecreaseDocument cashDecreaseDocument, String documentDescription)
          Sets document description, source type code to A (automated), and subtype code to C (cash)
 void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
          Sets the documentService attribute value.
protected  void setExceptionReportTableRowReason(String reasonForException)
          sets the exception message with the passed in value.
 void setFeeMethodService(FeeMethodService feeMethodService)
          Sets the feeMethodService attribute value.
 void setFeeProcessingTotalsProcessedDetailTotalLine(FeeProcessingTotalsProcessedDetailTotalLine feeProcessingTotalsProcessedDetailTotalLine)
          Sets the feeProcessingTotalsProcessedDetailTotalLine attribute value.
 void setFeeProcessingTotalsProcessedGrandTotalLine(FeeProcessingTotalsProcessedGrandTotalLine feeProcessingTotalsProcessedGrandTotalLine)
          Sets the feeProcessingTotalsProcessedGrandTotalLine attribute value.
 void setFeeProcessingTotalsProcessedSubTotalLine(FeeProcessingTotalsProcessedSubTotalLine feeProcessingTotalsProcessedSubTotalLine)
          Sets the feeProcessingTotalsProcessedSubTotalLine attribute value.
 void setFeeProcessingWaivedAndAccruedDetailTotalLine(FeeProcessingWaivedAndAccruedDetailTotalLine feeProcessingWaivedAndAccruedDetailTotalLine)
          Sets the feeProcessingWaivedAndAccruedDetailTotalLine attribute value.
 void setFeeProcessingWaivedAndAccruedGrandTotalLine(FeeProcessingWaivedAndAccruedGrandTotalLine feeProcessingWaivedAndAccruedGrandTotalLine)
          Sets the feeProcessingWaivedAndAccruedGrandTotalLine attribute value.
 void setFeeProcessingWaivedAndAccruedSubTotalLine(FeeProcessingWaivedAndAccruedSubTotalLine feeProcessingWaivedAndAccruedSubTotalLine)
          Sets the feeProcessingWaivedAndAccruedSubTotalLine attribute value.
 void setHoldingHistoryDao(HoldingHistoryDao holdingHistoryDao)
          Sets the holdingHistoryDao attribute value.
 void setKemidFeeDao(KemidFeeDao kemidFeeDao)
          Sets the kemidFeeDao attribute value.
 void setKemidFeeService(KemidFeeService kemidFeeService)
          Sets the kKemidFeeService attribute value.
 void setKemService(KEMService kemService)
          Sets the kemService.
 void setKualiRuleService(org.kuali.rice.kns.service.KualiRuleService kualiRuleService)
          Sets the kualiRuleService attribute value.
 void setNoteService(org.kuali.rice.kns.service.NoteService noteService)
          Sets the noteService attribute value.
 void setProcessFeeTransactionsExceptionReportHeader(EndowmentExceptionReportHeader processFeeTransactionsExceptionReportHeader)
          Sets the processFeeTransactionsExceptionReportHeader attribute value.
 void setProcessFeeTransactionsExceptionReportsWriterService(ReportWriterService processFeeTransactionsExceptionReportsWriterService)
          Sets the processFeeTransactionsExceptionReportsWriterService attribute value.
 void setProcessFeeTransactionsExceptionRowReason(EndowmentExceptionReportHeader processFeeTransactionsExceptionRowReason)
          Sets the processFeeTransactionsExceptionRowReason attribute value.
 void setProcessFeeTransactionsRowValues(EndowmentExceptionReportHeader processFeeTransactionsRowValues)
          Sets the processFeeTransactionsRowValues attribute value.
 void setProcessFeeTransactionsTotalProcessedReportHeader(FeeProcessingTotalsProcessedReportHeader processFeeTransactionsTotalProcessedReportHeader)
          Sets the processFeeTransactionsTotalProcessedReportHeader attribute value.
 void setProcessFeeTransactionsTotalProcessedReportsWriterService(ReportWriterService processFeeTransactionsTotalProcessedReportsWriterService)
          Sets the processFeeTransactionsTotalProcessedReportsWriterService attribute value.
 void setProcessFeeTransactionsWaivedAndAccruedFeesReportHeader(FeeProcessingWaivedAndAccruedReportHeader processFeeTransactionsWaivedAndAccruedFeesReportHeader)
          Sets the processFeeTransactionsWaivedAndAccruedFeesReportHeader attribute value.
 void setProcessFeeTransactionsWaivedAndAccruedFeesReportsWriterService(ReportWriterService processFeeTransactionsWaivedAndAccruedFeesReportsWriterService)
          Sets the processFeeTransactionsWaivedAndAccruedFeesReportsWriterService attribute value.
 void setTransactionArchiveDao(TransactionArchiveDao transactionArchiveDao)
          Sets the transactionArchiveDao attribute value.
protected  boolean submitCashDecreaseDocument(CashDecreaseDocument cashDecreaseDocument, String feeMethodCode)
          submits the document.
protected  boolean submitDocumentForApprovalProcess(CashDecreaseDocument cashDecreaseDocument, FeeMethod feeMethod)
          After the last transaction line allowed in the eDoc (based on the institutional parameter) or the last KEMID fee calculated for the fee method, IF the END_FEE_MTHD_T: FEE_POST_PEND_IND is equal to Y submit the document as a blanket approved 'No Route' document.
protected  boolean updateKemidFeeWaivedYearToDateAmount()
          Updates waived fee year to date column to zero in WAIVED_FEE_YTD
protected  void writeExceptionReportLine(String feeMethodCode, String kemid, String reason)
          Writes the exception report line after setting fee method code and kemid and the reason
protected  void writeReportHeaders()
          Writes the reports headers for totals processed, waived and accrued fee, and exceptions reports.
protected  void writeTableRowAndTableReason(String reasonMessage)
          writes out the table row values then writes the reason row and inserts a blank line
protected  void writeTotalsProcessedDetailTotalsLine(String documentNumber, String feeMethodCode, int totalLinesGenerated)
           
protected  void writeTotalsProcessedGrandTotalsLine()
           
protected  void writeTotalsProcessedSubTotalsLine(String feeMethodCode)
           
protected  void wrtieExceptionMessagaeFromGlobalVariables(String feeMethodCode, String kemid)
          extracts the error messages in the global variables for this session id and writes as exception report
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static org.apache.log4j.Logger LOG

kemidFeeService

protected KemidFeeService kemidFeeService

feeMethodService

protected FeeMethodService feeMethodService

kemService

protected KEMService kemService

transactionArchiveDao

protected TransactionArchiveDao transactionArchiveDao

holdingHistoryDao

protected HoldingHistoryDao holdingHistoryDao

currentTaxLotBalanceDao

protected CurrentTaxLotBalanceDao currentTaxLotBalanceDao

kemidFeeDao

protected KemidFeeDao kemidFeeDao

documentService

protected org.kuali.rice.kns.service.DocumentService documentService

kualiRuleService

protected org.kuali.rice.kns.service.KualiRuleService kualiRuleService

noteService

protected org.kuali.rice.kns.service.NoteService noteService

personService

protected org.kuali.rice.kim.service.PersonService personService

configService

protected org.kuali.rice.kns.service.KualiConfigurationService configService

processFeeTransactionsExceptionReportsWriterService

protected ReportWriterService processFeeTransactionsExceptionReportsWriterService

processFeeTransactionsTotalProcessedReportsWriterService

protected ReportWriterService processFeeTransactionsTotalProcessedReportsWriterService

processFeeTransactionsWaivedAndAccruedFeesReportsWriterService

protected ReportWriterService processFeeTransactionsWaivedAndAccruedFeesReportsWriterService

processFeeTransactionsExceptionReportHeader

protected EndowmentExceptionReportHeader processFeeTransactionsExceptionReportHeader

processFeeTransactionsTotalProcessedReportHeader

protected FeeProcessingTotalsProcessedReportHeader processFeeTransactionsTotalProcessedReportHeader

processFeeTransactionsWaivedAndAccruedFeesReportHeader

protected FeeProcessingWaivedAndAccruedReportHeader processFeeTransactionsWaivedAndAccruedFeesReportHeader

processFeeTransactionsRowValues

protected EndowmentExceptionReportHeader processFeeTransactionsRowValues

processFeeTransactionsExceptionRowReason

protected EndowmentExceptionReportHeader processFeeTransactionsExceptionRowReason

feeProcessingWaivedAndAccruedDetailTotalLine

protected FeeProcessingWaivedAndAccruedDetailTotalLine feeProcessingWaivedAndAccruedDetailTotalLine

feeProcessingWaivedAndAccruedSubTotalLine

protected FeeProcessingWaivedAndAccruedSubTotalLine feeProcessingWaivedAndAccruedSubTotalLine

feeProcessingWaivedAndAccruedGrandTotalLine

protected FeeProcessingWaivedAndAccruedGrandTotalLine feeProcessingWaivedAndAccruedGrandTotalLine

feeProcessingTotalsProcessedDetailTotalLine

protected FeeProcessingTotalsProcessedDetailTotalLine feeProcessingTotalsProcessedDetailTotalLine

feeProcessingTotalsProcessedSubTotalLine

protected FeeProcessingTotalsProcessedSubTotalLine feeProcessingTotalsProcessedSubTotalLine

feeProcessingTotalsProcessedGrandTotalLine

protected FeeProcessingTotalsProcessedGrandTotalLine feeProcessingTotalsProcessedGrandTotalLine

totalNumberOfRecords

protected long totalNumberOfRecords

totalAmountCalculated

protected BigDecimal totalAmountCalculated

feeToBeCharged

protected BigDecimal feeToBeCharged

transactionIncomeAmount

protected BigDecimal transactionIncomeAmount

transacationPrincipalAmount

protected BigDecimal transacationPrincipalAmount

totalHoldingUnits

protected BigDecimal totalHoldingUnits

totalProcessedLinesGeneratedSubTotal

protected int totalProcessedLinesGeneratedSubTotal

totalProcessedLinesGeneratedGrandTotal

protected int totalProcessedLinesGeneratedGrandTotal

totalProcessedIncomeAmountSubTotalEDoc

protected BigDecimal totalProcessedIncomeAmountSubTotalEDoc

totalProcessedPrincipalAmountSubTotalEDoc

protected BigDecimal totalProcessedPrincipalAmountSubTotalEDoc

totalProcessedIncomeAmountSubTotal

protected BigDecimal totalProcessedIncomeAmountSubTotal

totalProcessedPrincipalAmountSubTotal

protected BigDecimal totalProcessedPrincipalAmountSubTotal

totalProcessedIncomeAmountGrandTotal

protected BigDecimal totalProcessedIncomeAmountGrandTotal

totalProcessedPrincipalAmountGrandTotal

protected BigDecimal totalProcessedPrincipalAmountGrandTotal
Constructor Detail

ProcessFeeTransactionsServiceImpl

public ProcessFeeTransactionsServiceImpl()
Constructs a HoldingHistoryMarketValuesUpdateServiceImpl instance

Method Detail

processFeeTransactions

public boolean processFeeTransactions()
The fee process is intended to provide as much flexibility to the institution as possible when designing the charges to be assessed against a KEMID. The fees can be based on either balances or activity and can be charged, accrued or waived at the KEMID level.

Specified by:
processFeeTransactions in interface ProcessFeeTransactionsService
See Also:
return boolean true if successful else false

updateKemidFeeWaivedYearToDateAmount

protected boolean updateKemidFeeWaivedYearToDateAmount()
Updates waived fee year to date column to zero in WAIVED_FEE_YTD

Returns:
true if updated successfully else return false

writeReportHeaders

protected void writeReportHeaders()
Writes the reports headers for totals processed, waived and accrued fee, and exceptions reports.


processUpdateFeeTransactions

protected boolean processUpdateFeeTransactions()
Processes update Fee Transactions


generateWaivedAndAccruedReport

protected boolean generateWaivedAndAccruedReport()
Generates the fee waived and fee accrued report


processTransactionArchivesCountForTransactionsFeeType

protected void processTransactionArchivesCountForTransactionsFeeType(FeeMethod feeMethod)
IF the END_FEE_MTHD_T: FEE_TYP_CD is equal to T (Transactions), then the fee will use the transaction records from END_TRAN_ARCHV_T to calculate the fee. IF the END_FEE_MTHD_T: FEE_RT_DEF_CD is equal to C (Count), then the process will total the number of the records that fit the selection criteria (6.2.2.1) where the END_TRAN_ARCHV_T:TRAN_PSTD_DT is greater than the END_KEMID_FEE_TFEE_MTHD_T: FEE_LST_PROC_DT. IF the END_FEE_MTHD_T: FEE_RT_DEF_CD is equal to V (Value), then the process will total the TRAN_INC_CSH_AMT, and/or TRAN_PRIN_CSH_AMT of the records that fit the selection criteria (6.2.2.1) where the END_TRAN_ARCHV_T: TRAN_PSTD_DT is greater than the END_KEMID_FEE_TFEE_MTHD_T: FEE_LST_PROC_DT.


processBalanceFeeType

protected void processBalanceFeeType(FeeMethod feeMethod)
IF fee rate code is equal to C (Count), then process will examine the number of units held and If fee balance type code is equal to AU (Average Units) the process will total the holding units where month end date is greater than last process date divided by number of records selected. If fee balance type code is equal to MU (Month End Units) the process will total holding units for all records where the END_ME_DT_T: ME_DT is the most recent date. If the fee balance type code is equal to CU (Current Units) the process will total the holding units IF rate def code is equal to V (Value), then the process will examine the Market Value of the records. If fee balance type code is equal to AMV (Average Market Value) the process will total holding market value where month end date is greater last process date and divide the result by the number of records selected. If fee balance type code is equal to MMV (Month End market Value) the process will total holding market value for all records where month end date is the most recent date. If fee balance type code is equal to CMV (Current Market Value) the process will total holding market value for all selected records.


performFeeRateDefintionForCountCalculations

protected void performFeeRateDefintionForCountCalculations(FeeMethod feeMethod)
performs calculations when Fee Rate Definition Code is C


performFeeRateDefintionForValueCalculations

protected void performFeeRateDefintionForValueCalculations(FeeMethod feeMethod)
performs calculations when Fee Rate Definition Code is V


performCalculationsForKemId

protected void performCalculationsForKemId(FeeMethod feeMethod)
Performs the calculations to get the fee amount to be charged against the selected kemids

Parameters:
feeMethod -

performCalculationsAgainstTotalAmountCalculated

protected void performCalculationsAgainstTotalAmountCalculated(FeeMethod feeMethod)
Perform the calculations against the total amount calculated for each KEMID following the process outlined in step three above and calculate the fee amount by adding together the results of the following calculations: 1. Multiply the value of the total amount calculated that is less than or equal to the END_KEMID_FEE_TFEE_MTHD_T: FEE_BRK_1 by END_KEMID_FEE_TFEE_MTHD_T: FEE_RT_1 2. Multiply the value of the total amount calculated that is greater than the END_KEMID_FEE_TFEE_MTHD_T: FEE_BRK_1 and less than or equal to the END_KEMID_FEE_TFEE_MTHD_T: FEE_BRK_2 by END_KEMID_FEE_TFEE_MTHD_T: FEE_RT_2 3. Multiply the value of the total amount calculated that is greater than the END_KEMID_FEE_TFEE_MTHD_T: FEE_BRK_2 by END_KEMID_FEE_TFEE_MTHD_T: FEE_RT_3.

Parameters:
feeMethod -

calculateMinumumFeeAmount

protected void calculateMinumumFeeAmount(FeeMethod feeMethod)
IF the calculated fee is less than the amount in END_FEE_MTHD_T: FEE_MIN_AMT, then the feee to be charged is the minimum fee amount..

Parameters:
feeMethod -

checkForMinimumThresholdAmount

protected boolean checkForMinimumThresholdAmount(FeeMethod feeMethod,
                                                 KemidFee kemidFee)
IF the calculated fee amount is LESS than the value in END_FEE_MTHD_T: FEE_MIN_THRSHLD, then do not charge the fee (no transaction generated. The information should be reported as an exception on the exception report.

Parameters:
feeMethod -
kemidFee -
Returns:
true calculated fee amount is greater than 0

processFeeAccrual

protected boolean processFeeAccrual(FeeMethod feeMethod,
                                    KemidFee kemidFee)
IF the field ACR_FEE is equal to Y (Yes), then add the calculated fee amount to the value in END_KEMID_FEE_MTHD_T: ACRD_FEE_TO_DT.

Parameters:
feeMethod, - kemidFee
Returns:
feeAcrrued true if fee amount is added to total accrued fees else return false

processFeeWaiver

protected boolean processFeeWaiver(FeeMethod feeMethod,
                                   KemidFee kemidFee)
IF the field WAIVE_FEE is equal to Y (Yes), then add the calculated fee amount to the value in END_KEMID_FEE_MTHD_T: WAIVED_FEE_TO_DT and add the calculated fee amount to the value in END_KEMID_FEE_MTHD_T: WAIVED_FEE_YDT

Parameters:
feeMethod, - kemidFee
Returns:
feeWaived - true if fee amount is added to total waived fees else return false

generateCashDecreaseDocument

protected boolean generateCashDecreaseDocument(FeeMethod feeMethod,
                                               int maxNumberOfTransacationLines)
Generate a CashDecreaseDocument (ECDD) and processes the document by submitting/routing it.

Parameters:
feeMethod, - kemidFee

writeTotalsProcessedDetailTotalsLine

protected void writeTotalsProcessedDetailTotalsLine(String documentNumber,
                                                    String feeMethodCode,
                                                    int totalLinesGenerated)

writeTotalsProcessedSubTotalsLine

protected void writeTotalsProcessedSubTotalsLine(String feeMethodCode)

writeTotalsProcessedGrandTotalsLine

protected void writeTotalsProcessedGrandTotalsLine()

setDocumentOverviewAndDetails

protected void setDocumentOverviewAndDetails(CashDecreaseDocument cashDecreaseDocument,
                                             String documentDescription)
Sets document description, source type code to A (automated), and subtype code to C (cash)

Parameters:
cashDecreaseDocument - newly generated document.
documentDescription - fee method description to be used as document description

submitDocumentForApprovalProcess

protected boolean submitDocumentForApprovalProcess(CashDecreaseDocument cashDecreaseDocument,
                                                   FeeMethod feeMethod)
After the last transaction line allowed in the eDoc (based on the institutional parameter) or the last KEMID fee calculated for the fee method, IF the END_FEE_MTHD_T: FEE_POST_PEND_IND is equal to Y submit the document as a blanket approved 'No Route' document. Otherwise, submit the document for routing and approval.

Parameters:
cashDecreaseDocument -
feeMethod -
Returns:
true if successful in submitting or routing the document.

createNewCashDecreaseDocument

protected CashDecreaseDocument createNewCashDecreaseDocument(String documentType)
Gets a new document of the document type from the workflow using document service.

Parameters:
documentType -
Returns:
newCashDecreaseDocument if successfully created a new document else return null

createTransactionLines

protected boolean createTransactionLines(CashDecreaseDocument cashDecreaseDocument,
                                         FeeMethod feeMethod,
                                         KemidFee kemidFee,
                                         int lineNumber,
                                         int maxNumberOfTransacationLines)
IF the END_KEMID_FEE_T: PCT_CHRG_FEE_TO_INC is equal to 100%, then generate the transaction line(s) for the eDoc

Parameters:
cashDecreaseDocument -
feeMethod -
kemidFee -
lineNumber - current transaction line number
maxNumberOfTransacationLines - The system parameter specifying the max number of lines
Returns:
true if transaction lines created.

addTransactionLineToDocument

protected boolean addTransactionLineToDocument(CashDecreaseDocument cashDecreaseDocument,
                                               EndowmentSourceTransactionLine endowmentSourceTransactionLine,
                                               int lineNumber,
                                               String feeMethodCode)
Add the new transaction line after applying the validation rules to the line.

Parameters:
cashDecreaseDocument -
endowmentSourceTransactionLine -
lineNumber -
Returns:
true if the line passed the business rules and added successfully else false.

wrtieExceptionMessagaeFromGlobalVariables

protected void wrtieExceptionMessagaeFromGlobalVariables(String feeMethodCode,
                                                         String kemid)
extracts the error messages in the global variables for this session id and writes as exception report


createEndowmentSourceTransactionLine

protected EndowmentSourceTransactionLine createEndowmentSourceTransactionLine(int lineNumber,
                                                                              FeeMethod feeMethod,
                                                                              KemidFee kemidFee,
                                                                              String iPIndicator,
                                                                              BigDecimal feeAmount)
Creates a source transaction line

Parameters:
lineNumber - the current transaction line number
feeMethod -
kemidFee -
iPIndicator - Income or principal indicator for this line
feeAmount - the calculate fee amount for the transaction amount field
Returns:
endowmentSourceTransactionLine the new source transaction line

submitCashDecreaseDocument

protected boolean submitCashDecreaseDocument(CashDecreaseDocument cashDecreaseDocument,
                                             String feeMethodCode)
submits the document. It sets the no route indicator to true and creates a note and sets its text and adds the note to the document. The document is saved and put into workflow

Parameters:
cashDecreaseDocument -
Returns:
true if document submitted else false

routeCashDecreaseDocument

protected boolean routeCashDecreaseDocument(CashDecreaseDocument cashDecreaseDocument,
                                            String feeMethodCode)
Routes the document

Parameters:
cashDecreaseDocument -
Returns:
true if successful else return false

writeExceptionReportLine

protected void writeExceptionReportLine(String feeMethodCode,
                                        String kemid,
                                        String reason)
Writes the exception report line after setting fee method code and kemid and the reason

Parameters:
feeMethodCode -
kemid -
reason - the reason written on the reason line.

writeTableRowAndTableReason

protected void writeTableRowAndTableReason(String reasonMessage)
writes out the table row values then writes the reason row and inserts a blank line

Parameters:
reasonMessage - the reason message

setExceptionReportTableRowReason

protected void setExceptionReportTableRowReason(String reasonForException)
sets the exception message with the passed in value.

Parameters:
reasonForException - The reason that will be set in the exception report

getProcessFeeTransactionsExceptionReportsWriterService

protected ReportWriterService getProcessFeeTransactionsExceptionReportsWriterService()
Gets the processFeeTransactionsExceptionReportsWriterService attribute.

Returns:
Returns the processFeeTransactionsExceptionReportsWriterService.

setProcessFeeTransactionsExceptionReportsWriterService

public void setProcessFeeTransactionsExceptionReportsWriterService(ReportWriterService processFeeTransactionsExceptionReportsWriterService)
Sets the processFeeTransactionsExceptionReportsWriterService attribute value.

Parameters:
processFeeTransactionsExceptionReportsWriterService - The processFeeTransactionsExceptionReportsWriterService to set.

getProcessFeeTransactionsTotalProcessedReportsWriterService

public ReportWriterService getProcessFeeTransactionsTotalProcessedReportsWriterService()
Gets the processFeeTransactionsTotalProcessedReportsWriterService attribute.

Returns:
Returns the processFeeTransactionsTotalProcessedReportsWriterService.

setProcessFeeTransactionsTotalProcessedReportsWriterService

public void setProcessFeeTransactionsTotalProcessedReportsWriterService(ReportWriterService processFeeTransactionsTotalProcessedReportsWriterService)
Sets the processFeeTransactionsTotalProcessedReportsWriterService attribute value.

Parameters:
processFeeTransactionsTotalProcessedReportsWriterService - The processFeeTransactionsTotalProcessedReportsWriterService to set.

getProcessFeeTransactionsWaivedAndAccruedFeesReportsWriterService

public ReportWriterService getProcessFeeTransactionsWaivedAndAccruedFeesReportsWriterService()
Gets the processFeeTransactionsWaivedAndAccruedFeesReportsWriterService attribute.

Returns:
Returns the processFeeTransactionsWaivedAndAccruedFeesReportsWriterService.

setProcessFeeTransactionsWaivedAndAccruedFeesReportsWriterService

public void setProcessFeeTransactionsWaivedAndAccruedFeesReportsWriterService(ReportWriterService processFeeTransactionsWaivedAndAccruedFeesReportsWriterService)
Sets the processFeeTransactionsWaivedAndAccruedFeesReportsWriterService attribute value.

Parameters:
processFeeTransactionsWaivedAndAccruedFeesReportsWriterService - The processFeeTransactionsWaivedAndAccruedFeesReportsWriterService to set.

getKemidFeeService

protected KemidFeeService getKemidFeeService()
Gets the holdingHistoryService attribute.

Returns:
Returns the holdingHistoryService.

setKemidFeeService

public void setKemidFeeService(KemidFeeService kemidFeeService)
Sets the kKemidFeeService attribute value.

Parameters:
kemidFeeService - The kemidFeeService to set.

getFeeMethodService

protected FeeMethodService getFeeMethodService()
Gets the feeMethodService attribute.

Returns:
Returns the feeMethodService.

setFeeMethodService

public void setFeeMethodService(FeeMethodService feeMethodService)
Sets the feeMethodService attribute value.

Parameters:
feeMethodService - The feeMethodService to set.

getKemService

protected KEMService getKemService()
Gets the kemService.

Returns:
kemService

setKemService

public void setKemService(KEMService kemService)
Sets the kemService.

Parameters:
kemService -

getProcessFeeTransactionsExceptionReportHeader

public EndowmentExceptionReportHeader getProcessFeeTransactionsExceptionReportHeader()
Gets the processFeeTransactionsExceptionReportHeader attribute.

Returns:
Returns the processFeeTransactionsExceptionReportHeader.

setProcessFeeTransactionsExceptionReportHeader

public void setProcessFeeTransactionsExceptionReportHeader(EndowmentExceptionReportHeader processFeeTransactionsExceptionReportHeader)
Sets the processFeeTransactionsExceptionReportHeader attribute value.

Parameters:
processFeeTransactionsExceptionReportHeader - The processFeeTransactionsExceptionReportHeader to set.

getProcessFeeTransactionsTotalProcessedReportHeader

public FeeProcessingTotalsProcessedReportHeader getProcessFeeTransactionsTotalProcessedReportHeader()
Gets the processFeeTransactionsTotalProcessedReportHeader attribute.

Returns:
Returns the processFeeTransactionsTotalProcessedReportHeader.

setProcessFeeTransactionsTotalProcessedReportHeader

public void setProcessFeeTransactionsTotalProcessedReportHeader(FeeProcessingTotalsProcessedReportHeader processFeeTransactionsTotalProcessedReportHeader)
Sets the processFeeTransactionsTotalProcessedReportHeader attribute value.

Parameters:
processFeeTransactionsTotalProcessedReportHeader - The processFeeTransactionsTotalProcessedReportHeader to set.

getProcessFeeTransactionsWaivedAndAccruedFeesReportHeader

public FeeProcessingWaivedAndAccruedReportHeader getProcessFeeTransactionsWaivedAndAccruedFeesReportHeader()
Gets the processFeeTransactionsWaivedAndAccruedFeesReportHeader attribute.

Returns:
Returns the processFeeTransactionsWaivedAndAccruedFeesReportHeader.

setProcessFeeTransactionsWaivedAndAccruedFeesReportHeader

public void setProcessFeeTransactionsWaivedAndAccruedFeesReportHeader(FeeProcessingWaivedAndAccruedReportHeader processFeeTransactionsWaivedAndAccruedFeesReportHeader)
Sets the processFeeTransactionsWaivedAndAccruedFeesReportHeader attribute value.

Parameters:
processFeeTransactionsWaivedAndAccruedFeesReportHeader - The processFeeTransactionsWaivedAndAccruedFeesReportHeader to set.

getProcessFeeTransactionsRowValues

public EndowmentExceptionReportHeader getProcessFeeTransactionsRowValues()
Gets the processFeeTransactionsRowValues attribute.

Returns:
Returns the processFeeTransactionsRowValues.

setProcessFeeTransactionsRowValues

public void setProcessFeeTransactionsRowValues(EndowmentExceptionReportHeader processFeeTransactionsRowValues)
Sets the processFeeTransactionsRowValues attribute value.

Parameters:
processFeeTransactionsRowValues - The processFeeTransactionsRowValues to set.

getProcessFeeTransactionsExceptionRowReason

public EndowmentExceptionReportHeader getProcessFeeTransactionsExceptionRowReason()
Gets the processFeeTransactionsExceptionRowReason attribute.

Returns:
Returns the processFeeTransactionsExceptionRowReason.

setProcessFeeTransactionsExceptionRowReason

public void setProcessFeeTransactionsExceptionRowReason(EndowmentExceptionReportHeader processFeeTransactionsExceptionRowReason)
Sets the processFeeTransactionsExceptionRowReason attribute value.

Parameters:
processFeeTransactionsExceptionRowReason - The processFeeTransactionsExceptionRowReason to set.

getTransactionArchiveDao

protected TransactionArchiveDao getTransactionArchiveDao()
Gets the transactionArchiveDao attribute.

Returns:
Returns the transactionArchiveDao.

setTransactionArchiveDao

public void setTransactionArchiveDao(TransactionArchiveDao transactionArchiveDao)
Sets the transactionArchiveDao attribute value.

Parameters:
transactionArchiveDao - The transactionArchiveDao to set.

getHoldingHistoryDao

protected HoldingHistoryDao getHoldingHistoryDao()
Gets the holdingHistoryDao attribute.

Returns:
Returns the holdingHistoryDao.

setHoldingHistoryDao

public void setHoldingHistoryDao(HoldingHistoryDao holdingHistoryDao)
Sets the holdingHistoryDao attribute value.

Parameters:
holdingHistoryDao - The holdingHistoryDao to set.

getCurrentTaxLotBalanceDao

protected CurrentTaxLotBalanceDao getCurrentTaxLotBalanceDao()
Gets the currentTaxLotBalanceDao attribute.

Returns:
Returns the currentTaxLotBalanceDao.

setCurrentTaxLotBalanceDao

public void setCurrentTaxLotBalanceDao(CurrentTaxLotBalanceDao currentTaxLotBalanceDao)
Sets the currentTaxLotBalanceDao attribute value.

Parameters:
currentTaxLotBalanceDao - The currentTaxLotBalanceDao to set.

getKemidFeeDao

protected KemidFeeDao getKemidFeeDao()
Gets the kemidFeeDao attribute.

Returns:
Returns the kemidFeeDao.

setKemidFeeDao

public void setKemidFeeDao(KemidFeeDao kemidFeeDao)
Sets the kemidFeeDao attribute value.

Parameters:
kemidFeeDao - The kemidFeeDao to set.

setDocumentService

public void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
Sets the documentService attribute value.

Parameters:
documentService - The documentService to set.

getDocumentService

protected org.kuali.rice.kns.service.DocumentService getDocumentService()
Gets the documentService attribute value.


getKualiRuleService

protected org.kuali.rice.kns.service.KualiRuleService getKualiRuleService()
Gets the kualiRuleService attribute.

Returns:
Returns the kualiRuleService.

setKualiRuleService

public void setKualiRuleService(org.kuali.rice.kns.service.KualiRuleService kualiRuleService)
Sets the kualiRuleService attribute value.

Parameters:
kualiRuleService - The kualiRuleService to set.

getNoteService

protected org.kuali.rice.kns.service.NoteService getNoteService()
Gets the NoteService, lazily initializing if necessary

Returns:
the NoteService

setNoteService

public void setNoteService(org.kuali.rice.kns.service.NoteService noteService)
Sets the noteService attribute value.

Parameters:
noteService - The noteService to set.

getPersonService

protected org.kuali.rice.kim.service.PersonService<org.kuali.rice.kim.bo.Person> getPersonService()
Returns:
Returns the personService.

getFeeProcessingWaivedAndAccruedDetailTotalLine

protected FeeProcessingWaivedAndAccruedDetailTotalLine getFeeProcessingWaivedAndAccruedDetailTotalLine()
Gets the feeProcessingWaivedAndAccruedDetailTotalLine attribute.

Returns:
Returns the feeProcessingWaivedAndAccruedDetailTotalLine.

setFeeProcessingWaivedAndAccruedDetailTotalLine

public void setFeeProcessingWaivedAndAccruedDetailTotalLine(FeeProcessingWaivedAndAccruedDetailTotalLine feeProcessingWaivedAndAccruedDetailTotalLine)
Sets the feeProcessingWaivedAndAccruedDetailTotalLine attribute value.

Parameters:
feeProcessingWaivedAndAccruedDetailTotalLine - The feeProcessingWaivedAndAccruedDetailTotalLine to set.

getFeeProcessingWaivedAndAccruedSubTotalLine

protected FeeProcessingWaivedAndAccruedSubTotalLine getFeeProcessingWaivedAndAccruedSubTotalLine()
Gets the feeProcessingWaivedAndAccruedSubTotalLine attribute.

Returns:
Returns the feeProcessingWaivedAndAccruedSubTotalLine.

setFeeProcessingWaivedAndAccruedSubTotalLine

public void setFeeProcessingWaivedAndAccruedSubTotalLine(FeeProcessingWaivedAndAccruedSubTotalLine feeProcessingWaivedAndAccruedSubTotalLine)
Sets the feeProcessingWaivedAndAccruedSubTotalLine attribute value.

Parameters:
feeProcessingWaivedAndAccruedSubTotalLine - The feeProcessingWaivedAndAccruedSubTotalLine to set.

getFeeProcessingWaivedAndAccruedGrandTotalLine

protected FeeProcessingWaivedAndAccruedGrandTotalLine getFeeProcessingWaivedAndAccruedGrandTotalLine()
Gets the feeProcessingWaivedAndAccruedGrandTotalLine attribute.

Returns:
Returns the feeProcessingWaivedAndAccruedGrandTotalLine.

setFeeProcessingWaivedAndAccruedGrandTotalLine

public void setFeeProcessingWaivedAndAccruedGrandTotalLine(FeeProcessingWaivedAndAccruedGrandTotalLine feeProcessingWaivedAndAccruedGrandTotalLine)
Sets the feeProcessingWaivedAndAccruedGrandTotalLine attribute value.

Parameters:
feeProcessingWaivedAndAccruedGrandTotalLine - The feeProcessingWaivedAndAccruedGrandTotalLine to set.

getFeeProcessingTotalsProcessedDetailTotalLine

protected FeeProcessingTotalsProcessedDetailTotalLine getFeeProcessingTotalsProcessedDetailTotalLine()
Gets the feeProcessingTotalsProcessedDetailTotalLine attribute.

Returns:
Returns the feeProcessingTotalsProcessedDetailTotalLine.

setFeeProcessingTotalsProcessedDetailTotalLine

public void setFeeProcessingTotalsProcessedDetailTotalLine(FeeProcessingTotalsProcessedDetailTotalLine feeProcessingTotalsProcessedDetailTotalLine)
Sets the feeProcessingTotalsProcessedDetailTotalLine attribute value.

Parameters:
feeProcessingTotalsProcessedDetailTotalLine - The feeProcessingTotalsProcessedDetailTotalLine to set.

getFeeProcessingTotalsProcessedSubTotalLine

protected FeeProcessingTotalsProcessedSubTotalLine getFeeProcessingTotalsProcessedSubTotalLine()
Gets the feeProcessingTotalsProcessedSubTotalLine attribute.

Returns:
Returns the feeProcessingTotalsProcessedSubTotalLine.

setFeeProcessingTotalsProcessedSubTotalLine

public void setFeeProcessingTotalsProcessedSubTotalLine(FeeProcessingTotalsProcessedSubTotalLine feeProcessingTotalsProcessedSubTotalLine)
Sets the feeProcessingTotalsProcessedSubTotalLine attribute value.

Parameters:
feeProcessingTotalsProcessedSubTotalLine - The feeProcessingTotalsProcessedSubTotalLine to set.

getFeeProcessingTotalsProcessedGrandTotalLine

protected FeeProcessingTotalsProcessedGrandTotalLine getFeeProcessingTotalsProcessedGrandTotalLine()
Gets the feeProcessingTotalsProcessedGrandTotalLine attribute.

Returns:
Returns the feeProcessingTotalsProcessedGrandTotalLine.

setFeeProcessingTotalsProcessedGrandTotalLine

public void setFeeProcessingTotalsProcessedGrandTotalLine(FeeProcessingTotalsProcessedGrandTotalLine feeProcessingTotalsProcessedGrandTotalLine)
Sets the feeProcessingTotalsProcessedGrandTotalLine attribute value.

Parameters:
feeProcessingTotalsProcessedGrandTotalLine - The feeProcessingTotalsProcessedGrandTotalLine to set.

getConfigService

protected org.kuali.rice.kns.service.KualiConfigurationService getConfigService()
Gets the configService attribute.

Returns:
Returns the configService.

setConfigService

public void setConfigService(org.kuali.rice.kns.service.KualiConfigurationService configService)
Sets the configService.

Parameters:
configService -


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