org.kuali.kfs.module.purap.document.service
Interface CreditMemoService

All Superinterfaces:
AccountsPayableDocumentSpecificService
All Known Implementing Classes:
CreditMemoServiceImpl

public interface CreditMemoService
extends AccountsPayableDocumentSpecificService

Defines methods that must be implemented by a CreditMemoService implementation.


Method Summary
 VendorCreditMemoDocument addHoldOnCreditMemo(VendorCreditMemoDocument cmDocument, String note)
          Marks a credit memo as on hold.
 void calculateCreditMemo(VendorCreditMemoDocument cmDocument)
          Performs the credit memo item extended price calculation.
 void cancelExtractedCreditMemo(VendorCreditMemoDocument cmDocument, String note)
          This is called by PDP to cancel a CreditMemoDocument that has already been extracted
 String creditMemoDuplicateMessages(VendorCreditMemoDocument cmDocument)
          Makes call to dao to check for duplicate credit memos, and if one is found a message is returned.
 VendorCreditMemoDocument getCreditMemoByDocumentNumber(String documentNumber)
          Get a credit memo by document number.
 VendorCreditMemoDocument getCreditMemoDocumentById(Integer purchasingDocumentIdentifier)
          Retrieves the Credit Memo document by the purapDocumentIdentifier.
 Iterator<VendorCreditMemoDocument> getCreditMemosToExtract(String chartCode)
          Gets the Credit memos that can be extracted.
 Collection<VendorCreditMemoDocument> getCreditMemosToExtractByVendor(String chartCode, VendorGroupingHelper vendor)
          Pulls all extractable credit memo documents for a given vendor.
 List<PurchaseOrderItem> getPOInvoicedItems(PurchaseOrderDocument poDocument)
          Iterates through the items of the purchase order document and checks for items that have been invoiced.
 Set<VendorGroupingHelper> getVendorsOnCreditMemosToExtract(String chartCode)
          Pulls a distinct list of all vendors on CM documents which are ready for extraction.
 boolean hasActiveCreditMemosForPurchaseOrder(Integer purchaseOrderIdentifier)
          Determines if there are active credit memos for a purchase order.
 void markPaid(VendorCreditMemoDocument cm, Date processDate)
          Mark a credit memo is being used on a payment
 void populateAndSaveCreditMemo(VendorCreditMemoDocument creditMemoDocument)
          Persists the credit memo with business rule checks.
 void populateDocumentAfterInit(VendorCreditMemoDocument cmDocument)
          Populates the document from either the associated payment request document, purchase order document, or vendor detail based on the credit memo type.
 VendorCreditMemoDocument removeHoldOnCreditMemo(VendorCreditMemoDocument cmDocument, String note)
          Removes a hold on the credit memo document.
 void reopenClosedPO(VendorCreditMemoDocument cmDocument)
          Reopens the purchase order document related to the given credit memo document if it is closed.
 void resetExtractedCreditMemo(VendorCreditMemoDocument cmDocument, String note)
          This is called by PDP to cancel a CreditMemoDocument that has already been extracted
 
Methods inherited from interface org.kuali.kfs.module.purap.document.service.AccountsPayableDocumentSpecificService
generateGLEntriesCreateAccountsPayableDocument, getPersonForCancel, poItemEligibleForAp, shouldPurchaseOrderBeReversed, takePurchaseOrderCancelAction, updateStatusByNode
 

Method Detail

populateDocumentAfterInit

void populateDocumentAfterInit(VendorCreditMemoDocument cmDocument)
Populates the document from either the associated payment request document, purchase order document, or vendor detail based on the credit memo type.

Parameters:
cmDocument - - Credit Memo Document to Populate

getCreditMemosToExtract

Iterator<VendorCreditMemoDocument> getCreditMemosToExtract(String chartCode)
Gets the Credit memos that can be extracted.

Parameters:
chartCode - Chart to select from.
Returns:
Iterator of credit memos.

getVendorsOnCreditMemosToExtract

Set<VendorGroupingHelper> getVendorsOnCreditMemosToExtract(String chartCode)
Pulls a distinct list of all vendors on CM documents which are ready for extraction.

Parameters:
chartCode -
Returns:

getCreditMemosToExtractByVendor

Collection<VendorCreditMemoDocument> getCreditMemosToExtractByVendor(String chartCode,
                                                                     VendorGroupingHelper vendor)
