org.kuali.kfs.fp.document.service
Interface CashManagementService

All Known Implementing Classes:
CashManagementServiceImpl

public interface CashManagementService

This service interface defines methods that a CashManagementService implementation must provide.


Method Summary
 void addDeposit(CashManagementDocument cashManagementDoc, String depositTicketNumber, Bank bank, List selectedCashReceipts, List selectedCashieringChecks, boolean isFinalDeposit)
          Uses the given information to lock the appropriate CashDrawer, create a Deposit, and associate it with the given CashManagementDocument and CashReceipts.
 boolean allowDocumentCancellation(CashManagementDocument cmDoc)
          This method determines whether or not the given cash management document can be canceled.
 boolean allVerifiedCashReceiptsAreDeposited(CashManagementDocument cmDoc)
          This method verifies that all cash receipts for the document are deposited.
 void applyCashieringTransaction(CashManagementDocument cmDoc)
          Apply a cashiering transaction to a cash management document.
 org.kuali.rice.kns.util.KualiDecimal calculateDepositedCheckTotal(String documentNumber)
          Total up the amounts of all checks so far deposited as part of the given cash management document.
 org.kuali.rice.kns.util.KualiDecimal calculateUndepositedCheckTotal(String documentNumber)
          Total up the amounts of all cashiering checks not yet deposited as part of the given cash management document.
 void cancelCashManagementDocument(CashManagementDocument cmDoc)
          Cancels the given CashManagementDocument, canceling the Deposits it contains and closing the CashDrawer associated with the given verification unit.
 void cancelDeposit(Deposit deposit)
          Cancels the given Deposit, updating the related CashManagementDocument, CashReceipts, and CashDrawer as needed
 CashManagementDocument createCashManagementDocument(String campusCode, String docDescription, String annotation)
          Creates and returns a CashManagementDocument, opening the CashDrawer associated with the given verification unit.
 void createNewCashDetails(CashManagementDocument cmDoc, String cashieringSource)
          This method creates new cumulative currency and coin details for a document.
 void finalizeCashManagementDocument(CashManagementDocument cmDoc)
          Finalizes the given CashManagementDocument, updating the status of the CashReceipt documents in the Deposits it contains and closing the CashDrawer associated with the given verification unit.
 void finalizeLastInterimDeposit(CashManagementDocument cmDoc)
          This method turns the last interim deposit into the final deposit and locks the cash drawer.
 CoinDetail generateMasterCoinDetail(CashManagementDocument cmDoc)
          This generates the "master" coin detail record - a composite of all the coin detail activity that occurred to the cash drawer.
 CurrencyDetail generateMasterCurrencyDetail(CashManagementDocument cmDoc)
          Generates the master currency detail, which sounds bad, but which is really just okay.
 Map<Class,Object> getCashDetailsForFinalDeposit(String documentNumber)
          This returns the currency and coin details for the final deposit, in a map keyed on the detail class This returns the currency and coin details for the final deposit, in a map keyed on the detail class.
 CashManagementDocument getCashManagementDocumentForCashReceiptId(String documentId)
          Retrieves a CashManagementDocument instance associated with the cash receipt id provided.
 List<CashieringItemInProcess> getOpenItemsInProcess(CashManagementDocument cmDoc)
          Retrieve the open cashiering items in process for the given cash management document.
 List<CashieringItemInProcess> getRecentlyClosedItemsInProcess(CashManagementDocument cmDoc)
          Returns all items in process associated with this workgroup, closed within the past 30 days
 void populateCashDetailsForDeposit(CashManagementDocument cmDoc)
          Grab the currency and coin detail for final deposits.
 List retrieveCashReceipts(Deposit deposit)
          Returns a List of all CashReceipts associated with the given Deposit.
 List<Check> selectCashieringChecksForDeposit(String documentNumber, Integer depositLineNumber)
          Retrieves from the database all cashiering transaction checks deposited for a given deposit.
 List<Check> selectDepositedCashieringChecks(String documentNumber)
          Retrieves from the database all deposited cashiering transaction checks associated with the given cash management document number.
 Integer selectNextAvailableCheckLineNumber(String documentNumber)
          Select the next available check line number for the given cash management document.
 List<Check> selectUndepositedCashieringChecks(String documentNumber)
          Retrieves from the database any undeposited cashiering transaction checks associated with the given cash management document.
 boolean verifyCashReceiptIsDeposited(CashManagementDocument cmDoc, CashReceiptDocument crDoc)
          Verifies if a given cash receipt is deposited as part of the given cash management document.
 

