@Transactional public class PaymentRequestServiceImpl extends Object implements PaymentRequestService
Modifier and Type | Field and Description |
---|---|
protected AccountsPayableService |
accountsPayableService |
protected BankService |
bankService |
protected org.kuali.rice.krad.service.BusinessObjectService |
businessObjectService |
protected org.kuali.rice.core.api.config.property.ConfigurationService |
configurationService |
protected boolean |
currencyTypeIndicator |
protected org.kuali.rice.kns.service.DataDictionaryService |
dataDictionaryService |
protected org.kuali.rice.core.api.datetime.DateTimeService |
dateTimeService |
protected org.kuali.rice.krad.service.DocumentService |
documentService |
protected FinancialSystemWorkflowHelperService |
financialSystemWorkflowHelperService |
protected org.kuali.rice.krad.service.KualiRuleService |
kualiRuleService |
protected NegativePaymentRequestApprovalLimitService |
negativePaymentRequestApprovalLimitService |
protected org.kuali.rice.krad.service.NoteService |
noteService |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
parameterService |
protected PaymentRequestDao |
paymentRequestDao |
protected PurapAccountingService |
purapAccountingService |
protected PurapService |
purapService |
protected PurApWorkflowIntegrationService |
purapWorkflowIntegrationService |
protected PurchaseOrderService |
purchaseOrderService |
protected UniversityDateService |
universityDateService |
protected VendorService |
vendorService |
protected org.kuali.rice.krad.workflow.service.WorkflowDocumentService |
workflowDocumentService |
Constructor and Description |
---|
PaymentRequestServiceImpl() |
Modifier and Type | Method and Description |
---|---|
PaymentRequestDocument |
addHoldOnPaymentRequest(PaymentRequestDocument document,
String note)
Marks a payment request on hold.
|
protected PurApAccountingLine |
addTaxAccountingLine(PurApItem taxItem,
BigDecimal taxableAmount)
Generates a PurAP accounting line and adds to the specified tax item.
|
protected PurApItem |
addTaxItem(PaymentRequestDocument preq,
String itemTypeCode,
BigDecimal taxableAmount)
Generates a NRA tax item and adds to the specified payment request, according to the specified item type code.
|
boolean |
allowBackpost(PaymentRequestDocument paymentRequestDocument)
Payment Requests created in the previous fiscal year get backdated if we're at the beginning of the new fiscal year (i.e.
|
boolean |
autoApprovePaymentRequest(PaymentRequestDocument doc) |
boolean |
autoApprovePaymentRequest(PaymentRequestDocument doc,
org.kuali.rice.core.api.util.type.KualiDecimal defaultMinimumLimit)
NOTE: in the event of auto-approval failure, this method may throw a RuntimeException, indicating to Spring transactional
management that the transaction should be rolled back.
|
boolean |
autoApprovePaymentRequest(String docNumber,
org.kuali.rice.core.api.util.type.KualiDecimal defaultMinimumLimit)
NOTE: in the event of auto-approval failure, this method may throw a RuntimeException, indicating to Spring transactional
management that the transaction should be rolled back.
|
boolean |
autoApprovePaymentRequests()
Retrieve a list of PREQs that aren't approved, check to see if they match specific requirements, then auto-approve them if
possible.
|
protected void |
calculateDiscount(PaymentRequestDocument paymentRequestDocument)
Calculates the discount item for this paymentRequest.
|
Date |
calculatePayDate(Date invoiceDate,
PaymentTermType terms)
Calculate based on the terms and calculate a date 10 days from today.
|
void |
calculatePaymentRequest(PaymentRequestDocument paymentRequest,
boolean updateDiscount)
Recalculate the payment request.
|
void |
calculateTaxArea(PaymentRequestDocument preq)
Performs calculations on the tax edit area, generates and adds NRA tax charge items as below the line items, with their accounting lines;
the calculation will activate updates on the account summary tab and the general ledger entries as well.
|
void |
cancelExtractedPaymentRequest(PaymentRequestDocument paymentRequest,
String note)
Cancels a PREQ that has already been extracted if allowed.
|
void |
changeVendor(PaymentRequestDocument preq,
Integer headerId,
Integer detailId)
Changes the current vendor to the vendor passed in.
|
protected void |
clearRequestCancelFields(PaymentRequestDocument document)
Clears the request cancel fields.
|
void |
clearTax(PaymentRequestDocument document)
Clears tax info.
|
String |
createPreqDocumentDescription(Integer purchaseOrderIdentifier,
String vendorName)
A method to create the description for the payment request document.
|
protected void |
distributeAccounting(PaymentRequestDocument paymentRequestDocument)
Distributes accounts for a payment request document.
|
boolean |
encumberedItemExistsForInvoicing(PurchaseOrderDocument document) |
protected Collection<PaymentRequestDocument> |
filterPaymentRequestByAppDocStatus(Collection<PaymentRequestDocument> paymentRequestDocuments,
String... appDocStatus)
Wrapper class to the filterPaymentRequestByAppDocStatus
This class first extract the payment request document numbers from the Payment Request Collections,
then perform the filterPaymentRequestByAppDocStatus function.
|
protected Iterator<PaymentRequestDocument> |
filterPaymentRequestByAppDocStatus(Iterator<PaymentRequestDocument> paymentRequestIterator,
String... appDocStatus)
Wrapper class to the filterPaymentRequestByAppDocStatus (Collection
|
protected List<String> |
filterPaymentRequestByAppDocStatus(List<String> lookupDocNumbers,
String... appDocStatus)
Since PaymentRequest does not have the app doc status, perform an additional lookup
through doc search by using list of PaymentRequest Doc numbers.
|
protected PaymentRequestItem |
findDiscountItem(PaymentRequestDocument paymentRequestDocument)
Finds the discount item of the payment request document.
|
protected PaymentRequestItem |
findFullOrderDiscountItem(PaymentRequestDocument paymentRequestDocument)
Finds the full order discount item of the payment request document.
|
void |
generateGLEntriesCreateAccountsPayableDocument(AccountsPayableDocument apDocument)
The given document here actually needs to be a Payment Request.
|
AccountsPayableService |
getAccountsPayableService()
Gets the accountsPayableService attribute.
|
Collection<PaymentRequestDocument> |
getImmediatePaymentRequestsToExtract(String chartCode)
Get all the payment requests that are immediate and need to be extracted to PDP.
|
protected org.kuali.rice.core.api.util.type.KualiDecimal |
getMinimumLimitAmount(Collection<NegativePaymentRequestApprovalLimit> limits,
org.kuali.rice.core.api.util.type.KualiDecimal minimumAmount)
This method iterates a collection of negative payment request approval limits and returns the minimum of a given minimum
amount and the least among the limits in the collection.
|
static OlePurapService |
getOlePurapService() |
PaymentRequestDocument |
getPaymentRequestByDocumentNumber(String documentNumber)
Obtains the payment request document given the document number.
|
PaymentRequestDocument |
getPaymentRequestById(Integer poDocId)
Obtains the payment request document given the purapDocumentIdentifier.
|
List<PaymentRequestDocument> |
getPaymentRequestsByPOIdInvoiceAmountInvoiceDate(Integer poId,
org.kuali.rice.core.api.util.type.KualiDecimal invoiceAmount,
Date invoiceDate)
Obtains a list of payment request documents given the purchase order id, the invoice amount
and the invoice date.
|
List<PaymentRequestDocument> |
getPaymentRequestsByPurchaseOrderId(Integer poDocId)
Obtains a list of payment request documents given the purchase order id.
|
List |
getPaymentRequestsByVendorNumber(Integer vendorHeaderGeneratedId,
Integer vendorDetailAssignedId)
Retrieves a list of payment request documents with the given vendor id and invoice number.
|
List |
getPaymentRequestsByVendorNumberInvoiceNumber(Integer vendorHeaderGeneratedId,
Integer vendorDetailAssignedId,
String invoiceNumber)
Retrieves a list of payment request documents with the given vendor id and invoice number.
|
Collection<PaymentRequestDocument> |
getPaymentRequestsToExtract(Date onOrBeforePaymentRequestPayDate)
Get all the payment requests that need to be extracted.
|
Collection<PaymentRequestDocument> |
getPaymentRequestsToExtractByCM(String campusCode,
VendorCreditMemoDocument cmd)
Deprecated.
|
Collection<PaymentRequestDocument> |
getPaymentRequestsToExtractByVendor(String campusCode,
VendorGroupingHelper vendor,
Date onOrBeforePaymentRequestPayDate)
Get all the payment requests that match a vendor.
|
Collection<PaymentRequestDocument> |
getPaymentRequestsToExtractSpecialPayments(String chartCode,
Date onOrBeforePaymentRequestPayDate)
Get all the special payment requests for a single chart that need to be extracted.
|
Collection<PaymentRequestDocument> |
getPaymentRequestToExtractByChart(String chartCode,
Date onOrBeforePaymentRequestPayDate)
Get all the regular payment requests for a single campus.
|
org.kuali.rice.kim.api.identity.Person |
getPersonForCancel(AccountsPayableDocument apDoc) |
boolean |
hasActivePaymentRequestsForPurchaseOrder(Integer purchaseOrderIdentifier)
Determines if there are active payment requests for a purchase order.
|
boolean |
hasDiscountItem(PaymentRequestDocument preq)
This method specifies whether the payment request document has a discount item.
|
protected boolean |
isBeingAdHocRouted(PaymentRequestDocument document) |
protected boolean |
isEligibleForAutoApproval(PaymentRequestDocument document,
org.kuali.rice.core.api.util.type.KualiDecimal defaultMinimumLimit)
Determines whether or not a payment request document can be automatically approved.
|
boolean |
isExtracted(PaymentRequestDocument document)
Returns true if the payment request has been extracted
|
boolean |
isInvoiceDateAfterToday(Date invoiceDate)
Determines whether the invoice date is after today.
|
boolean |
isPurchaseOrderValidForPaymentRequestDocumentCreation(PaymentRequestDocument paymentRequestDocument,
PurchaseOrderDocument po) |
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(PaymentRequestDocument pr,
Date processDate)
Mark a payment request as being paid and set the payment request's paid date as the processDate.
|
HashMap<String,String> |
paymentRequestDuplicateMessages(PaymentRequestDocument document)
Performs the processing to check whether the payment request is a duplicate and if so, adds
the information about the type of duplication into the resulting HashMap to be returned by this method.
|
protected void |
paymentTermsDateCalculation(String dueTypeDescription,
Calendar invoicedDateCalendar,
Integer dueNumber)
Calculates the paymentTermsDate given the dueTypeDescription, invoicedDateCalendar and the dueNumber.
|
boolean |
poItemEligibleForAp(AccountsPayableDocument apDoc,
PurchaseOrderItem poi) |
void |
populateAndSavePaymentRequest(PaymentRequestDocument preq)
Populate and save payment request.
|
void |
populatePaymentRequest(PaymentRequestDocument paymentRequestDocument)
Populate payment request.
|
void |
processPaymentRequestInReceivingStatus() |
PaymentRequestDocument |
removeHoldOnPaymentRequest(PaymentRequestDocument document,
String note)
Removes a hold on a payment request.
|
void |
removeIneligibleAdditionalCharges(PaymentRequestDocument document)
Removes additional charge items that are not eligible on the payment request document.
|
void |
removeRequestCancelOnPaymentRequest(PaymentRequestDocument document,
String note)
Removes a request cancel on payment request.
|
protected void |
removeTaxItems(PaymentRequestDocument preq)
Removes all existing NRA tax items from the specified payment request.
|
void |
requestCancelOnPaymentRequest(PaymentRequestDocument document,
String note)
Marks a payment request as requested to be canceled.
|
void |
resetExtractedPaymentRequest(PaymentRequestDocument paymentRequest,
String note)
Resets a Payment Request that had an associated Payment Request or Credit Memo cancelled externally.
|
protected Date |
returnLaterDate(Calendar invoicedDateCalendar,
Calendar processedDateCalendar)
Returns whichever date is later, the invoicedDateCalendar or the processedDateCalendar.
|
void |
setAccountsPayableService(AccountsPayableService accountsPayableService) |
void |
setBankService(BankService bankService) |
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService) |
void |
setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService) |
void |
setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService) |
void |
setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService) |
void |
setDocumentService(org.kuali.rice.krad.service.DocumentService documentService) |
void |
setFinancialSystemWorkflowHelperService(FinancialSystemWorkflowHelperService financialSystemWorkflowHelperService) |
void |
setKualiRuleService(org.kuali.rice.krad.service.KualiRuleService kualiRuleService) |
void |
setNegativePaymentRequestApprovalLimitService(NegativePaymentRequestApprovalLimitService negativePaymentRequestApprovalLimitService) |
void |
setNoteService(org.kuali.rice.krad.service.NoteService noteService) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService) |
void |
setPaymentRequestDao(PaymentRequestDao paymentRequestDao) |
void |
setPurapAccountingService(PurapAccountingService purapAccountingService) |
void |
setPurapService(PurapService purapService) |
void |
setPurapWorkflowIntegrationService(PurApWorkflowIntegrationService purapWorkflowIntegrationService) |
void |
setPurchaseOrderService(PurchaseOrderService purchaseOrderService) |
void |
setUniversityDateService(UniversityDateService universityDateService) |
protected void |
setVendorAddress(VendorAddress va,
PaymentRequestDocument preq)
Set the Vendor address of the given ID.
|
void |
setVendorService(VendorService vendorService) |
void |
setWorkflowDocumentService(org.kuali.rice.krad.workflow.service.WorkflowDocumentService workflowDocumentService) |
boolean |
shouldPurchaseOrderBeReversed(AccountsPayableDocument apDoc)
If the full document entry has been completed and the status of the related purchase order document is closed, return true,
otherwise return false.
|
void |
takePurchaseOrderCancelAction(AccountsPayableDocument apDoc) |
String |
updateStatusByNode(String currentNodeName,
AccountsPayableDocument apDoc) |
protected String |
updateStatusByNode(String currentNodeName,
PaymentRequestDocument preqDoc)
Updates the status of the payment request document.
|
protected org.kuali.rice.core.api.datetime.DateTimeService dateTimeService
protected org.kuali.rice.krad.service.DocumentService documentService
protected org.kuali.rice.krad.service.NoteService noteService
protected PurapService purapService
protected PaymentRequestDao paymentRequestDao
protected org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected org.kuali.rice.core.api.config.property.ConfigurationService configurationService
protected NegativePaymentRequestApprovalLimitService negativePaymentRequestApprovalLimitService
protected PurapAccountingService purapAccountingService
protected org.kuali.rice.krad.service.BusinessObjectService businessObjectService
protected PurApWorkflowIntegrationService purapWorkflowIntegrationService
protected org.kuali.rice.krad.workflow.service.WorkflowDocumentService workflowDocumentService
protected AccountsPayableService accountsPayableService
protected VendorService vendorService
protected org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService
protected UniversityDateService universityDateService
protected BankService bankService
protected PurchaseOrderService purchaseOrderService
protected FinancialSystemWorkflowHelperService financialSystemWorkflowHelperService
protected org.kuali.rice.krad.service.KualiRuleService kualiRuleService
protected boolean currencyTypeIndicator
public PaymentRequestServiceImpl()
public static OlePurapService getOlePurapService()
@Deprecated public Collection<PaymentRequestDocument> getPaymentRequestsToExtractByCM(String campusCode, VendorCreditMemoDocument cmd)
getPaymentRequestsToExtractByCM
in interface PaymentRequestService
cmd
- The credit memo document to be used to obtain the payment requests.PaymentRequestService.getPaymentRequestsToExtractByCM(java.lang.String, org.kuali.ole.module.purap.document.VendorCreditMemoDocument)
public Collection<PaymentRequestDocument> getPaymentRequestsToExtractByVendor(String campusCode, VendorGroupingHelper vendor, Date onOrBeforePaymentRequestPayDate)
PaymentRequestService
getPaymentRequestsToExtractByVendor
in interface PaymentRequestService
onOrBeforePaymentRequestPayDate
- only payment requests with a pay date on or before this date will be extractedPaymentRequestService.getPaymentRequestsToExtractByVendor(java.lang.String,
org.kuali.ole.module.purap.util.VendorGroupingHelper, java.sql.Date)
public Collection<PaymentRequestDocument> getPaymentRequestsToExtract(Date onOrBeforePaymentRequestPayDate)
PaymentRequestService
getPaymentRequestsToExtract
in interface PaymentRequestService
org.kuali.module.purap.server.PaymentRequestService.getPaymentRequestsToExtract(Date)
public Collection<PaymentRequestDocument> getPaymentRequestsToExtractSpecialPayments(String chartCode, Date onOrBeforePaymentRequestPayDate)
PaymentRequestService
getPaymentRequestsToExtractSpecialPayments
in interface PaymentRequestService
chartCode
- The chart code to be used as one of the criterias to retrieve the payment request documents.PaymentRequestService.getPaymentRequestsToExtractSpecialPayments(java.lang.String,
java.sql.Date)
public Collection<PaymentRequestDocument> getImmediatePaymentRequestsToExtract(String chartCode)
PaymentRequestService
getImmediatePaymentRequestsToExtract
in interface PaymentRequestService
chartCode
- The chart code to be used as one of the criterias to retrieve the payment request documents.PaymentRequestService.getImmediatePaymentRequestsToExtract(java.lang.String)
public Collection<PaymentRequestDocument> getPaymentRequestToExtractByChart(String chartCode, Date onOrBeforePaymentRequestPayDate)
PaymentRequestService
getPaymentRequestToExtractByChart
in interface PaymentRequestService
chartCode
- The chart code to be used as one of the criterias to retrieve the payment request documents.PaymentRequestService.getPaymentRequestToExtractByChart(java.lang.String,
java.sql.Date)
public boolean autoApprovePaymentRequests()
PaymentRequestService
autoApprovePaymentRequests
in interface PaymentRequestService
org.kuali.ole.module.purap.document.service.PaymentRequestService.autoApprovePaymentRequests()
public boolean autoApprovePaymentRequest(String docNumber, org.kuali.rice.core.api.util.type.KualiDecimal defaultMinimumLimit)
autoApprovePaymentRequest
in interface PaymentRequestService
docNumber
- The payment request document number (not the payment request ID) to be auto approved.defaultMinimumLimit
- The default minimum limit amount to be used in determining the eligibility of the document to be auto approved.PaymentRequestService.autoApprovePaymentRequest(java.lang.String,
org.kuali.rice.core.api.util.type.KualiDecimal)
public boolean autoApprovePaymentRequest(PaymentRequestDocument doc, org.kuali.rice.core.api.util.type.KualiDecimal defaultMinimumLimit)
autoApprovePaymentRequest
in interface PaymentRequestService
doc
- The payment request document to be auto approved.defaultMinimumLimit
- The default minimum limit amount to be used in determining the eligibility of the document to be auto approved.PaymentRequestService.autoApprovePaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument,
org.kuali.rice.core.api.util.type.KualiDecimal)
public boolean autoApprovePaymentRequest(PaymentRequestDocument doc)
autoApprovePaymentRequest
in interface PaymentRequestService
protected boolean isEligibleForAutoApproval(PaymentRequestDocument document, org.kuali.rice.core.api.util.type.KualiDecimal defaultMinimumLimit)
document
- The payment request document to be determined whether it can be automatically approved.defaultMinimumLimit
- The amount to be used as the minimum amount if no limit was found or the default is less than the
limit.protected org.kuali.rice.core.api.util.type.KualiDecimal getMinimumLimitAmount(Collection<NegativePaymentRequestApprovalLimit> limits, org.kuali.rice.core.api.util.type.KualiDecimal minimumAmount)
limits
- The collection of NegativePaymentRequestApprovalLimit to be used in determining the minimum limit amount.minimumAmount
- The amount to be compared with the collection of NegativePaymentRequestApprovalLimit to determine the
minimum limit amount.public List getPaymentRequestsByVendorNumber(Integer vendorHeaderGeneratedId, Integer vendorDetailAssignedId)
getPaymentRequestsByVendorNumber
in interface PaymentRequestService
vendorHeaderGeneratedId
- The vendor header generated id.vendorDetailAssignedId
- The vendor detail assigned id.invoiceNumber
- The invoice number as entered by AP.public List getPaymentRequestsByVendorNumberInvoiceNumber(Integer vendorHeaderGeneratedId, Integer vendorDetailAssignedId, String invoiceNumber)
getPaymentRequestsByVendorNumberInvoiceNumber
in interface PaymentRequestService
vendorHeaderGeneratedId
- The vendor header generated id.vendorDetailAssignedId
- The vendor detail assigned id.invoiceNumber
- The invoice number as entered by AP.public HashMap<String,String> paymentRequestDuplicateMessages(PaymentRequestDocument document)
PaymentRequestService
paymentRequestDuplicateMessages
in interface PaymentRequestService
document
- The payment request document to be processed/checked for duplicates.PaymentRequestService.paymentRequestDuplicateMessages(org.kuali.ole.module.purap.document.PaymentRequestDocument)
public PaymentRequestDocument getPaymentRequestByDocumentNumber(String documentNumber)
PaymentRequestService
getPaymentRequestByDocumentNumber
in interface PaymentRequestService
documentNumber
- The document number to be used to obtain the payment request document.PaymentRequestService.getPaymentRequestByDocumentNumber(java.lang.String)
public PaymentRequestDocument getPaymentRequestById(Integer poDocId)
PaymentRequestService
getPaymentRequestById
in interface PaymentRequestService
poDocId
- The purapDocumentIdentifier of the payment request document to be obtained.PaymentRequestService.getPaymentRequestById(java.lang.Integer)
public List<PaymentRequestDocument> getPaymentRequestsByPurchaseOrderId(Integer poDocId)
PaymentRequestService
getPaymentRequestsByPurchaseOrderId
in interface PaymentRequestService
poDocId
- The purchase order id to be used to obtain a list of payment request documents.PaymentRequestService.getPaymentRequestsByPurchaseOrderId(java.lang.Integer)
public List<PaymentRequestDocument> getPaymentRequestsByPOIdInvoiceAmountInvoiceDate(Integer poId, org.kuali.rice.core.api.util.type.KualiDecimal invoiceAmount, Date invoiceDate)
PaymentRequestService
getPaymentRequestsByPOIdInvoiceAmountInvoiceDate
in interface PaymentRequestService
poId
- The purchase order id used to obtain the payment request documents.invoiceAmount
- The invoice amount used to obtain the payment request documents.invoiceDate
- The invoice date used to obtain the payment request documents.PaymentRequestService.getPaymentRequestsByPOIdInvoiceAmountInvoiceDate(java.lang.Integer,
org.kuali.rice.core.api.util.type.KualiDecimal, java.sql.Date)
public boolean isInvoiceDateAfterToday(Date invoiceDate)
PaymentRequestService
isInvoiceDateAfterToday
in interface PaymentRequestService
invoiceDate
- The invoice date to be determined whether it's after today.PaymentRequestService.isInvoiceDateAfterToday(java.sql.Date)
public Date calculatePayDate(Date invoiceDate, PaymentTermType terms)
PaymentRequestService
calculatePayDate
in interface PaymentRequestService
invoiceDate
- The invoice date to be used in the pay date calculation.terms
- The payment term type to be used in the pay date calculation.PaymentRequestService.calculatePayDate(java.sql.Date,
org.kuali.ole.vnd.businessobject.PaymentTermType)
protected Date returnLaterDate(Calendar invoicedDateCalendar, Calendar processedDateCalendar)
invoicedDateCalendar
- One of the dates to be used in determining which date is later.processedDateCalendar
- The other date to be used in determining which date is later.protected void paymentTermsDateCalculation(String dueTypeDescription, Calendar invoicedDateCalendar, Integer dueNumber)
dueTypeDescription
- The due type description of the payment term.invoicedDateCalendar
- The Calendar object of the invoice date.discountDueNumber
- Either the vendorDiscountDueNumber or the vendorDiscountDueNumber of the payment term.public void calculatePaymentRequest(PaymentRequestDocument paymentRequest, boolean updateDiscount)
PaymentRequestService
calculatePaymentRequest
in interface PaymentRequestService
paymentRequest
- The payment request document to be calculated.updateDiscount
- boolean true if we also want to calculate the discount items for the payment request.PaymentRequestService.calculatePaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument,
boolean)
protected void calculateDiscount(PaymentRequestDocument paymentRequestDocument)
paymentRequestDocument
- The payment request document whose discount to be calculated.public void clearTax(PaymentRequestDocument document)
PaymentRequestService
clearTax
in interface PaymentRequestService
document
- The disbursement voucher document being modified.public void calculateTaxArea(PaymentRequestDocument preq)
PaymentRequestService
calculateTaxArea
in interface PaymentRequestService
preq
- The payment request the NRA tax lines will be added to.PaymentRequestService.calculateTaxArea(org.kuali.ole.module.purap.document.PaymentRequestDocument)
protected void removeTaxItems(PaymentRequestDocument preq)
preq
- The payment request from which all tax items are to be removed.protected PurApItem addTaxItem(PaymentRequestDocument preq, String itemTypeCode, BigDecimal taxableAmount)
preq
- The payment request the tax item will be added to.itemTypeCode
- The item type code for the tax item.taxableAmount
- The amount to which tax is computed against.protected PurApAccountingLine addTaxAccountingLine(PurApItem taxItem, BigDecimal taxableAmount)
taxItem
- The specified tax item the accounting line will be associated with.taxableAmount
- The amount to which tax is computed against.protected PaymentRequestItem findDiscountItem(PaymentRequestDocument paymentRequestDocument)
paymentRequestDocument
- The payment request document to be used to find the discount item.protected PaymentRequestItem findFullOrderDiscountItem(PaymentRequestDocument paymentRequestDocument)
paymentRequestDocument
- The payment request document to be used to find the full order discount item.protected void distributeAccounting(PaymentRequestDocument paymentRequestDocument)
paymentRequestDocument
- public PaymentRequestDocument addHoldOnPaymentRequest(PaymentRequestDocument document, String note) throws Exception
PaymentRequestService
addHoldOnPaymentRequest
in interface PaymentRequestService
document
- The payment request document to be marked as on hold.note
- The note to be added to the payment request document while being marked as on hold.Exception
PaymentRequestService.addHoldOnPaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument,
java.lang.String)
public PaymentRequestDocument removeHoldOnPaymentRequest(PaymentRequestDocument document, String note) throws Exception
PaymentRequestService
removeHoldOnPaymentRequest
in interface PaymentRequestService
document
- The payment request document whose hold is to be removed.note
- The note to be added to the payment request document while its hold is being removed.Exception
org.kuali.ole.module.purap.document.service.PaymentRequestService#removeHoldOnPaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument)
public void requestCancelOnPaymentRequest(PaymentRequestDocument document, String note) throws Exception
PaymentRequestService
requestCancelOnPaymentRequest
in interface PaymentRequestService
document
- The payment request document to be marked as requested to be canceled.note
- The note to be added to the payment request document while being marked as requested to be canceled.Exception
PaymentRequestService.addHoldOnPaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument,
java.lang.String)
public void removeRequestCancelOnPaymentRequest(PaymentRequestDocument document, String note) throws Exception
PaymentRequestService
removeRequestCancelOnPaymentRequest
in interface PaymentRequestService
document
- The payment request document to be used for request cancel.note
- The note to be added to the payment request document upon the removal of the request cancel.Exception
org.kuali.ole.module.purap.document.service.PaymentRequestService#removeHoldOnPaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument)
protected void clearRequestCancelFields(PaymentRequestDocument document)
document
- The payment request document whose request cancel fields to be cleared.public boolean isExtracted(PaymentRequestDocument document)
PaymentRequestService
isExtracted
in interface PaymentRequestService
document
- The payment request document to be determined whether it is extracted.PaymentRequestService.isExtracted(org.kuali.ole.module.purap.document.PaymentRequestDocument)
protected boolean isBeingAdHocRouted(PaymentRequestDocument document)
public void cancelExtractedPaymentRequest(PaymentRequestDocument paymentRequest, String note)
PaymentRequestService
cancelExtractedPaymentRequest
in interface PaymentRequestService
paymentRequest
- The extracted payment request document to be canceled.note
- The note to be added to the payment request document.PaymentRequestService.cancelExtractedPaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument,
java.lang.String)
public void resetExtractedPaymentRequest(PaymentRequestDocument paymentRequest, String note)
PaymentRequestService
resetExtractedPaymentRequest
in interface PaymentRequestService
paymentRequest
- The extracted payment request document to be resetted.note
- The note to be added to the payment request document upon its reset.PaymentRequestService.resetExtractedPaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument,
java.lang.String)
public void populatePaymentRequest(PaymentRequestDocument paymentRequestDocument)
PaymentRequestService
populatePaymentRequest
in interface PaymentRequestService
paymentRequestDocument
- The payment request document to be populated.PaymentRequestService.populatePaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument)
public String createPreqDocumentDescription(Integer purchaseOrderIdentifier, String vendorName)
PaymentRequestService
createPreqDocumentDescription
in interface PaymentRequestService
purchaseOrderIdentifier
- The purchase order identifier to be used as part of the description.vendorName
- The vendor name to be used as part of the description.PaymentRequestService.createPreqDocumentDescription(java.lang.Integer,
java.lang.String)
public void populateAndSavePaymentRequest(PaymentRequestDocument preq) throws org.kuali.rice.kew.api.exception.WorkflowException
PaymentRequestService
populateAndSavePaymentRequest
in interface PaymentRequestService
preq
- The payment request document to be populated and saved.org.kuali.rice.kew.api.exception.WorkflowException
PaymentRequestService.populateAndSavePaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument)
public boolean shouldPurchaseOrderBeReversed(AccountsPayableDocument apDoc)
shouldPurchaseOrderBeReversed
in interface AccountsPayableDocumentSpecificService
apDoc
- The AccountsPayableDocument to be determined whether its purchase order should be reversed.(org.kuali.ole.module.purap.document.AccountsPayableDocument)
public org.kuali.rice.kim.api.identity.Person getPersonForCancel(AccountsPayableDocument apDoc)
public void takePurchaseOrderCancelAction(AccountsPayableDocument apDoc)
public String updateStatusByNode(String currentNodeName, AccountsPayableDocument apDoc)
protected String updateStatusByNode(String currentNodeName, PaymentRequestDocument preqDoc)
currentNodeName
- The current node name.preqDoc
- The payment request document whose status to be updated.public void markPaid(PaymentRequestDocument pr, Date processDate)
PaymentRequestService
markPaid
in interface PaymentRequestService
pr
- The payment request document to be marked as paid and paid date to be set.processDate
- The date to be set as the payment request's paid date.PaymentRequestService.markPaid(org.kuali.ole.module.purap.document.PaymentRequestDocument,
java.sql.Date)
public boolean hasDiscountItem(PaymentRequestDocument preq)
PaymentRequestService
hasDiscountItem
in interface PaymentRequestService
preq
- The payment request document to be verified whether it has a discount item.PaymentRequestService.hasDiscountItem(org.kuali.ole.module.purap.document.PaymentRequestDocument)
public boolean poItemEligibleForAp(AccountsPayableDocument apDoc, PurchaseOrderItem poi)
public void removeIneligibleAdditionalCharges(PaymentRequestDocument document)
PaymentRequestService
removeIneligibleAdditionalCharges
in interface PaymentRequestService
public void changeVendor(PaymentRequestDocument preq, Integer headerId, Integer detailId)
PaymentRequestService
changeVendor
in interface PaymentRequestService
protected void setVendorAddress(VendorAddress va, PaymentRequestDocument preq)
addressID
- ID of the address to setpr
- PaymentRequest to set inprotected 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 void generateGLEntriesCreateAccountsPayableDocument(AccountsPayableDocument apDocument)
generateGLEntriesCreateAccountsPayableDocument
in interface AccountsPayableDocumentSpecificService
apDocument
- An AccountsPayableDocumentAccountsPayableDocumentSpecificService.generateGLEntriesCreateAccountsPayableDocument(org.kuali.ole.module.purap.document.AccountsPayableDocument)
public boolean hasActivePaymentRequestsForPurchaseOrder(Integer purchaseOrderIdentifier)
PaymentRequestService
hasActivePaymentRequestsForPurchaseOrder
in interface PaymentRequestService
PaymentRequestService.hasActivePaymentRequestsForPurchaseOrder(java.lang.Integer)
protected List<String> filterPaymentRequestByAppDocStatus(List<String> lookupDocNumbers, String... appDocStatus)
lookupDocNumbers
- appDocStatus
- protected Collection<PaymentRequestDocument> filterPaymentRequestByAppDocStatus(Collection<PaymentRequestDocument> paymentRequestDocuments, String... appDocStatus)
paymentRequestDocuments
- appDocStatus
- protected Iterator<PaymentRequestDocument> filterPaymentRequestByAppDocStatus(Iterator<PaymentRequestDocument> paymentRequestIterator, String... appDocStatus)
paymentRequestDocuments
- appDocStatus
- public void processPaymentRequestInReceivingStatus()
processPaymentRequestInReceivingStatus
in interface PaymentRequestService
PaymentRequestService.processPaymentRequestInReceivingStatus()
public boolean allowBackpost(PaymentRequestDocument paymentRequestDocument)
PaymentRequestService
allowBackpost
in interface PaymentRequestService
PaymentRequestService.allowBackpost(org.kuali.ole.module.purap.document.PaymentRequestDocument)
public boolean isPurchaseOrderValidForPaymentRequestDocumentCreation(PaymentRequestDocument paymentRequestDocument, PurchaseOrderDocument po)
isPurchaseOrderValidForPaymentRequestDocumentCreation
in interface PaymentRequestService
public boolean encumberedItemExistsForInvoicing(PurchaseOrderDocument document)
encumberedItemExistsForInvoicing
in interface PaymentRequestService
public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
public void setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService)
public void setDocumentService(org.kuali.rice.krad.service.DocumentService documentService)
public void setNoteService(org.kuali.rice.krad.service.NoteService noteService)
public void setPurapService(PurapService purapService)
public void setPaymentRequestDao(PaymentRequestDao paymentRequestDao)
public void setNegativePaymentRequestApprovalLimitService(NegativePaymentRequestApprovalLimitService negativePaymentRequestApprovalLimitService)
public void setPurapAccountingService(PurapAccountingService purapAccountingService)
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
public void setPurapWorkflowIntegrationService(PurApWorkflowIntegrationService purapWorkflowIntegrationService)
public void setWorkflowDocumentService(org.kuali.rice.krad.workflow.service.WorkflowDocumentService workflowDocumentService)
public void setAccountsPayableService(AccountsPayableService accountsPayableService)
public void setVendorService(VendorService vendorService)
public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
public void setUniversityDateService(UniversityDateService universityDateService)
public void setBankService(BankService bankService)
public void setPurchaseOrderService(PurchaseOrderService purchaseOrderService)
public void setFinancialSystemWorkflowHelperService(FinancialSystemWorkflowHelperService financialSystemWorkflowHelperService)
public void setKualiRuleService(org.kuali.rice.krad.service.KualiRuleService kualiRuleService)
public AccountsPayableService getAccountsPayableService()
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.