Pulls all extractable credit memo documents for a given vendor.

Parameters:
chartCode -
vendor -
Returns:

getCreditMemoByDocumentNumber

VendorCreditMemoDocument getCreditMemoByDocumentNumber(String documentNumber)
Get a credit memo by document number.

Parameters:
documentNumber - The document number of the credit memo to be retrieved.
Returns:
The credit memo document whose document number matches the input parameter.

getCreditMemoDocumentById

VendorCreditMemoDocument getCreditMemoDocumentById(Integer purchasingDocumentIdentifier)
Retrieves the Credit Memo document by the purapDocumentIdentifier.

Parameters:
purchasingDocumentIdentifier - The purapDocumentIdentifier of the credit memo to be retrieved.
Returns:
The credit memo document whose purapDocumentIdentifier matches the input parameter.

creditMemoDuplicateMessages

String creditMemoDuplicateMessages(VendorCreditMemoDocument cmDocument)
Makes call to dao to check for duplicate credit memos, and if one is found a message is returned. A duplicate error happens if there is an existing credit memo with the same vendor number and credit memo number as the one which is being created, or same vendor number and credit memo date.

Parameters:
cmDocument - - CreditMemoDocument to run duplicate check on.
Returns:
String - message indicating a duplicate was found.

getPOInvoicedItems

List<PurchaseOrderItem> getPOInvoicedItems(PurchaseOrderDocument poDocument)
Iterates through the items of the purchase order document and checks for items that have been invoiced.

Parameters:
poDocument - - purchase order document containing the lines to check.
Returns:
List - list of invoiced items found.

populateAndSaveCreditMemo

void populateAndSaveCreditMemo(VendorCreditMemoDocument creditMemoDocument)
Persists the credit memo with business rule checks.

Parameters:
creditMemoDocument - - credit memo document to save.

calculateCreditMemo

void calculateCreditMemo(VendorCreditMemoDocument cmDocument)
Performs the credit memo item extended price calculation.

Parameters:
cmDocument - - credit memo document to calculate.

addHoldOnCreditMemo

VendorCreditMemoDocument addHoldOnCreditMemo(VendorCreditMemoDocument cmDocument,
                                             String note)
                                             throws Exception
Marks a credit memo as on hold.

Parameters:
cmDocument - - credit memo document to hold.
note - - note explaining why the document is being put on hold.
Returns:
the CreditMemoDocument with updated information.
Throws:
Exception

removeHoldOnCreditMemo

VendorCreditMemoDocument removeHoldOnCreditMemo(VendorCreditMemoDocument cmDocument,
                                                String note)
                                                throws Exception
Removes a hold on the credit memo document.

Parameters:
cmDocument - - credit memo document to remove hold on.
note - - note explaining why the credit memo is being taken off hold.
Returns:
the CreditMemoDocument with updated information.
Throws:
Exception

resetExtractedCreditMemo

void resetExtractedCreditMemo(VendorCreditMemoDocument cmDocument,
                              String note)
This is called by PDP to cancel a CreditMemoDocument that has already been extracted

Parameters:
cmDocument - The credit memo document to be resetted.
note - The note to be added to the credit memo document.

cancelExtractedCreditMemo

void cancelExtractedCreditMemo(VendorCreditMemoDocument cmDocument,
                               String note)
This is called by PDP to cancel a CreditMemoDocument that has already been extracted

Parameters:
cmDocument - The credit memo document to be canceled.
note - The note to be added to the document to be canceled.

reopenClosedPO

void reopenClosedPO(VendorCreditMemoDocument cmDocument)
Reopens the purchase order document related to the given credit memo document if it is closed.

Parameters:
cmDocument - The credit memo document to be used to obtained the purchase order document to be closed.

markPaid

void markPaid(VendorCreditMemoDocument cm,
              Date processDate)
Mark a credit memo is being used on a payment

Parameters:
cm - The credit memo document to be marked as paid.
processDate - The date to be set as the credit memo's paid timestamp.

hasActiveCreditMemosForPurchaseOrder

boolean hasActiveCreditMemosForPurchaseOrder(Integer purchaseOrderIdentifier)
Determines if there are active credit memos for a purchase order.

Parameters:
purchaseOrderIdentifier -
Returns:


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