@Transactional public class CreditMemoServiceImpl extends Object implements CreditMemoService
Constructor and Description |
---|
CreditMemoServiceImpl() |
Modifier and Type | Method and Description |
---|---|
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.
|
void |
generateGLEntriesCreateAccountsPayableDocument(AccountsPayableDocument apDocument)
The given document here needs to be a Credit Memo.
|
VendorCreditMemoDocument |
getCreditMemoByDocumentNumber(String documentNumber)
Get a credit memo by document number.
|
VendorCreditMemoDocument |
getCreditMemoDocumentById(Integer purchasingDocumentIdentifier)
Retrieves the Credit Memo document by the purapDocumentIdentifier.
|
List<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.
|
org.kuali.rice.kim.api.identity.Person |
getPersonForCancel(AccountsPayableDocument apDoc) |
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.
|
protected void |
logAndThrowRuntimeException(String errorMessage)
Records the specified error message into the Log file and throws a runtime exception.
|
protected void |
logAndThrowRuntimeException(String errorMessage,
Exception e)
Records the specified error message into the Log file and throws the specified runtime exception.
|
void |
markPaid(VendorCreditMemoDocument cm,
Date processDate)
Mark a credit memo is being used on a payment
|
boolean |
poItemEligibleForAp(AccountsPayableDocument apDoc,
PurchaseOrderItem poItem) |
void |
populateAndSaveCreditMemo(VendorCreditMemoDocument document)
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.
|
protected void |
populateDocumentDescription(VendorCreditMemoDocument cmDocument)
Defaults the document description based on the credit memo source type.
|
protected void |
populateDocumentFromPO(VendorCreditMemoDocument cmDocument,
HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountList)
Populate Credit Memo of type Purchase Order.
|
protected void |
populateDocumentFromPreq(VendorCreditMemoDocument cmDocument,
HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountList)
Populate Credit Memo of type Payment Request.
|
protected void |
populateDocumentFromVendor(VendorCreditMemoDocument cmDocument)
Populate Credit Memo of type Vendor.
|
protected void |
populateItemLinesFromPO(VendorCreditMemoDocument cmDocument,
HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountList)
Populates the credit memo items from the payment request items.
|
protected void |
populateItemLinesFromPreq(VendorCreditMemoDocument cmDocument,
HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountList)
Populates the credit memo items from the payment request items.
|
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
|
void |
setAccountsPayableService(AccountsPayableService accountsPayableService) |
void |
setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService) |
void |
setCreditMemoDao(CreditMemoDao creditMemoDao) |
void |
setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService) |
void |
setDocumentService(org.kuali.rice.krad.service.DocumentService documentService) |
void |
setNoteService(org.kuali.rice.krad.service.NoteService noteService) |
void |
setPaymentRequestService(PaymentRequestService paymentRequestService) |
void |
setPurapAccountingService(PurapAccountingService purapAccountingService) |
void |
setPurapGeneralLedgerService(PurapGeneralLedgerService purapGeneralLedgerService) |
void |
setPurapService(PurapService purapService) |
void |
setPurchaseOrderService(PurchaseOrderService purchaseOrderService) |
void |
setVendorService(VendorService vendorService) |
void |
setWorkflowDocumentService(org.kuali.rice.krad.workflow.service.WorkflowDocumentService workflowDocumentService) |
boolean |
shouldPurchaseOrderBeReversed(AccountsPayableDocument apDoc) |
void |
takePurchaseOrderCancelAction(AccountsPayableDocument apDoc) |
String |
updateStatusByNode(String currentNodeName,
AccountsPayableDocument apDoc) |
protected String |
updateStatusByNode(String currentNodeName,
VendorCreditMemoDocument cmDoc)
Updates the status of a credit memo document, currently this is used by the cancel action
|
public CreditMemoServiceImpl()
public void setAccountsPayableService(AccountsPayableService accountsPayableService)
public void setCreditMemoDao(CreditMemoDao creditMemoDao)
public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
public void setDocumentService(org.kuali.rice.krad.service.DocumentService documentService)
public void setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService)
public void setNoteService(org.kuali.rice.krad.service.NoteService noteService)
public void setPaymentRequestService(PaymentRequestService paymentRequestService)
public void setPurapAccountingService(PurapAccountingService purapAccountingService)
public void setPurapGeneralLedgerService(PurapGeneralLedgerService purapGeneralLedgerService)
public void setPurapService(PurapService purapService)
public void setPurchaseOrderService(PurchaseOrderService purchaseOrderService)
public void setVendorService(VendorService vendorService)
public void setWorkflowDocumentService(org.kuali.rice.krad.workflow.service.WorkflowDocumentService workflowDocumentService)
public List<VendorCreditMemoDocument> getCreditMemosToExtract(String chartCode)
CreditMemoService
getCreditMemosToExtract
in interface CreditMemoService
chartCode
- Chart to select from.CreditMemoService.getCreditMemosToExtract(java.lang.String)
public Collection<VendorCreditMemoDocument> getCreditMemosToExtractByVendor(String chartCode, VendorGroupingHelper vendor)
CreditMemoService
getCreditMemosToExtractByVendor
in interface CreditMemoService
public Set<VendorGroupingHelper> getVendorsOnCreditMemosToExtract(String chartCode)
CreditMemoService
getVendorsOnCreditMemosToExtract
in interface CreditMemoService
public String creditMemoDuplicateMessages(VendorCreditMemoDocument cmDocument)
CreditMemoService
creditMemoDuplicateMessages
in interface CreditMemoService
cmDocument
- - CreditMemoDocument to run duplicate check on.org.kuali.ole.module.purap.document.service.CreditMemoService#creditMemoDuplicateMessages(org.kuali.ole.module.purap.document.CreditMemoDocument)
public List<PurchaseOrderItem> getPOInvoicedItems(PurchaseOrderDocument poDocument)
CreditMemoService
getPOInvoicedItems
in interface CreditMemoService
poDocument
- - purchase order document containing the lines to check.CreditMemoService.getPOInvoicedItems(org.kuali.ole.module.purap.document.PurchaseOrderDocument)
public void calculateCreditMemo(VendorCreditMemoDocument cmDocument)
CreditMemoService
calculateCreditMemo
in interface CreditMemoService
cmDocument
- - credit memo document to calculate.org.kuali.ole.module.purap.document.service.CreditMemoService#calculateCreditMemo(org.kuali.ole.module.purap.document.CreditMemoDocument)
public VendorCreditMemoDocument getCreditMemoByDocumentNumber(String documentNumber)
CreditMemoService
getCreditMemoByDocumentNumber
in interface CreditMemoService
documentNumber
- The document number of the credit memo to be retrieved.CreditMemoService.getCreditMemoByDocumentNumber(java.lang.String)
public VendorCreditMemoDocument getCreditMemoDocumentById(Integer purchasingDocumentIdentifier)
CreditMemoService
getCreditMemoDocumentById
in interface CreditMemoService
purchasingDocumentIdentifier
- The purapDocumentIdentifier of the credit memo to be retrieved.CreditMemoService.getCreditMemoDocumentById(java.lang.Integer)
public void populateAndSaveCreditMemo(VendorCreditMemoDocument document)
CreditMemoService
populateAndSaveCreditMemo
in interface CreditMemoService
document
- - credit memo document to save.org.kuali.ole.module.purap.document.service.CreditMemoService#saveDocument(org.kuali.ole.module.purap.document.CreditMemoDocument)
public void reopenClosedPO(VendorCreditMemoDocument cmDocument)
CreditMemoService
reopenClosedPO
in interface CreditMemoService
cmDocument
- The credit memo document to be used to obtained the
purchase order document to be closed.org.kuali.ole.module.purap.document.service.CreditMemoService#reopenClosedPO(org.kuali.ole.module.purap.document.CreditMemoDocument)
public VendorCreditMemoDocument addHoldOnCreditMemo(VendorCreditMemoDocument cmDocument, String note) throws Exception
CreditMemoService
addHoldOnCreditMemo
in interface CreditMemoService
cmDocument
- - credit memo document to hold.note
- - note explaining why the document is being put on hold.Exception
org.kuali.ole.module.purap.document.service.CreditMemoService#addHoldOnPaymentRequest(org.kuali.ole.module.purap.document.CreditMemoDocument,
java.lang.String)
public VendorCreditMemoDocument removeHoldOnCreditMemo(VendorCreditMemoDocument cmDocument, String note) throws Exception
CreditMemoService
removeHoldOnCreditMemo
in interface CreditMemoService
cmDocument
- - credit memo document to remove hold on.note
- - note explaining why the credit memo is being taken off hold.Exception
org.kuali.ole.module.purap.document.service.CreditMemoService#removeHoldOnCreditMemo(org.kuali.ole.module.purap.document.CreditMemoDocument,
java.lang.String)
public String updateStatusByNode(String currentNodeName, AccountsPayableDocument apDoc)
protected String updateStatusByNode(String currentNodeName, VendorCreditMemoDocument cmDoc)
currentNodeName
- The string representing the current node to be used to obtain the canceled status code.cmDoc
- The credit memo document to be updated.public void cancelExtractedCreditMemo(VendorCreditMemoDocument cmDocument, String note)
CreditMemoService
cancelExtractedCreditMemo
in interface CreditMemoService
cmDocument
- The credit memo document to be canceled.note
- The note to be added to the document to be canceled.org.kuali.ole.module.purap.document.service.CreditMemoService#cancelExtractedCreditMemo(org.kuali.ole.module.purap.document.CreditMemoDocument,
java.lang.String)
public void resetExtractedCreditMemo(VendorCreditMemoDocument cmDocument, String note)
CreditMemoService
resetExtractedCreditMemo
in interface CreditMemoService
cmDocument
- The credit memo document to be resetted.note
- The note to be added to the credit memo document.org.kuali.ole.module.purap.document.service.CreditMemoService#resetExtractedCreditMemo(org.kuali.ole.module.purap.document.CreditMemoDocument,
java.lang.String)
public boolean shouldPurchaseOrderBeReversed(AccountsPayableDocument apDoc)
public org.kuali.rice.kim.api.identity.Person getPersonForCancel(AccountsPayableDocument apDoc)
public void takePurchaseOrderCancelAction(AccountsPayableDocument apDoc)
public void markPaid(VendorCreditMemoDocument cm, Date processDate)
CreditMemoService
markPaid
in interface CreditMemoService
cm
- The credit memo document to be marked as paid.processDate
- The date to be set as the credit memo's paid timestamp.org.kuali.ole.module.purap.document.service.CreditMemoService#markPaid(org.kuali.ole.module.purap.document.CreditMemoDocument,
java.sql.Date)
public boolean poItemEligibleForAp(AccountsPayableDocument apDoc, PurchaseOrderItem poItem)
public void generateGLEntriesCreateAccountsPayableDocument(AccountsPayableDocument apDocument)
generateGLEntriesCreateAccountsPayableDocument
in interface AccountsPayableDocumentSpecificService
apDocument
- An AccountsPayableDocumentAccountsPayableDocumentSpecificService.generateGLEntriesCreateAccountsPayableDocument(org.kuali.ole.module.purap.document.AccountsPayableDocument)
protected void logAndThrowRuntimeException(String errorMessage)
errorMessage
- the error message to be logged.protected void logAndThrowRuntimeException(String errorMessage, Exception e)
errorMessage
- the specified error message.e
- the specified runtime exception.public boolean hasActiveCreditMemosForPurchaseOrder(Integer purchaseOrderIdentifier)
CreditMemoService
hasActiveCreditMemosForPurchaseOrder
in interface CreditMemoService
CreditMemoService.hasActiveCreditMemosForPurchaseOrder(java.lang.Integer)
public void populateDocumentAfterInit(VendorCreditMemoDocument cmDocument)
CreditMemoService
populateDocumentAfterInit
in interface CreditMemoService
cmDocument
- - Credit Memo Document to Populateorg.kuali.ole.module.purap.document.service.CreditMemoCreateService#populateDocumentAfterInit(org.kuali.ole.module.purap.document.CreditMemoDocument)
protected void populateDocumentFromPreq(VendorCreditMemoDocument cmDocument, HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountList)
cmDocument
- - Credit Memo Document to Populateprotected void populateItemLinesFromPreq(VendorCreditMemoDocument cmDocument, HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountList)
cmDocument
- - Credit Memo Document to Populateprotected void populateDocumentFromPO(VendorCreditMemoDocument cmDocument, HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountList)
cmDocument
- - Credit Memo Document to Populateprotected void populateItemLinesFromPO(VendorCreditMemoDocument cmDocument, HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountList)
cmDocument
- - Credit Memo Document to Populateprotected void populateDocumentFromVendor(VendorCreditMemoDocument cmDocument)
cmDocument
- - Credit Memo Document to Populateprotected void populateDocumentDescription(VendorCreditMemoDocument cmDocument)
cmDocument
- - Credit Memo Document to PopulateCopyright © 2004–2015 The Kuali Foundation. All rights reserved.