Method Detail

createCashManagementDocument

CashManagementDocument createCashManagementDocument(String campusCode,
                                                    String docDescription,
                                                    String annotation)
Creates and returns a CashManagementDocument, opening the CashDrawer associated with the given verification unit.

Parameters:
campusCode -
docDescription -
annotation -
Returns:
A properly initialized CashManagementDocument instance.

addDeposit

void addDeposit(CashManagementDocument cashManagementDoc,
                String depositTicketNumber,
                Bank bank,
                List selectedCashReceipts,
                List selectedCashieringChecks,
                boolean isFinalDeposit)
Uses the given information to lock the appropriate CashDrawer, create a Deposit, and associate it with the given CashManagementDocument and CashReceipts.

Parameters:
cashManagementDoc -
depositTicketNumber -
bank -
selectedCashReceipts -
isFinalDeposit -

cancelDeposit

void cancelDeposit(Deposit deposit)
Cancels the given Deposit, updating the related CashManagementDocument, CashReceipts, and CashDrawer as needed

Parameters:
deposit -

cancelCashManagementDocument

void cancelCashManagementDocument(CashManagementDocument cmDoc)
Cancels the given CashManagementDocument, canceling the Deposits it contains and closing the CashDrawer associated with the given verification unit. Called in response to a workflow CANCEL request, so this method doesn't invoke workflow itself.

Parameters:
cmDoc -

finalizeCashManagementDocument

void finalizeCashManagementDocument(CashManagementDocument cmDoc)
Finalizes the given CashManagementDocument, updating the status of the CashReceipt documents in the Deposits it contains and closing the CashDrawer associated with the given verification unit. Called in response to a workflow document status change, so this method doesn't invoke workflow itself.

Parameters:
cmDoc -

getCashManagementDocumentForCashReceiptId

CashManagementDocument getCashManagementDocumentForCashReceiptId(String documentId)
Retrieves a CashManagementDocument instance associated with the cash receipt id provided.

Parameters:
documentId - The id of the cash receipt document associated with the cash management document.
Returns:
CashManagementDocument which contains the Deposit which contains the given CashReceipt, or null if the CashReceipt is not contained in a Deposit

retrieveCashReceipts

List retrieveCashReceipts(Deposit deposit)
Returns a List of all CashReceipts associated with the given Deposit.

Parameters:
deposit - The deposit the cash receipts will be retrieved from.
Returns:
List the of CashReceipts associated with given deposit.

applyCashieringTransaction

void applyCashieringTransaction(CashManagementDocument cmDoc)
Apply a cashiering transaction to a cash management document. This means: 0. check rules??? 1. Updating the cash drawer with any incoming currency and coin 2. Moving any checks from the transaction to the CM document 3. Checking if any items in process were closed; if so, saving that info 4. Saving currency and coin records 5. Saving any new item in process 6. saving any checks

Parameters:
cmDoc - The transaction to apply to the cash management document.
cashieringTransaction - The transaction being applied to the cash management document.

getOpenItemsInProcess

List<CashieringItemInProcess> getOpenItemsInProcess(CashManagementDocument cmDoc)
Retrieve the open cashiering items in process for the given cash management document.

Parameters:
cmDoc - The cash management document to retrieve the items in process for.
Returns:
A list of all open items in process.

getRecentlyClosedItemsInProcess

List<CashieringItemInProcess> getRecentlyClosedItemsInProcess(CashManagementDocument cmDoc)
Returns all items in process associated with this workgroup, closed within the past 30 days

Parameters:
cmDoc - The cash management document which is associated with the workgroup that the closed items in process would have also been associated with.
Returns:
A list of any items in process recently closed.

generateMasterCurrencyDetail

CurrencyDetail generateMasterCurrencyDetail(CashManagementDocument cmDoc)
Generates the master currency detail, which sounds bad, but which is really just okay. A master currency detail is the composite effect of all the transactions of a cash management document on a cash drawer.

Parameters:
cmDoc - The cash management document to generate the master record for.
Returns:
The master currency detail record. "Master" in the sense of "Platonic ideal" from which all else is a copy.

generateMasterCoinDetail

CoinDetail generateMasterCoinDetail(CashManagementDocument cmDoc)
This generates the "master" coin detail record - a composite of all the coin detail activity that occurred to the cash drawer.

