@Transactional public class InvoiceServiceImpl extends Object implements InvoiceService
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 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 InvoiceDao |
invoiceDao |
protected org.kuali.rice.krad.service.KualiRuleService |
kualiRuleService |
protected NegativeInvoiceApprovalLimitService |
negativeInvoiceApprovalLimitService |
protected org.kuali.rice.krad.service.NoteService |
noteService |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
parameterService |
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 |
---|
InvoiceServiceImpl() |
Modifier and Type | Method and Description |
---|---|
InvoiceDocument |
addHoldOnInvoice(InvoiceDocument document,
String note)
Marks a invoice on hold.
|
protected PurApAccountingLine |
addTaxAccountingLine(PurApItem taxItem,
BigDecimal taxableAmount)
Generates a PurAP accounting line and adds to the specified tax item.
|
protected PurApItem |
addTaxItem(InvoiceDocument prqs,
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(InvoiceDocument invoiceDocument)
Invoices created in the previous fiscal year get backdated if we're at the beginning of the new fiscal year (i.e.
|
boolean |
autoApproveInvoice(InvoiceDocument 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 |
autoApproveInvoice(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 |
autoApproveInvoices()
Retrieve a list of PREQs that aren't approved, check to see if they match specific requirements, then auto-approve them if
possible.
|
boolean |
autoApprovePaymentRequest(PaymentRequestDocument doc)
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)
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.
|
protected void |
calculateDiscount(InvoiceDocument invoiceDocument)
Calculates the discount item for this invoice.
|
void |
calculateInvoice(InvoiceDocument invoice,
boolean updateDiscount)
Recalculate the invoice.
|
Date |
calculatePayDate(Date invoiceDate,
PaymentTermType terms)
Calculate based on the terms and calculate a date 10 days from today.
|
void |
calculateTaxArea(InvoiceDocument prqs)
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 |
cancelExtractedInvoice(InvoiceDocument invoice,
String note)
Cancels a PREQ that has already been extracted if allowed.
|
void |
changeVendor(InvoiceDocument prqs,
Integer headerId,
Integer detailId)
Changes the current vendor to the vendor passed in.
|
protected void |
clearRequestCancelFields(InvoiceDocument document)
Clears the request cancel fields.
|
void |
clearTax(InvoiceDocument document)
Clears tax info.
|
String |
createPreqDocumentDescription(Integer purchaseOrderIdentifier,
String vendorName)
A method to create the description for the invoice document.
|
protected void |
distributeAccounting(InvoiceDocument invoiceDocument)
Distributes accounts for a payment request document.
|
boolean |
encumberedItemExistsForInvoicing(PurchaseOrderDocument document) |
protected Collection<InvoiceDocument> |
filterInvoiceByAppDocStatus(Collection<InvoiceDocument> invoiceDocuments,
String... appDocStatus)
Wrapper class to the filterInvoiceByAppDocStatus
This class first extract the payment request document numbers from the Invoice Collections,
then perform the filterInvoiceByAppDocStatus function.
|
protected Iterator<InvoiceDocument> |
filterInvoiceByAppDocStatus(Iterator<InvoiceDocument> invoiceIterator,
String... appDocStatus)
Wrapper class to the filterInvoiceByAppDocStatus (Collection
|
protected List<String> |
filterInvoiceByAppDocStatus(List<String> lookupDocNumbers,
String... appDocStatus)
Since Invoice does not have the app doc status, perform an additional lookup
through doc search by using list of Invoice Doc numbers.
|
protected InvoiceItem |
findDiscountItem(InvoiceDocument invoiceDocument)
Finds the discount item of the payment request document.
|
protected InvoiceItem |
findFullOrderDiscountItem(InvoiceDocument invoiceDocument)
Finds the full order discount item of the payment request document.
|
void |
generateGLEntriesCreateAccountsPayableDocument(AccountsPayableDocument apDocument)
The given document here actually needs to be a Invoice.
|
AccountsPayableService |
getAccountsPayableService()
Gets the accountsPayableService attribute.
|
Collection<InvoiceDocument> |
getImmediateInvoicesToExtract(String chartCode)
Get all the invoices that are immediate and need to be extracted to PDP.
|
InvoiceDocument |
getInvoiceByDocumentNumber(String documentNumber)
Obtains the invoice document given the document number.
|
InvoiceDocument |
getInvoiceById(Integer poDocId)
Obtains the invoice document given the purapDocumentIdentifier.
|
List<InvoiceDocument> |
getInvoicesByPOIdInvoiceAmountInvoiceDate(Integer poId,
org.kuali.rice.core.api.util.type.KualiDecimal invoiceAmount,
Date invoiceDate)
Obtains a list of invoice documents given the purchase order id, the invoice amount
and the invoice date.
|
List<InvoiceDocument> |
getInvoicesByPurchaseOrderId(Integer poDocId)
Obtains a list of invoice documents given the purchase order id.
|
List |
getInvoicesByVendorNumber(Integer vendorHeaderGeneratedId,
Integer vendorDetailAssignedId)
Retrieves a list of payment request documents with the given vendor id and invoice number.
|
List |
getInvoicesByVendorNumberInvoiceNumber(Integer vendorHeaderGeneratedId,
Integer vendorDetailAssignedId,
String invoiceNumber)
Retrieves a list of payment request documents with the given vendor id and invoice number.
|
Collection<InvoiceDocument> |
getInvoicesToExtract(Date onOrBeforeInvoicePayDate)
Get all the invoices that need to be extracted.
|
Collection<InvoiceDocument> |
getInvoicesToExtractByCM(String campusCode,
VendorCreditMemoDocument cmd)
Deprecated.
|
Collection<InvoiceDocument> |
getInvoicesToExtractByVendor(String campusCode,
VendorGroupingHelper vendor,
Date onOrBeforeInvoicePayDate)
Get all the invoices that match a vendor.
|
Collection<InvoiceDocument> |
getInvoicesToExtractSpecialPayments(String chartCode,
Date onOrBeforeInvoicePayDate)
Get all the special invoices for a single chart that need to be extracted.
|
Collection<InvoiceDocument> |
getInvoiceToExtractByChart(String chartCode,
Date onOrBeforeInvoicePayDate)
Get all the regular invoices for a single campus.
|
protected org.kuali.rice.core.api.util.type.KualiDecimal |
getMinimumLimitAmount(Collection<NegativeInvoiceApprovalLimit> 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.
|
String |
getParameter(String namespaceCode,
String componentCode,
String parameterName) |
boolean |
getParameterBoolean(String namespaceCode,
String componentCode,
String parameterName) |
org.kuali.rice.kim.api.identity.Person |
getPersonForCancel(AccountsPayableDocument apDoc) |
boolean |
hasActiveInvoicesForPurchaseOrder(Integer purchaseOrderIdentifier)
Determines if there are active invoices for a purchase order.
|
boolean |
hasDiscountItem(InvoiceDocument prqs)
This method specifies whether the invoice document has a discount item.
|
HashMap<String,String> |
invoiceDuplicateMessages(InvoiceDocument document)
Performs the processing to check whether the invoice 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 boolean |
isBeingAdHocRouted(InvoiceDocument document) |
protected boolean |
isEligibleForAutoApproval(InvoiceDocument document,
org.kuali.rice.core.api.util.type.KualiDecimal defaultMinimumLimit)
Determines whether or not a payment request document can be automatically approved.
|
boolean |
isExtracted(InvoiceDocument document)
Returns true if the invoice has been extracted
|
boolean |
isInvoiceDateAfterToday(Date invoiceDate)
Determines whether the invoice date is after today.
|
boolean |
isPurchaseOrderValidForInvoiceDocumentCreation(InvoiceDocument invoiceDocument,
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(InvoiceDocument pr,
Date processDate)
Mark a invoice as being paid and set the invoice's paid date as the processDate.
|
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 |
populateAndSaveInvoice(InvoiceDocument prqs)
Populate and save invoice.
|
void |
processInvoiceInReceivingStatus() |
InvoiceDocument |
removeHoldOnInvoice(InvoiceDocument document,
String note)
Removes a hold on a invoice.
|
void |
removeIneligibleAdditionalCharges(InvoiceDocument document)
Removes additional charge items that are not eligible on the invoice document.
|
void |
removeRequestCancelOnInvoice(InvoiceDocument document,
String note)
Removes a request cancel on invoice.
|
protected void |
removeTaxItems(InvoiceDocument prqs)
Removes all existing NRA tax items from the specified payment request.
|
void |
requestCancelOnInvoice(InvoiceDocument document,
String note)
Marks a invoice as requested to be canceled.
|
void |
resetExtractedInvoice(InvoiceDocument invoice,
String note)
Resets a Invoice that had an associated Invoice 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 |
setInvoiceDao(InvoiceDao invoiceDao) |
void |
setKualiRuleService(org.kuali.rice.krad.service.KualiRuleService kualiRuleService) |
void |
setNegativeInvoiceApprovalLimitService(NegativeInvoiceApprovalLimitService negativeInvoiceApprovalLimitService) |
void |
setNoteService(org.kuali.rice.krad.service.NoteService noteService) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService) |
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,
InvoiceDocument inv)
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,
InvoiceDocument prqsDoc)
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 InvoiceDao invoiceDao
protected org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected org.kuali.rice.core.api.config.property.ConfigurationService configurationService
protected NegativeInvoiceApprovalLimitService negativeInvoiceApprovalLimitService
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
public InvoiceServiceImpl()
@Deprecated public Collection<InvoiceDocument> getInvoicesToExtractByCM(String campusCode, VendorCreditMemoDocument cmd)
getInvoicesToExtractByCM
in interface InvoiceService
cmd
- The credit memo document to be used to obtain the invoices.InvoiceService.getInvoicesToExtractByCM(String, org.kuali.ole.module.purap.document.VendorCreditMemoDocument)
public Collection<InvoiceDocument> getInvoicesToExtractByVendor(String campusCode, VendorGroupingHelper vendor, Date onOrBeforeInvoicePayDate)
InvoiceService
getInvoicesToExtractByVendor
in interface InvoiceService
onOrBeforeInvoicePayDate
- only invoices with a pay date on or before this date will be extractedInvoiceService.getInvoicesToExtractByVendor(String,
org.kuali.ole.module.purap.util.VendorGroupingHelper, java.sql.Date)
public Collection<InvoiceDocument> getInvoicesToExtract(Date onOrBeforeInvoicePayDate)
InvoiceService
getInvoicesToExtract
in interface InvoiceService
InvoiceService.getInvoicesToExtract(java.sql.Date)
public Collection<InvoiceDocument> getInvoicesToExtractSpecialPayments(String chartCode, Date onOrBeforeInvoicePayDate)
InvoiceService
getInvoicesToExtractSpecialPayments
in interface InvoiceService
chartCode
- The chart code to be used as one of the criterias to retrieve the invoice documents.InvoiceService.getInvoicesToExtractSpecialPayments(String,
java.sql.Date)
public Collection<InvoiceDocument> getImmediateInvoicesToExtract(String chartCode)
InvoiceService
getImmediateInvoicesToExtract
in interface InvoiceService
chartCode
- The chart code to be used as one of the criterias to retrieve the invoice documents.InvoiceService.getImmediateInvoicesToExtract(String)
public Collection<InvoiceDocument> getInvoiceToExtractByChart(String chartCode, Date onOrBeforeInvoicePayDate)
InvoiceService
getInvoiceToExtractByChart
in interface InvoiceService
chartCode
- The chart code to be used as one of the criterias to retrieve the invoice documents.InvoiceService.getInvoiceToExtractByChart(String,
java.sql.Date)
public boolean autoApproveInvoices()
InvoiceService
autoApproveInvoices
in interface InvoiceService
InvoiceService.autoApproveInvoices()
public boolean autoApproveInvoice(String docNumber, org.kuali.rice.core.api.util.type.KualiDecimal defaultMinimumLimit)
autoApproveInvoice
in interface InvoiceService
docNumber
- The invoice document number (not the invoice 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.InvoiceService.autoApproveInvoice(String,
org.kuali.rice.core.api.util.type.KualiDecimal)
public boolean autoApproveInvoice(InvoiceDocument doc, org.kuali.rice.core.api.util.type.KualiDecimal defaultMinimumLimit)
autoApproveInvoice
in interface InvoiceService
doc
- The invoice 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.InvoiceService.autoApproveInvoice(org.kuali.ole.module.purap.document.InvoiceDocument,
org.kuali.rice.core.api.util.type.KualiDecimal)
public boolean autoApprovePaymentRequest(String docNumber)
autoApprovePaymentRequest
in interface InvoiceService
docNumber
- The invoice document number (not the invoice ID) to be auto approved.PaymentRequestService.autoApprovePaymentRequest(java.lang.String,
org.kuali.rice.core.api.util.type.KualiDecimal)
public boolean autoApprovePaymentRequest(PaymentRequestDocument doc)
protected boolean isEligibleForAutoApproval(InvoiceDocument 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<NegativeInvoiceApprovalLimit> limits, org.kuali.rice.core.api.util.type.KualiDecimal minimumAmount)
limits
- The collection of NegativeInvoiceApprovalLimit to be used in determining the minimum limit amount.minimumAmount
- The amount to be compared with the collection of NegativeInvoiceApprovalLimit to determine the
minimum limit amount.public List getInvoicesByVendorNumber(Integer vendorHeaderGeneratedId, Integer vendorDetailAssignedId)
getInvoicesByVendorNumber
in interface InvoiceService
vendorHeaderGeneratedId
- The vendor header generated id.vendorDetailAssignedId
- The vendor detail assigned id.public List getInvoicesByVendorNumberInvoiceNumber(Integer vendorHeaderGeneratedId, Integer vendorDetailAssignedId, String invoiceNumber)
getInvoicesByVendorNumberInvoiceNumber
in interface InvoiceService
vendorHeaderGeneratedId
- The vendor header generated id.vendorDetailAssignedId
- The vendor detail assigned id.invoiceNumber
- The invoice number as entered by AP.public HashMap<String,String> invoiceDuplicateMessages(InvoiceDocument document)
InvoiceService
invoiceDuplicateMessages
in interface InvoiceService
document
- The invoice document to be processed/checked for duplicates.InvoiceService.invoiceDuplicateMessages(org.kuali.ole.module.purap.document.InvoiceDocument)
public InvoiceDocument getInvoiceByDocumentNumber(String documentNumber)
InvoiceService
getInvoiceByDocumentNumber
in interface InvoiceService
documentNumber
- The document number to be used to obtain the invoice document.InvoiceService.getInvoiceByDocumentNumber(String)
public InvoiceDocument getInvoiceById(Integer poDocId)
InvoiceService
getInvoiceById
in interface InvoiceService
poDocId
- The purapDocumentIdentifier of the invoice document to be obtained.InvoiceService.getInvoiceById(Integer)
public List<InvoiceDocument> getInvoicesByPurchaseOrderId(Integer poDocId)
InvoiceService
getInvoicesByPurchaseOrderId
in interface InvoiceService
poDocId
- The purchase order id to be used to obtain a list of invoice documents.InvoiceService.getInvoicesByPurchaseOrderId(Integer)
public List<InvoiceDocument> getInvoicesByPOIdInvoiceAmountInvoiceDate(Integer poId, org.kuali.rice.core.api.util.type.KualiDecimal invoiceAmount, Date invoiceDate)
InvoiceService
getInvoicesByPOIdInvoiceAmountInvoiceDate
in interface InvoiceService
poId
- The purchase order id used to obtain the invoice documents.invoiceAmount
- The invoice amount used to obtain the invoice documents.invoiceDate
- The invoice date used to obtain the invoice documents.InvoiceService.getInvoicesByPOIdInvoiceAmountInvoiceDate(Integer,
org.kuali.rice.core.api.util.type.KualiDecimal, java.sql.Date)
public boolean isInvoiceDateAfterToday(Date invoiceDate)
InvoiceService
isInvoiceDateAfterToday
in interface InvoiceService
invoiceDate
- The invoice date to be determined whether it's after today.InvoiceService.isInvoiceDateAfterToday(java.sql.Date)
public Date calculatePayDate(Date invoiceDate, PaymentTermType terms)
InvoiceService
calculatePayDate
in interface InvoiceService
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.InvoiceService.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.dueNumber
- Either the vendorDiscountDueNumber or the vendorDiscountDueNumber of the payment term.public void calculateInvoice(InvoiceDocument invoice, boolean updateDiscount)
InvoiceService
calculateInvoice
in interface InvoiceService
invoice
- The invoice document to be calculated.updateDiscount
- boolean true if we also want to calculate the discount items for the invoice.InvoiceService.calculateInvoice(org.kuali.ole.module.purap.document.InvoiceDocument,
boolean)
protected void calculateDiscount(InvoiceDocument invoiceDocument)
invoiceDocument
- The payment request document whose discount to be calculated.public void clearTax(InvoiceDocument document)
InvoiceService
clearTax
in interface InvoiceService
document
- The disbursement voucher document being modified.public void calculateTaxArea(InvoiceDocument prqs)
InvoiceService
calculateTaxArea
in interface InvoiceService
prqs
- The invoice the NRA tax lines will be added to.InvoiceService.calculateTaxArea(org.kuali.ole.module.purap.document.InvoiceDocument)
protected void removeTaxItems(InvoiceDocument prqs)
prqs
- The payment request from which all tax items are to be removed.protected PurApItem addTaxItem(InvoiceDocument prqs, String itemTypeCode, BigDecimal taxableAmount)
prqs
- 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 InvoiceItem findDiscountItem(InvoiceDocument invoiceDocument)
invoiceDocument
- The payment request document to be used to find the discount item.protected InvoiceItem findFullOrderDiscountItem(InvoiceDocument invoiceDocument)
invoiceDocument
- The payment request document to be used to find the full order discount item.protected void distributeAccounting(InvoiceDocument invoiceDocument)
invoiceDocument
- public InvoiceDocument addHoldOnInvoice(InvoiceDocument document, String note) throws Exception
InvoiceService
addHoldOnInvoice
in interface InvoiceService
document
- The invoice document to be marked as on hold.note
- The note to be added to the invoice document while being marked as on hold.Exception
InvoiceService.addHoldOnInvoice(org.kuali.ole.module.purap.document.InvoiceDocument,
String)
public InvoiceDocument removeHoldOnInvoice(InvoiceDocument document, String note) throws Exception
InvoiceService
removeHoldOnInvoice
in interface InvoiceService
document
- The invoice document whose hold is to be removed.note
- The note to be added to the invoice document while its hold is being removed.Exception
InvoiceService.removeHoldOnInvoice(org.kuali.ole.module.purap.document.InvoiceDocument, String)
public void requestCancelOnInvoice(InvoiceDocument document, String note) throws Exception
InvoiceService
requestCancelOnInvoice
in interface InvoiceService
document
- The invoice document to be marked as requested to be canceled.note
- The note to be added to the invoice document while being marked as requested to be canceled.Exception
InvoiceService.addHoldOnInvoice(org.kuali.ole.module.purap.document.InvoiceDocument,
String)
public void removeRequestCancelOnInvoice(InvoiceDocument document, String note) throws Exception
InvoiceService
removeRequestCancelOnInvoice
in interface InvoiceService
document
- The invoice document to be used for request cancel.note
- The note to be added to the invoice document upon the removal of the request cancel.Exception
InvoiceService.removeHoldOnInvoice(org.kuali.ole.module.purap.document.InvoiceDocument, String)
protected void clearRequestCancelFields(InvoiceDocument document)
document
- The payment request document whose request cancel fields to be cleared.public boolean isExtracted(InvoiceDocument document)
InvoiceService
isExtracted
in interface InvoiceService
document
- The invoice document to be determined whether it is extracted.InvoiceService.isExtracted(org.kuali.ole.module.purap.document.InvoiceDocument)
protected boolean isBeingAdHocRouted(InvoiceDocument document)
public void cancelExtractedInvoice(InvoiceDocument invoice, String note)
InvoiceService
cancelExtractedInvoice
in interface InvoiceService
invoice
- The extracted invoice document to be canceled.note
- The note to be added to the invoice document.InvoiceService.cancelExtractedInvoice(org.kuali.ole.module.purap.document.InvoiceDocument,
String)
public void resetExtractedInvoice(InvoiceDocument invoice, String note)
InvoiceService
resetExtractedInvoice
in interface InvoiceService
invoice
- The extracted invoice document to be resetted.note
- The note to be added to the invoice document upon its reset.InvoiceService.resetExtractedInvoice(org.kuali.ole.module.purap.document.InvoiceDocument,
String)
public String createPreqDocumentDescription(Integer purchaseOrderIdentifier, String vendorName)
InvoiceService
createPreqDocumentDescription
in interface InvoiceService
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.InvoiceService.createPreqDocumentDescription(Integer,
String)
public void populateAndSaveInvoice(InvoiceDocument prqs) throws org.kuali.rice.kew.api.exception.WorkflowException
InvoiceService
populateAndSaveInvoice
in interface InvoiceService
prqs
- The invoice document to be populated and saved.org.kuali.rice.kew.api.exception.WorkflowException
InvoiceService.populateAndSaveInvoice(org.kuali.ole.module.purap.document.InvoiceDocument)
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, InvoiceDocument prqsDoc)
currentNodeName
- The current node name.prqsDoc
- The payment request document whose status to be updated.public void markPaid(InvoiceDocument pr, Date processDate)
InvoiceService
markPaid
in interface InvoiceService
pr
- The invoice document to be marked as paid and paid date to be set.processDate
- The date to be set as the invoice's paid date.InvoiceService.markPaid(org.kuali.ole.module.purap.document.InvoiceDocument,
java.sql.Date)
public boolean hasDiscountItem(InvoiceDocument prqs)
InvoiceService
hasDiscountItem
in interface InvoiceService
prqs
- The invoice document to be verified whether it has a discount item.InvoiceService.hasDiscountItem(org.kuali.ole.module.purap.document.InvoiceDocument)
public boolean poItemEligibleForAp(AccountsPayableDocument apDoc, PurchaseOrderItem poi)
public void removeIneligibleAdditionalCharges(InvoiceDocument document)
InvoiceService
removeIneligibleAdditionalCharges
in interface InvoiceService
public void changeVendor(InvoiceDocument prqs, Integer headerId, Integer detailId)
InvoiceService
changeVendor
in interface InvoiceService
protected void setVendorAddress(VendorAddress va, InvoiceDocument inv)
va
- ID of the address to setinv
- Invoice 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 hasActiveInvoicesForPurchaseOrder(Integer purchaseOrderIdentifier)
InvoiceService
hasActiveInvoicesForPurchaseOrder
in interface InvoiceService
InvoiceService.hasActiveInvoicesForPurchaseOrder(Integer)
protected List<String> filterInvoiceByAppDocStatus(List<String> lookupDocNumbers, String... appDocStatus)
lookupDocNumbers
- appDocStatus
- protected Collection<InvoiceDocument> filterInvoiceByAppDocStatus(Collection<InvoiceDocument> invoiceDocuments, String... appDocStatus)
invoiceDocuments
- appDocStatus
- protected Iterator<InvoiceDocument> filterInvoiceByAppDocStatus(Iterator<InvoiceDocument> invoiceIterator, String... appDocStatus)
invoiceIterator
- appDocStatus
- public void processInvoiceInReceivingStatus()
processInvoiceInReceivingStatus
in interface InvoiceService
InvoiceService.processInvoiceInReceivingStatus()
public boolean allowBackpost(InvoiceDocument invoiceDocument)
InvoiceService
allowBackpost
in interface InvoiceService
InvoiceService.allowBackpost(org.kuali.ole.module.purap.document.InvoiceDocument)
public boolean isPurchaseOrderValidForInvoiceDocumentCreation(InvoiceDocument invoiceDocument, PurchaseOrderDocument po)
isPurchaseOrderValidForInvoiceDocumentCreation
in interface InvoiceService
public boolean encumberedItemExistsForInvoicing(PurchaseOrderDocument document)
encumberedItemExistsForInvoicing
in interface InvoiceService
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 setInvoiceDao(InvoiceDao invoiceDao)
public void setNegativeInvoiceApprovalLimitService(NegativeInvoiceApprovalLimitService negativeInvoiceApprovalLimitService)
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()
public String getParameter(String namespaceCode, String componentCode, String parameterName)
getParameter
in interface InvoiceService
public boolean getParameterBoolean(String namespaceCode, String componentCode, String parameterName)
getParameterBoolean
in interface InvoiceService
Copyright © 2004-2014 The Kuali Foundation. All Rights Reserved.