@Transactional public class AccountsPayableServiceImpl extends Object implements AccountsPayableService
Modifier and Type | Field and Description |
---|---|
protected AccountService |
accountService |
protected org.kuali.rice.core.api.datetime.DateTimeService |
dateTimeService |
protected org.kuali.rice.krad.service.DocumentService |
documentService |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
parameterService |
protected PurapAccountingService |
purapAccountingService |
protected PurapGeneralLedgerService |
purapGeneralLedgerService |
protected PurapService |
purapService |
protected PurchaseOrderService |
purchaseOrderService |
Constructor and Description |
---|
AccountsPayableServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addContinuationAccountsNote(AccountsPayableDocument document,
HashMap<String,ExpiredOrClosedAccountEntry> accounts)
Creates and adds a note indicating accounts replaced and what they replaced and attaches it to the document.
|
void |
cancelAccountsPayableDocument(AccountsPayableDocument apDocument,
String currentNodeName)
This method cancels a document, it uses DocumentSpecificService to call the actual logic on the PaymentRequestService
or CreditMemoService as appropriate.
|
void |
cancelAccountsPayableDocumentByCheckingDocumentStatus(AccountsPayableDocument document,
String noteText)
This method cancels an AccountsPayableDocument according to the document status.
|
boolean |
canCopyAccountingLinesWithZeroAmount()
checks if an accounting line with zero dollar amount can be copied from PO to PREQ.
|
protected String |
createChartAccountString(ExpiredOrClosedAccount ecAccount)
Creates a chart-account string.
|
protected HashMap<String,ExpiredOrClosedAccountEntry> |
expiredOrClosedAccountsList(AccountsPayableDocument document)
Generates a list of replacement accounts for expired or closed accounts, as well as for expired/closed accounts without a continuation account.
|
HashMap<String,ExpiredOrClosedAccountEntry> |
expiredOrClosedAccountsList(PurchaseOrderDocument po)
Generates a list of replacement accounts for expired or closed accounts, as well as for expired/closed accounts without a continuation account.
|
void |
generateExpiredOrClosedAccountNote(AccountsPayableDocument document,
HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountList)
Generates a note of where continuation accounts were used and adds them as a note to the document.
|
void |
generateExpiredOrClosedAccountWarning(AccountsPayableDocument document)
Adds a warning message to the message list if expired or closed accounts have been used on the document and the
document is not in any of these state: Initiate, In Process or Awaiting Accounts Payable Review and the
current user is a fiscal user.
|
HashMap<String,ExpiredOrClosedAccountEntry> |
getExpiredOrClosedAccountList(AccountsPayableDocument document)
Generates a list of continuation accounts for expired or closed accounts as well as a list of expired or closed
accounts with no continuation accounts.
|
protected Account |
getReplaceAccountForClosedAccount(Account account,
AccountsPayableDocument document)
Gets the replacement account for the specified closed account.
|
protected Account |
getReplaceAccountForExpiredAccount(Account account,
AccountsPayableDocument document)
Gets the replacement account for the specified expired account.
|
protected boolean |
isAPUser(AccountsPayableDocument document,
org.kuali.rice.kim.api.identity.Person user)
Determines if the user is an AP user.
|
protected boolean |
isFiscalUser(AccountsPayableDocument document,
org.kuali.rice.kim.api.identity.Person user)
Determines if the user is a fiscal officer.
|
void |
performLogicForFullEntryCompleted(PurchasingAccountsPayableDocument purapDocument)
Performs all the actions on an update document.
|
void |
processExpiredOrClosedAccount(PurApAccountingLineBase acctLineBase,
HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountList)
Performs the replacement of an expired/closed account with a continuation account.
|
boolean |
purchaseOrderItemEligibleForPayment(PurchaseOrderItem poi)
Determines if item is eligible for payment.
|
void |
setAccountService(AccountService accountService) |
void |
setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService) |
void |
setDocumentService(org.kuali.rice.krad.service.DocumentService documentService) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService) |
void |
setPurapAccountingService(PurapAccountingService purapAccountingService) |
void |
setPurapGeneralLedgerService(PurapGeneralLedgerService purapGeneralLedgerService) |
void |
setPurapService(PurapService purapService) |
void |
setPurchaseOrderService(PurchaseOrderService purchaseOrderService) |
protected void |
updateEncumberance(PurchaseOrderItem purchaseOrderItem,
CreditMemoItem cmItem)
Updates the encumberance related fields.
|
protected void |
updateEncumberances(PaymentRequestItem preqItem,
PurchaseOrderItem poItem,
CreditMemoItem cmItem)
Updates encumberances.
|
void |
updateItemList(AccountsPayableDocument apDocument)
Updates the item list based on what's eligible to be payed on purchase order.
|
protected void |
updatePossibleAmmendedFields(PurchaseOrderItem sourceItem,
PaymentRequestItem destItem)
Updates fields that could've been changed on amendment.
|
protected PurapAccountingService purapAccountingService
protected PurapGeneralLedgerService purapGeneralLedgerService
protected org.kuali.rice.krad.service.DocumentService documentService
protected PurapService purapService
protected org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected org.kuali.rice.core.api.datetime.DateTimeService dateTimeService
protected PurchaseOrderService purchaseOrderService
protected AccountService accountService
public AccountsPayableServiceImpl()
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
public void setPurapService(PurapService purapService)
public void setPurapAccountingService(PurapAccountingService purapAccountingService)
public void setPurapGeneralLedgerService(PurapGeneralLedgerService purapGeneralLedgerService)
public void setDocumentService(org.kuali.rice.krad.service.DocumentService documentService)
public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
public void setPurchaseOrderService(PurchaseOrderService purchaseOrderService)
public void setAccountService(AccountService accountService)
public HashMap<String,ExpiredOrClosedAccountEntry> getExpiredOrClosedAccountList(AccountsPayableDocument document)
AccountsPayableService
getExpiredOrClosedAccountList
in interface AccountsPayableService
document
- The accounts payable document whose accounts we are trying to retrieve.AccountsPayableService.getExpiredOrClosedAccountList(org.kuali.ole.module.purap.document.AccountsPayableDocument)
public void generateExpiredOrClosedAccountNote(AccountsPayableDocument document, HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountList)
AccountsPayableService
generateExpiredOrClosedAccountNote
in interface AccountsPayableService
document
- The accounts payable document to which we're adding the notes.expiredOrClosedAccountList
- The HashMap where the keys are the string representations of the chart and
account of the original account and the values are the ExpiredOrClosedAccountEntry.AccountsPayableService.generateExpiredOrClosedAccountNote(org.kuali.ole.module.purap.document.AccountsPayableDocument,
java.util.HashMap)
public void generateExpiredOrClosedAccountWarning(AccountsPayableDocument document)
AccountsPayableService
generateExpiredOrClosedAccountWarning
in interface AccountsPayableService
document
- The accounts payable document to which we're adding the warning message.AccountsPayableService.generateExpiredOrClosedAccountWarning(org.kuali.ole.module.purap.document.AccountsPayableDocument)
public void processExpiredOrClosedAccount(PurApAccountingLineBase acctLineBase, HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountList)
AccountsPayableService
processExpiredOrClosedAccount
in interface AccountsPayableService
acctLineBase
- The accounting line whose chart and account we're going to replace.expiredOrClosedAccountList
- The HashMap where the keys are the string representations of the chart
and account of the original account and the values are the ExpiredOrClosedAccountEntry.AccountsPayableService.processExpiredOrClosedAccount(org.kuali.ole.module.purap.businessobject.PurApAccountingLineBase,
java.util.HashMap)
protected void addContinuationAccountsNote(AccountsPayableDocument document, HashMap<String,ExpiredOrClosedAccountEntry> accounts)
document
- The accounts payable document to which we're adding the note.accounts
- The HashMap where the keys are the string representations of the chart and account of the
original account and the values are the ExpiredOrClosedAccountEntry.protected Account getReplaceAccountForClosedAccount(Account account, AccountsPayableDocument document)
account
- the specified account which is closed.protected Account getReplaceAccountForExpiredAccount(Account account, AccountsPayableDocument document)
account
- the specified account which is expired.protected HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountsList(AccountsPayableDocument document)
document
- The accounts payable document from which we're obtaining the purchase order id to be used
to obtain the purchase order document, whose accounts we'll use to generate the list of
replacement accounts for expired or closed accounts.public HashMap<String,ExpiredOrClosedAccountEntry> expiredOrClosedAccountsList(PurchaseOrderDocument po)
expiredOrClosedAccountsList
in interface AccountsPayableService
document
- The purchase order document whose accounts we'll use to generate the list of
replacement accounts for expired or closed accounts.protected String createChartAccountString(ExpiredOrClosedAccount ecAccount)
ecAccount
- The account whose chart and account number we're going to use to create the resulting String for this method.protected boolean isFiscalUser(AccountsPayableDocument document, org.kuali.rice.kim.api.identity.Person user)
document
- The document to be used to check the status code and whether the workflow approval is requested.user
- The current user.protected boolean isAPUser(AccountsPayableDocument document, org.kuali.rice.kim.api.identity.Person user)
document
- The document to be used to check the status code and whether the workflow approval is requested.user
- The current user.public void cancelAccountsPayableDocument(AccountsPayableDocument apDocument, String currentNodeName)
AccountsPayableService
cancelAccountsPayableDocument
in interface AccountsPayableService
apDocument
- The accounts payable document to be canceled.currentNodeName
- The string representing the current node, which we'll need when we
want to update the document status by node. Note: if this is blank it is assumed
the request is not coming from workflow.AccountsPayableService.cancelAccountsPayableDocument(org.kuali.ole.module.purap.document.AccountsPayableDocument, java.lang.String)
public void cancelAccountsPayableDocumentByCheckingDocumentStatus(AccountsPayableDocument document, String noteText) throws Exception
AccountsPayableService
cancelAccountsPayableDocumentByCheckingDocumentStatus
in interface AccountsPayableService
document
- The accounts payable document to be canceled.noteText
- Notes users input when canceling the documentException
AccountsPayableService.cancelAccountsPayableDocumentByCheckingDocumentStatus(org.kuali.ole.module.purap.document.AccountsPayableDocument, java.lang.String)
public void performLogicForFullEntryCompleted(PurchasingAccountsPayableDocument purapDocument)
AccountsPayableService
performLogicForFullEntryCompleted
in interface AccountsPayableService
purapDocument
- PurchasingAccountsPayableDocumentAccountsPayableService.performLogicForFullEntryCompleted(org.kuali.ole.module.purap.document.PurchasingAccountsPayableDocument)
public void updateItemList(AccountsPayableDocument apDocument)
AccountsPayableService
updateItemList
in interface AccountsPayableService
apDocument
- The accounts payable document containing the items to be updated.AccountsPayableService.updateItemList(org.kuali.ole.module.purap.document.AccountsPayableDocument)
protected void updatePossibleAmmendedFields(PurchaseOrderItem sourceItem, PaymentRequestItem destItem)
sourceItem
- The purchase order item from which we're getting the unit price, catalog number and description to be set in the destItem.destItem
- The payment request item to which we're setting the unit price, catalog number and description.protected void updateEncumberances(PaymentRequestItem preqItem, PurchaseOrderItem poItem, CreditMemoItem cmItem)
preqItem
- The payment request item from which we're obtaining the item quantity, unit price and extended price.poItem
- The purchase order item from which we're obtaining the invoice total quantity, unit price and invoice total amount.cmItem
- The credit memo item whose invoice total quantity, unit price and extended price are to be updated.protected void updateEncumberance(PurchaseOrderItem purchaseOrderItem, CreditMemoItem cmItem)
purchaseOrderItem
- The purchase order item from which we're obtaining the invoice total quantity, unit price and invoice total amount.cmItem
- The credit memo item whose invoice total quantity, unit price and extended price are to be updated.public boolean purchaseOrderItemEligibleForPayment(PurchaseOrderItem poi)
AccountsPayableService
purchaseOrderItemEligibleForPayment
in interface AccountsPayableService
poi
- The purchase order item whose eligibility for payment is to be determined.AccountsPayableService.purchaseOrderItemEligibleForPayment(org.kuali.ole.module.purap.businessobject.PurchaseOrderItem)
public boolean canCopyAccountingLinesWithZeroAmount()
AccountsPayableService
canCopyAccountingLinesWithZeroAmount
in interface AccountsPayableService
AccountsPayableService.canCopyAccountingLinesWithZeroAmount()
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.