Parameters:
cmDoc - The cash management document to generate the master record for.
Returns:
The master coin detail record. "Master" in the sense of "Platonic ideal" from which all else is a copy.

verifyCashReceiptIsDeposited

boolean verifyCashReceiptIsDeposited(CashManagementDocument cmDoc,
                                     CashReceiptDocument crDoc)
Verifies if a given cash receipt is deposited as part of the given cash management document.

Parameters:
cmDoc - The cash management document to search through.
crDoc - The cash receipt to check the deposited status of.
Returns:
true If the given cash receipt document is deposited as part of the given cash management document, false if otherwise.

allVerifiedCashReceiptsAreDeposited

boolean allVerifiedCashReceiptsAreDeposited(CashManagementDocument cmDoc)
This method verifies that all cash receipts for the document are deposited.

Parameters:
cmDoc - The cash management document to verify.
Returns:
True if all CRs are deposited, false if otherwise.

finalizeLastInterimDeposit

void finalizeLastInterimDeposit(CashManagementDocument cmDoc)
This method turns the last interim deposit into the final deposit and locks the cash drawer.

Parameters:
cmDoc - The cash management document to take deposits from for finalization.

createNewCashDetails

void createNewCashDetails(CashManagementDocument cmDoc,
                          String cashieringSource)
This method creates new cumulative currency and coin details for a document.

Parameters:
cmDoc - The cash management document the cumulative details will be associated with.
cashieringSource - The cashiering record source for the new details.

populateCashDetailsForDeposit

void populateCashDetailsForDeposit(CashManagementDocument cmDoc)
Grab the currency and coin detail for final deposits.

Parameters:
cmDoc - The cash management document which has deposits to populate.

selectUndepositedCashieringChecks

List<Check> selectUndepositedCashieringChecks(String documentNumber)
Retrieves from the database any undeposited cashiering transaction checks associated with the given cash management document.

Parameters:
documentNumber - The document number of a cash management document that cashiering transaction checks may be associated with.
Returns:
A list of checks associated with the document number given.

selectDepositedCashieringChecks

List<Check> selectDepositedCashieringChecks(String documentNumber)
Retrieves from the database all deposited cashiering transaction checks associated with the given cash management document number.

Parameters:
documentNumber - The document number of a cash management document that cashiering transaction checks may be associated with.
Returns:
A list of deposited cashiering checks associated with the document number given.

selectCashieringChecksForDeposit

List<Check> selectCashieringChecksForDeposit(String documentNumber,
                                             Integer depositLineNumber)
Retrieves from the database all cashiering transaction checks deposited for a given deposit.

Parameters:
documentNumber - The document number of a cash management document that cashiering transaction checks have been deposited for.
depositLineNumber - The line number of the deposit to find checks deposited for.
Returns:
A list of checks associated with the given deposit.

calculateDepositedCheckTotal

org.kuali.rice.kns.util.KualiDecimal calculateDepositedCheckTotal(String documentNumber)
Total up the amounts of all checks so far deposited as part of the given cash management document.

Parameters:
documentNumber - The id of a cash management document.
Returns:
The total of cashiering checks deposited so far as part of that document.

calculateUndepositedCheckTotal

org.kuali.rice.kns.util.KualiDecimal calculateUndepositedCheckTotal(String documentNumber)
Total up the amounts of all cashiering checks not yet deposited as part of the given cash management document.

Parameters:
documentNumber - The id of a cash management document.
Returns:
The total of cashiering checks not yet deposited as part of that document.

allowDocumentCancellation

boolean allowDocumentCancellation(CashManagementDocument cmDoc)
This method determines whether or not the given cash management document can be canceled.

Parameters:
cmDoc - The cash management document to be canceled.
Returns:
True if cancellation is possible, false if otherwise.

selectNextAvailableCheckLineNumber

Integer selectNextAvailableCheckLineNumber(String documentNumber)
Select the next available check line number for the given cash management document.

Parameters:
documentNumber - The document number of a cash management document.
Returns:
The next available check line number for cashiering checks.

getCashDetailsForFinalDeposit

Map<Class,Object> getCashDetailsForFinalDeposit(String documentNumber)
This returns the currency and coin details for the final deposit, in a map keyed on the detail class This returns the currency and coin details for the final deposit, in a map keyed on the detail class.

Parameters:
documentNumber - The document number to find the final deposit cash details for.
Returns:
A map with the cash details in it.


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