@Transactional public class PurchaseOrderServiceImpl extends Object implements PurchaseOrderService
Modifier and Type | Field and Description |
---|---|
protected B2BPurchaseOrderService |
b2bPurchaseOrderService |
protected org.kuali.rice.krad.service.BusinessObjectService |
businessObjectService |
protected org.kuali.rice.kns.service.DataDictionaryService |
dataDictionaryService |
protected org.kuali.rice.core.api.datetime.DateTimeService |
dateTimeService |
protected String |
documentNumber |
protected org.kuali.rice.krad.service.DocumentService |
documentService |
protected List |
fileNameList |
protected String |
fromEmailAddress |
protected org.kuali.rice.core.api.config.property.ConfigurationService |
kualiConfigurationService |
protected org.kuali.rice.krad.service.KualiRuleService |
kualiRuleService |
protected org.kuali.rice.krad.service.MailService |
mailService |
protected org.kuali.rice.krad.service.MaintenanceDocumentService |
maintenanceDocumentService |
protected org.kuali.rice.krad.service.NoteService |
noteService |
protected OlePurapService |
olePurapService |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
parameterService |
protected org.kuali.rice.kim.api.identity.PersonService |
personService |
protected PrintService |
printService |
protected PurapService |
purapService |
protected PurApWorkflowIntegrationService |
purapWorkflowIntegrationService |
protected PurchaseOrderDao |
purchaseOrderDao |
protected RequisitionService |
requisitionService |
protected String |
toEmailAddress |
protected static boolean |
TRANSMISSION_IS_NOT_RETRANSMIT |
protected static boolean |
TRANSMISSION_IS_RETRANSMIT |
protected VendorService |
vendorService |
protected org.kuali.rice.kew.api.document.WorkflowDocumentService |
workflowDocumentService |
Constructor and Description |
---|
PurchaseOrderServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addNoteForCommodityCodeToVendor(org.kuali.rice.kns.maintenance.Maintainable maintainable,
String documentNumber,
Integer poID)
Creates a note to be added to the Vendor Maintenance Document which is spawned from the PurchaseOrderDocument.
|
protected void |
addStringErrorMessagesToMessageMap(String errorKey,
Collection<String> errors)
Loops through the collection of error messages and adding each of them to the error map.
|
protected void |
attemptSetupOfInitialOpenOfDocument(PurchaseOrderDocument po)
If the status of the purchase order is not OPEN and the initial open date is null, sets the initial open date to current date
and update the status to OPEN, then save the purchase order.
|
boolean |
autoCloseFullyDisencumberedOrders()
This gets a list of Purchase Orders in Open status and checks to see if their
line item encumbrances are all fully disencumbered and if so then the Purchase
Order is closed and notes added to indicate the change occurred in batch
|
boolean |
autoCloseRecurringOrders()
- PO status is OPEN
- Recurring payment type code is not null
- Vendor Choice is not Sub-Contract
- PO End Date <= parm date (comes from system parameter)
- Verify that the system parameter date entered is not greater than the current date minus three months.
|
HashMap<String,List<PurchaseOrderItem>> |
categorizeItemsForSplit(List<PurchaseOrderItem> items)
Used to provide sublists of the list of the original PO's items according to whether they
are marked to be moved or not.
|
protected boolean |
checkForLockingDocument(org.kuali.rice.kns.document.MaintenanceDocument document)
Checks whether the vendor is currently locked.
|
protected void |
checkForPrintTransmission(PurchaseOrderDocument po)
checks for print option and if chosen then sets the app doc status to
Pending To Print.
|
protected boolean |
completeB2BPurchaseOrder(PurchaseOrderDocument po) |
void |
completePurchaseOrder(PurchaseOrderDocument po)
Performs the steps needed to complete the newly approved purchase order document, which consists of setting the current and
pending indicators for the purchase order document and if the status is not pending transmission, then calls the
attemptsSetupOfInitialOpenOfDocument to set the statuses, the initial open date and save the document.
|
void |
completePurchaseOrderAmendment(PurchaseOrderDocument poa) |
PurchaseOrderDocument |
createAndRoutePotentialChangeDocument(OlePurchaseOrderDocument olePurchaseOrderDocument,
String docType,
String annotation,
List adhocRoutingRecipients,
String currentDocumentStatusCode) |
PurchaseOrderDocument |
createAndRoutePotentialChangeDocument(String documentNumber,
String docType,
String annotation,
List adhocRoutingRecipients,
String currentDocumentStatusCode)
Creates and routes the purchase order change document (for example, PurchaseOrderCloseDocument) based on an existing purchase
order document.
|
PurchaseOrderDocument |
createAndSavePotentialChangeDocument(String documentNumber,
String docType,
String currentDocumentStatusCode)
Creates and saves the purchase order change document (for example, PurchaseOrderAmendmentDocument) based on an existing
purchase order document.
|
PurchaseOrderSplitDocument |
createAndSavePurchaseOrderSplitDocument(List<PurchaseOrderItem> newPOItems,
PurchaseOrderDocument currentDocument,
boolean copyNotes,
String splitNoteText)
Creates and saves a Purchase Order Split document based on the old PO document, and the items from that PO that the
new Split PO is to contain.
|
void |
createAutomaticPurchaseOrderDocument(RequisitionDocument reqDocument)
Creates an automatic purchase order document using the given requisition document
|
PurchasingCapitalAssetItem |
createCamsItem(PurchasingDocument purDoc,
PurApItem purapItem) |
CapitalAssetSystem |
createCapitalAssetSystem() |
protected List<org.kuali.rice.krad.bo.AdHocRoutePerson> |
createFyiFiscalOfficerListForAmendGlEntries(PurchaseOrderDocument po)
Creates a list of fiscal officers for amend genera
|
protected List<org.kuali.rice.krad.bo.AdHocRoutePerson> |
createFyiFiscalOfficerListForNewUnorderedItems(PurchaseOrderDocument po)
Creates a list of fiscal officers for new unordered items added to a purchase order.
|
protected void |
createNoteForAutoCloseOrders(PurchaseOrderDocument purchaseOrderDocument,
String annotation)
Creates and add a note to the purchase order document using the annotation String in the input parameter.
|
PurchaseOrderDocument |
createPurchaseOrderDocument(RequisitionDocument reqDocument,
String newSessionUserId,
Integer contractManagerCode)
Creates a PurchaseOrderDocument from given RequisitionDocument.
|
protected PurchaseOrderDocument |
createPurchaseOrderDocumentFromSourceDocument(PurchaseOrderDocument sourceDocument,
String docType)
This method creates a new Purchase Order Document using the given document type based off the given source document.
|
protected List<AutoClosePurchaseOrderView> |
filterDocumentsForAppDocStatusOpen(List<AutoClosePurchaseOrderView> autoClosePurchaseOrderViews)
Filter out the auto close purchase order view documents for the appDocStatus with status open
For each document in the list, check if there is workflowdocument whose appdocstatus is open
add add to the return list.
|
protected List<PurchaseOrderDocument> |
filterPurchaseOrderDocumentByAppDocStatus(Collection<PurchaseOrderDocument> purchaseOrderDocuments,
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 List<String> |
filterPurchaseOrderDocumentNumbersByAppDocStatus(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 org.kuali.rice.krad.document.Document |
findDocument(String documentHeaderId)
This method finds the document for the given document header id
|
protected void |
fixDbNoteFields(PurchaseOrderDocument documentBusinessObject,
List<org.kuali.rice.krad.bo.Note> dbNotes)
This method fixes non ojb managed missing fields from the db
|
protected void |
fixItemReferences(PurchaseOrderDocument po)
This method fixes the item references in this document
|
protected PurchaseOrderDocument |
generatePurchaseOrderFromRequisition(RequisitionDocument reqDocument)
Create Purchase Order and populate with data from Requisition and other default data
|
protected Set<Class> |
getClassesToExcludeFromCopy()
Gets a set of classes to exclude from those whose fields will be copied during a copy operation from one Document to another.
|
PurchaseOrderDocument |
getCurrentPurchaseOrder(Integer id)
Obtains the purchase order document whose current indicator is true, given a purchase order id which is the
purapDocumentIdentifier.
|
protected String |
getCurrentRouteNodeName(org.kuali.rice.kew.api.WorkflowDocument wd)
Returns the current route node name.
|
String |
getEmailAddress(VendorTransmissionFormatDetail vendorTransmissionFormatDetail) |
protected List<String> |
getExcludedVendorChoiceCodes()
Gets a List of excluded vendor choice codes from PurapConstants.
|
org.kuali.rice.core.api.util.type.KualiDecimal |
getInternalPurchasingDollarLimit(PurchaseOrderDocument document)
Obtains the internal purchasing dollar limit amount for a purchase order document.
|
PurchaseOrderDocument |
getOldestPurchaseOrder(PurchaseOrderDocument po,
PurchaseOrderDocument documentBusinessObject)
Obtains the oldest purchase order given the purchase order object to be used to search, then calls the updateNotes method to
set the notes on the oldest purchase order and finally return the oldest purchase order.
|
OlePurapService |
getOlePurapService() |
OleSelectDocumentService |
getOleSelectDocumentService() |
List |
getPendingPurchaseOrderFaxes()
This method gets all the Purchase orders that are waiting for faxing
|
protected org.kuali.rice.kim.api.identity.PersonService |
getPersonService() |
String |
getPurchaseOrderAppDocStatus(Integer poId)
Retrieves the purchase orders current status
|
PurchaseOrderDocument |
getPurchaseOrderByDocumentNumber(String documentNumber)
Obtains the purchase order document given the document number.
|
List<org.kuali.rice.krad.bo.Note> |
getPurchaseOrderNotes(Integer id)
Obtains all the notes that belong to this purchase order given the purchase order id.
|
PurchaseOrderParameters |
getPurchaseOrderParameters() |
List<PurchaseOrderQuoteStatus> |
getPurchaseOrderQuoteStatusCodes() |
protected Calendar |
getTodayMinusThreeMonths()
Creates and returns a Calendar object of today minus three months.
|
String |
getVendorFormatType(Long id) |
String |
getVendorTransmissionType(Integer id) |
boolean |
hasNewUnorderedItem(PurchaseOrderDocument po)
Checks the item list for newly added unordered items.
|
void |
initiateTransmission(PurchaseOrderDocument po,
PurApItem item)
This method is the starting point of EDI File creation and transmission for a PO
|
boolean |
isCommodityCodeRequiredOnPurchaseOrder() |
boolean |
isNewItemForAmendment(PurchaseOrderItem poItem)
Determines if a purchase order item is newly added on
the Purchase Order Amendment Document.
|
boolean |
isNewUnorderedItem(PurchaseOrderItem poItem)
Determines if a purchase order item is new unordered item.
|
boolean |
isPurchaseOrderOpenForProcessing(Integer poId) |
boolean |
isPurchaseOrderOpenForProcessing(PurchaseOrderDocument purchaseOrderDocument) |
void |
performPrintPurchaseOrderPDFOnly(String documentNumber,
ByteArrayOutputStream baosPDF)
Generates and displays the purchase order pdf by invoking the generatePurchaseOrderPdf method of the PrintService.
|
void |
performPurchaseOrderFirstTransmitViaPrinting(String documentNumber,
ByteArrayOutputStream baosPDF)
Creates and displays the pdf document for the purchase order, sets the transmit dates, calls the
takeAllActionsForGivenCriteria method in PurApWorkflowIntegrationService to perform all the workflow related steps that are
necessary as part of the document initial print transmission and then performs the setup of initial of open document of the
purchase order.
|
void |
performPurchaseOrderPreviewPrinting(String documentNumber,
ByteArrayOutputStream baosPDF)
Creates and displays the pdf document for the purchase order with a draft watermark
|
protected PurchaseOrderVendorQuote |
populateAddressForPOVendorQuote(VendorDetail newVendor,
String documentNumber)
Creates the new PurchaseOrderVendorQuote and populate the address fields for it.
|
PurchaseOrderVendorQuote |
populateQuoteWithVendor(Integer headerId,
Integer detailId,
String documentNumber)
Creates a PurchaseOrderVendorQuote based on the data on the selected vendor and the document number.
|
boolean |
printPurchaseOrderQuotePDF(PurchaseOrderDocument po,
PurchaseOrderVendorQuote povq,
ByteArrayOutputStream baosPDF)
TODO RELEASE 3 - QUOTE
|
boolean |
printPurchaseOrderQuoteRequestsListPDF(String documentNumber,
ByteArrayOutputStream baosPDF)
TODO RELEASE 3 - QUOTE
|
void |
processACMReq(ContractManagerAssignmentDocument acmDoc)
This method takes care of creating PurchaseOrderDocuments from a list of Requisitions on an ACM
|
boolean |
processFTPTransmission(VendorTransmissionFormatDetail vendorTransmissionFormatDetail,
String file,
String fileName)
This method is for transmitting EDI file into FTP Server
|
protected void |
resetAutoClosePurchaseOrderDateParameter()
Resets the AUTO_CLOSE_PO_FROM_DATE and AUTO_CLOSE_PO_TO_DATE system parameters to "mm/dd/yyyy".
|
protected void |
resetAutoCloseRecurringOrderDateParameter()
Resets the AUTO_CLOSE_RECURRING_ORDER_DT system parameter to "mm/dd/yyyy".
|
void |
retransmitB2BPurchaseOrder(PurchaseOrderDocument po) |
void |
retransmitPurchaseOrderPDF(PurchaseOrderDocument po,
ByteArrayOutputStream baosPDF)
Generates and displays the purchase order retransmit pdf by invoking the generatePurchaseOrderPdfForRetransmission method of
the PrintService.
|
List<PurchasingCapitalAssetItem> |
retrieveCapitalAssetItemsForIndividual(Integer poId)
Return a list of PurchasingCapitalAssetItems where each item would have a CapitalAssetSystem.
|
CapitalAssetSystem |
retrieveCapitalAssetSystemForOneSystem(Integer poId)
Return a CapitalAssetSystem which provides the capital asset information such as asset numbers and asset type.
|
List<CapitalAssetSystem> |
retrieveCapitalAssetSystemsForMultipleSystem(Integer poId)
Return a list of CapitalAssetSystems which provide the capital asset information such as asset numbers and asset type.
|
protected void |
saveDocumentNoValidationUsingClearMessageMap(PurchaseOrderDocument document)
Sets the error map to a new, empty error map before calling saveDocumentNoValidation to save the document.
|
protected void |
saveDocumentStandardSave(PurchaseOrderDocument document)
Calls the saveDocument method of documentService to save the document.
|
protected void |
savePurchaseOrderData(PurchaseOrderDocument po)
helper method to take the po and save it using businessObjectService so that only the po related data is saved since most
often we are only updating the flags on the document.
|
boolean |
savePurchaseOrderEdi(PurchaseOrderDocument po,
String file,
PurApItem item)
This method is to create and save the EDI file into the staging directory.
|
boolean |
savePurchaseOrderPdf(PurchaseOrderDocument po,
String file,
PurApItem item) |
void |
sendEmail() |
void |
sendFyiForGLEntries(PurchaseOrderDocument po)
Sends an FYI to fiscal officers for general ledger entries created for amend purchase order
|
protected void |
sendFyiForNewUnorderedItems(PurchaseOrderDocument po)
Sends an FYI to fiscal officers for new unordered items.
|
protected void |
sendMessage(org.kuali.rice.core.api.mail.MailMessage message,
String emailBody)
Sends the email by calling the sendMessage method in mailService and log error if exception occurs during the attempt to send
the message.
|
void |
setB2bPurchaseOrderService(B2BPurchaseOrderService purchaseOrderService) |
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService boService) |
void |
setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService) |
void |
setCurrentAndPendingIndicatorsForApprovedPODocuments(PurchaseOrderDocument newPO)
Sets the current and pending indicators of the new purchase order and the old purchase order as well as its status, then save
the purchase order.
|
void |
setCurrentAndPendingIndicatorsForCancelledChangePODocuments(PurchaseOrderDocument newPO)
Sets the current and pending indicators of the new purchase order and the old purchase order as well as their statuses, then
save the purchase order.
|
void |
setCurrentAndPendingIndicatorsForCancelledRemoveHoldPODocuments(PurchaseOrderDocument newPO)
Sets the current and pending indicators of the new purchase order and the old purchase order as well as their statuses, then
save the purchase order
|
void |
setCurrentAndPendingIndicatorsForCancelledReopenPODocuments(PurchaseOrderDocument newPO)
Sets the current and pending indicators of the new purchase order and the old purchase order as well as their statuses, then
save the purchase order.
|
void |
setCurrentAndPendingIndicatorsForDisapprovedChangePODocuments(PurchaseOrderDocument newPO)
Sets the current and pending indicators of the new purchase order and the old purchase order as well as their statuses, then
save the purchase order.
|
void |
setCurrentAndPendingIndicatorsForDisapprovedRemoveHoldPODocuments(PurchaseOrderDocument newPO)
Sets the current and pending indicators of the new purchase order and the old purchase order as well as their statuses, then
save the purchase order.
|
void |
setCurrentAndPendingIndicatorsForDisapprovedReopenPODocuments(PurchaseOrderDocument newPO)
Sets the current and pending indicators of the new purchase order and the old purchase order as well as their statuses, then
save the purchase order.
|
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 |
setKualiRuleService(org.kuali.rice.krad.service.KualiRuleService kualiRuleService) |
void |
setMailService(org.kuali.rice.krad.service.MailService mailService) |
void |
setMaintenanceDocumentService(org.kuali.rice.krad.service.MaintenanceDocumentService maintenanceDocumentService) |
protected org.kuali.rice.core.api.mail.MailMessage |
setMessageAddressesAndSubject(org.kuali.rice.core.api.mail.MailMessage message,
String parameterEmail)
Sets the to addresses, from address and the subject of the email.
|
void |
setNoteService(org.kuali.rice.krad.service.NoteService noteService) |
void |
setOleSelectDocumentService(OleSelectDocumentService oleSelectDocumentService) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService) |
void |
setPrintService(PrintService printService) |
void |
setPurapService(PurapService purapService) |
void |
setPurapWorkflowIntegrationService(PurApWorkflowIntegrationService purapWorkflowIntegrationService) |
void |
setPurchaseOrderDao(PurchaseOrderDao purchaseOrderDao) |
void |
setReceivingRequiredIndicatorForPurchaseOrder(PurchaseOrderDocument po)
Performs a threshold check on the purchase order to determine if any attribute on the purchase order
falls within a defined threshold.
|
void |
setRequisitionService(RequisitionService requisitionService) |
protected void |
setupDocumentForPendingFirstTransmission(PurchaseOrderDocument po)
Update the purchase order document with the appropriate status for pending first transmission based on the transmission type.
|
void |
setVendorService(VendorService vendorService) |
void |
setWorkflowDocumentService(org.kuali.rice.kew.api.document.WorkflowDocumentService workflowDocumentService) |
protected void |
updateCapitalAssetRelatedCollections(PurchaseOrderDocument newDocument) |
protected void |
updateCurrentDocumentForNoPendingAction(PurchaseOrderDocument newPO,
String newPOStatus,
String oldPOStatus)
Update the statuses of both the old purchase order and the new purchase orders, then save the old and the new purchase
orders.
|
protected void |
updateDefaultVendorAddress(VendorDetail vendor)
Obtains the defaultAddress of the vendor and setting the default address fields on the vendor.
|
protected void |
updateNotes(PurchaseOrderDocument po,
PurchaseOrderDocument documentBusinessObject)
If the purchase order's object id is not null (I think this means if it's an existing purchase order that had already been
saved to the db previously), get the notes of the purchase order from the database, fix the notes' fields by calling the
fixDbNoteFields, then set the notes to the purchase order.
|
void |
updateVendorCommodityCode(PurchaseOrderDocument po)
If there are commodity codes on the items on the PurchaseOrderDocument that haven't existed yet on the vendor that the
PurchaseOrderDocument is using, then we will spawn a new VendorDetailMaintenanceDocument automatically to update the vendor
with the commodity codes that aren't already existing on the vendor.
|
VendorDetail |
updateVendorWithMissingCommodityCodesIfNecessary(PurchaseOrderDocument po)
Check whether each of the items contain commodity code, if so then loop
through the vendor commodity codes on the vendor to find out whether the
commodity code on the item has existed on the vendor.
|
protected org.kuali.rice.krad.service.BusinessObjectService businessObjectService
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 PrintService printService
protected PurchaseOrderDao purchaseOrderDao
protected org.kuali.rice.kew.api.document.WorkflowDocumentService workflowDocumentService
protected org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService
protected org.kuali.rice.krad.service.KualiRuleService kualiRuleService
protected VendorService vendorService
protected RequisitionService requisitionService
protected PurApWorkflowIntegrationService purapWorkflowIntegrationService
protected org.kuali.rice.krad.service.MaintenanceDocumentService maintenanceDocumentService
protected org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected org.kuali.rice.kim.api.identity.PersonService personService
protected org.kuali.rice.krad.service.MailService mailService
protected B2BPurchaseOrderService b2bPurchaseOrderService
protected org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService
protected String documentNumber
protected String fromEmailAddress
protected List fileNameList
protected String toEmailAddress
protected static final boolean TRANSMISSION_IS_RETRANSMIT
protected static final boolean TRANSMISSION_IS_NOT_RETRANSMIT
protected OlePurapService olePurapService
public PurchaseOrderServiceImpl()
public OlePurapService getOlePurapService()
public boolean isPurchaseOrderOpenForProcessing(Integer poId)
isPurchaseOrderOpenForProcessing
in interface PurchaseOrderService
public boolean isPurchaseOrderOpenForProcessing(PurchaseOrderDocument purchaseOrderDocument)
isPurchaseOrderOpenForProcessing
in interface PurchaseOrderService
public boolean isCommodityCodeRequiredOnPurchaseOrder()
isCommodityCodeRequiredOnPurchaseOrder
in interface PurchaseOrderService
protected void saveDocumentNoValidationUsingClearMessageMap(PurchaseOrderDocument document)
document
- The purchase order document to be saved.protected void saveDocumentStandardSave(PurchaseOrderDocument document)
document
- The document to be saved.public PurchasingCapitalAssetItem createCamsItem(PurchasingDocument purDoc, PurApItem purapItem)
createCamsItem
in interface PurchasingDocumentSpecificService
public CapitalAssetSystem createCapitalAssetSystem()
createCapitalAssetSystem
in interface PurchasingDocumentSpecificService
public void createAutomaticPurchaseOrderDocument(RequisitionDocument reqDocument)
PurchaseOrderService
createAutomaticPurchaseOrderDocument
in interface PurchaseOrderService
reqDocument
- The requisition document that this method will use to create the Automated Purchase Order (APO).PurchaseOrderService.createAutomaticPurchaseOrderDocument(org.kuali.ole.module.purap.document.RequisitionDocument)
protected void checkForPrintTransmission(PurchaseOrderDocument po) throws org.kuali.rice.kew.api.exception.WorkflowException
po
- org.kuali.rice.kew.api.exception.WorkflowException
public PurchaseOrderDocument createPurchaseOrderDocument(RequisitionDocument reqDocument, String newSessionUserId, Integer contractManagerCode)
PurchaseOrderService
createPurchaseOrderDocument
in interface PurchaseOrderService
reqDocument
- The requisition document that this method will use to create the purchase order.newSessionUserId
- The session user id that we'll use to invoke the performLogicWithFakedUserSession method of
PurapService.contractManagerCode
- The contract manager code that we'll need to set on the purchase order.PurchaseOrderService.createPurchaseOrderDocument(org.kuali.ole.module.purap.document.RequisitionDocument,
java.lang.String, java.lang.Integer)
protected PurchaseOrderDocument generatePurchaseOrderFromRequisition(RequisitionDocument reqDocument) throws org.kuali.rice.kew.api.exception.WorkflowException
reqDocument
- The requisition document from which we create the purchase order document.org.kuali.rice.kew.api.exception.WorkflowException
public org.kuali.rice.core.api.util.type.KualiDecimal getInternalPurchasingDollarLimit(PurchaseOrderDocument document)
PurchaseOrderService
getInternalPurchasingDollarLimit
in interface PurchaseOrderService
document
- The purchase order document for which this method is obtaining the internal purchasing dollar limit.PurchaseOrderService.getInternalPurchasingDollarLimit(org.kuali.ole.module.purap.document.PurchaseOrderDocument)
protected void addStringErrorMessagesToMessageMap(String errorKey, Collection<String> errors)
errorKey
- The resource key used to retrieve the error text from the error message resource bundle.errors
- The collection of error messages.public boolean printPurchaseOrderQuoteRequestsListPDF(String documentNumber, ByteArrayOutputStream baosPDF)
printPurchaseOrderQuoteRequestsListPDF
in interface PurchaseOrderService
org.kuali.ole.module.purap.document.service.PurchaseOrderService#printPurchaseOrderQuoteRequestsListPDF(org.kuali.ole.module.purap.document.PurchaseOrderDocument,
java.io.ByteArrayOutputStream)
public boolean printPurchaseOrderQuotePDF(PurchaseOrderDocument po, PurchaseOrderVendorQuote povq, ByteArrayOutputStream baosPDF)
public void performPurchaseOrderFirstTransmitViaPrinting(String documentNumber, ByteArrayOutputStream baosPDF)
PurchaseOrderService
performPurchaseOrderFirstTransmitViaPrinting
in interface PurchaseOrderService
documentNumber
- The document number of the purchase order document that we want to perform the first transmit.baosPDF
- The ByteArrayOutputStream object that was passed in from the struts action so that we could display the pdf on
the browser.PurchaseOrderService.performPurchaseOrderFirstTransmitViaPrinting(java.lang.String,
java.io.ByteArrayOutputStream)
public void performPurchaseOrderPreviewPrinting(String documentNumber, ByteArrayOutputStream baosPDF)
PurchaseOrderService
performPurchaseOrderPreviewPrinting
in interface PurchaseOrderService
documentNumber
- The document number of the purchase order document that we want to perform the first transmit.baosPDF
- The ByteArrayOutputStream object that was passed in from the struts action so that we could display the pdf on
the browser.PurchaseOrderService.performPurchaseOrderPreviewPrinting(java.lang.String,
java.io.ByteArrayOutputStream)
public void performPrintPurchaseOrderPDFOnly(String documentNumber, ByteArrayOutputStream baosPDF)
PurchaseOrderService
performPrintPurchaseOrderPDFOnly
in interface PurchaseOrderService
documentNumber
- The document number of the purchase order document that we want to print the pdf.baosPDF
- The ByteArrayOutputStream object that we'll use to display the pdf on the browser.PurchaseOrderService.performPrintPurchaseOrderPDFOnly(java.lang.String,
java.io.ByteArrayOutputStream)
public void retransmitPurchaseOrderPDF(PurchaseOrderDocument po, ByteArrayOutputStream baosPDF)
PurchaseOrderService
retransmitPurchaseOrderPDF
in interface PurchaseOrderService
po
- The purchase order document to be retransmitted.baosPDF
- The ByteArrayOutputStream object that we'll use to display the pdf on the browser.PurchaseOrderService.retransmitPurchaseOrderPDF(org.kuali.ole.module.purap.document.PurchaseOrderDocument,
java.io.ByteArrayOutputStream)
protected PurchaseOrderDocument createPurchaseOrderDocumentFromSourceDocument(PurchaseOrderDocument sourceDocument, String docType) throws org.kuali.rice.kew.api.exception.WorkflowException
sourceDocument
- - document the new Purchase Order Document should be based off of in terms of datadocType
- - document type of the potential new Purchase Order Documentorg.kuali.rice.kew.api.exception.WorkflowException
- if a new document cannot be created using the given typeprotected void updateCapitalAssetRelatedCollections(PurchaseOrderDocument newDocument)
public PurchaseOrderDocument createAndSavePotentialChangeDocument(String documentNumber, String docType, String currentDocumentStatusCode)
PurchaseOrderService
createAndSavePotentialChangeDocument
in interface PurchaseOrderService
documentNumber
- The document number of the existing purchase order document from which we try to create a new change
document.docType
- The document type of the new change document.currentDocumentStatusCode
- The status code that we want to set on the existing purchase order document after the new change
document is created.PurchaseOrderService.createAndSavePotentialChangeDocument(java.lang.String,
java.lang.String, java.lang.String)
public PurchaseOrderDocument createAndRoutePotentialChangeDocument(String documentNumber, String docType, String annotation, List adhocRoutingRecipients, String currentDocumentStatusCode)
PurchaseOrderService
createAndRoutePotentialChangeDocument
in interface PurchaseOrderService
documentNumber
- The document number of the existing purchase order document from which we try to create a new change
document.docType
- The document type of the new change document.annotation
- The annotation that we'll use to invoke the routeDocument method of DocumentService.adhocRoutingRecipients
- The adhocRoutingRecipients that we'll use to invoke the routeDocument method of
DocumentService.currentDocumentStatusCode
- The status code that we want to set on the existing purchase order document after the new change
document is created.PurchaseOrderService.createAndRoutePotentialChangeDocument(java.lang.String,
java.lang.String, java.lang.String, java.util.List, java.lang.String)
public PurchaseOrderDocument createAndRoutePotentialChangeDocument(OlePurchaseOrderDocument olePurchaseOrderDocument, String docType, String annotation, List adhocRoutingRecipients, String currentDocumentStatusCode)
createAndRoutePotentialChangeDocument
in interface PurchaseOrderService
public PurchaseOrderSplitDocument createAndSavePurchaseOrderSplitDocument(List<PurchaseOrderItem> newPOItems, PurchaseOrderDocument currentDocument, boolean copyNotes, String splitNoteText)
PurchaseOrderService
createAndSavePurchaseOrderSplitDocument
in interface PurchaseOrderService
newPOItems
- The ListcurrentDocument
- The original PurchaseOrderDocumentcopyNotes
- A boolean. True if notes are to be copied from the old document to the new.splitNoteText
- A String containing the text of the note to be added to the old document.org.kuali.ole.module.purap.document.service.PurchaseOrderService#createAndSavePurchaseOrderSplitDocument(java.util.List,
java.lang.String, boolean)
protected Set<Class> getClassesToExcludeFromCopy()
protected String getCurrentRouteNodeName(org.kuali.rice.kew.api.WorkflowDocument wd) throws org.kuali.rice.kew.api.exception.WorkflowException
wd
- The KualiWorkflowDocument object whose current route node we're trying to get.org.kuali.rice.kew.api.exception.WorkflowException
public void completePurchaseOrder(PurchaseOrderDocument po)
PurchaseOrderService
completePurchaseOrder
in interface PurchaseOrderService
po
- The newly approved purchase order document that we want to complete.PurchaseOrderService.completePurchaseOrder(org.kuali.ole.module.purap.document.PurchaseOrderDocument)
protected boolean completeB2BPurchaseOrder(PurchaseOrderDocument po)
public void retransmitB2BPurchaseOrder(PurchaseOrderDocument po)
retransmitB2BPurchaseOrder
in interface PurchaseOrderService
public void completePurchaseOrderAmendment(PurchaseOrderDocument poa)
completePurchaseOrderAmendment
in interface PurchaseOrderService
public void updateVendorCommodityCode(PurchaseOrderDocument po)
updateVendorCommodityCode
in interface PurchaseOrderService
po
- The PurchaseOrderDocument containing the vendor that we want to update.protected void addNoteForCommodityCodeToVendor(org.kuali.rice.kns.maintenance.Maintainable maintainable, String documentNumber, Integer poID)
maintainable
- documentNumber
- poID
- protected boolean checkForLockingDocument(org.kuali.rice.kns.document.MaintenanceDocument document)
document
- The MaintenanceDocument containing the vendor.public VendorDetail updateVendorWithMissingCommodityCodesIfNecessary(PurchaseOrderDocument po)
PurchaseOrderService
updateVendorWithMissingCommodityCodesIfNecessary
in interface PurchaseOrderService
po
- The PurchaseOrderDocument containing the vendor that we want to update.PurchaseOrderService.updateVendorWithMissingCommodityCodesIfNecessary(org.kuali.ole.module.purap.document.PurchaseOrderDocument)
protected void setupDocumentForPendingFirstTransmission(PurchaseOrderDocument po)
po
- The purchase order document whose status to be updated.protected void attemptSetupOfInitialOpenOfDocument(PurchaseOrderDocument po)
po
- The purchase order document whose initial open date and status we want to update.public PurchaseOrderDocument getCurrentPurchaseOrder(Integer id)
PurchaseOrderService
getCurrentPurchaseOrder
in interface PurchaseOrderService
id
- The po id (purapDocumentIdentifier) that we'll use to retrieve the current purchase order document.PurchaseOrderService.getCurrentPurchaseOrder(java.lang.Integer)
public PurchaseOrderDocument getPurchaseOrderByDocumentNumber(String documentNumber)
PurchaseOrderService
getPurchaseOrderByDocumentNumber
in interface PurchaseOrderService
documentNumber
- The document number of the purchase order that we want to retrieve.PurchaseOrderService.getPurchaseOrderByDocumentNumber(java.lang.String)
public PurchaseOrderDocument getOldestPurchaseOrder(PurchaseOrderDocument po, PurchaseOrderDocument documentBusinessObject)
PurchaseOrderService
getOldestPurchaseOrder
in interface PurchaseOrderService
po
- The current purchase order object from which we want to obtain the oldest purchase order.documentBusinessObject
- The documentBusinessObject of the current purchase order object.PurchaseOrderService.getOldestPurchaseOrder(org.kuali.ole.module.purap.document.PurchaseOrderDocument,
org.kuali.ole.module.purap.document.PurchaseOrderDocument)
protected void updateNotes(PurchaseOrderDocument po, PurchaseOrderDocument documentBusinessObject)
po
- The current purchase order.documentBusinessObject
- The oldest purchase order whose purapDocumentIdentifier is the same as the po's
purapDocumentIdentifier.protected void fixDbNoteFields(PurchaseOrderDocument documentBusinessObject, List<org.kuali.rice.krad.bo.Note> dbNotes)
documentBusinessObject
- The oldest purchase order whose purapDocumentIdentifier is the same as the po's
purapDocumentIdentifier.dbNotes
- The notes of the purchase order obtained from the database.public List<org.kuali.rice.krad.bo.Note> getPurchaseOrderNotes(Integer id)
PurchaseOrderService
getPurchaseOrderNotes
in interface PurchaseOrderService
id
- The purchase order id (purapDocumentIdentifier).PurchaseOrderService.getPurchaseOrderNotes(java.lang.Integer)
public void setCurrentAndPendingIndicatorsForApprovedPODocuments(PurchaseOrderDocument newPO)
PurchaseOrderService
setCurrentAndPendingIndicatorsForApprovedPODocuments
in interface PurchaseOrderService
newPO
- The new purchase order document that has been approved.PurchaseOrderService.setCurrentAndPendingIndicatorsForApprovedPODocuments(org.kuali.ole.module.purap.document.PurchaseOrderDocument)
public void setCurrentAndPendingIndicatorsForDisapprovedChangePODocuments(PurchaseOrderDocument newPO)
PurchaseOrderService
setCurrentAndPendingIndicatorsForDisapprovedChangePODocuments
in interface PurchaseOrderService
newPO
- The new purchase order document that has been disapproved.PurchaseOrderService.setCurrentAndPendingIndicatorsForDisapprovedChangePODocuments(org.kuali.ole.module.purap.document.PurchaseOrderDocument)
public void setCurrentAndPendingIndicatorsForCancelledChangePODocuments(PurchaseOrderDocument newPO)
PurchaseOrderService
setCurrentAndPendingIndicatorsForCancelledChangePODocuments
in interface PurchaseOrderService
newPO
- The new purchase order document that has been canceled.PurchaseOrderService.setCurrentAndPendingIndicatorsForCancelledChangePODocuments(org.kuali.ole.module.purap.document.PurchaseOrderDocument)
public void setCurrentAndPendingIndicatorsForCancelledReopenPODocuments(PurchaseOrderDocument newPO)
PurchaseOrderService
setCurrentAndPendingIndicatorsForCancelledReopenPODocuments
in interface PurchaseOrderService
newPO
- The new purchase order reopen document that has been canceled.PurchaseOrderService.setCurrentAndPendingIndicatorsForCancelledReopenPODocuments(org.kuali.ole.module.purap.document.PurchaseOrderDocument)
public void setCurrentAndPendingIndicatorsForDisapprovedReopenPODocuments(PurchaseOrderDocument newPO)
PurchaseOrderService
setCurrentAndPendingIndicatorsForDisapprovedReopenPODocuments
in interface PurchaseOrderService
newPO
- The new purchase order reopen document that has been disapproved.PurchaseOrderService.setCurrentAndPendingIndicatorsForDisapprovedReopenPODocuments(org.kuali.ole.module.purap.document.PurchaseOrderDocument)
public void setCurrentAndPendingIndicatorsForCancelledRemoveHoldPODocuments(PurchaseOrderDocument newPO)
PurchaseOrderService
setCurrentAndPendingIndicatorsForCancelledRemoveHoldPODocuments
in interface PurchaseOrderService
newPO
- The new purchase order remove hold document that has been canceled.PurchaseOrderService.setCurrentAndPendingIndicatorsForCancelledRemoveHoldPODocuments(org.kuali.ole.module.purap.document.PurchaseOrderDocument)
public void setCurrentAndPendingIndicatorsForDisapprovedRemoveHoldPODocuments(PurchaseOrderDocument newPO)
PurchaseOrderService
setCurrentAndPendingIndicatorsForDisapprovedRemoveHoldPODocuments
in interface PurchaseOrderService
newPO
- The new purchase order remove hold document that has been disapproved.PurchaseOrderService.setCurrentAndPendingIndicatorsForDisapprovedRemoveHoldPODocuments(org.kuali.ole.module.purap.document.PurchaseOrderDocument)
protected void updateCurrentDocumentForNoPendingAction(PurchaseOrderDocument newPO, String newPOStatus, String oldPOStatus)
newPO
- The new change purchase order document (e.g. the PurchaseOrderAmendmentDocument that was resulted from the user
clicking on the amend button).newPOStatus
- The status to be set on the new change purchase order document.oldPOStatus
- The status to be set on the existing (old) purchase order document.public List<PurchaseOrderQuoteStatus> getPurchaseOrderQuoteStatusCodes()
getPurchaseOrderQuoteStatusCodes
in interface PurchaseOrderService
public void setReceivingRequiredIndicatorForPurchaseOrder(PurchaseOrderDocument po)
PurchaseOrderService
setReceivingRequiredIndicatorForPurchaseOrder
in interface PurchaseOrderService
public boolean hasNewUnorderedItem(PurchaseOrderDocument po)
PurchaseOrderService
hasNewUnorderedItem
in interface PurchaseOrderService
PurchaseOrderService.hasNewUnorderedItem(org.kuali.ole.module.purap.document.PurchaseOrderDocument)
public boolean isNewUnorderedItem(PurchaseOrderItem poItem)
PurchaseOrderService
isNewUnorderedItem
in interface PurchaseOrderService
public boolean isNewItemForAmendment(PurchaseOrderItem poItem)
PurchaseOrderService
isNewItemForAmendment
in interface PurchaseOrderService
protected void sendFyiForNewUnorderedItems(PurchaseOrderDocument po)
po
- protected List<org.kuali.rice.krad.bo.AdHocRoutePerson> createFyiFiscalOfficerListForNewUnorderedItems(PurchaseOrderDocument po)
po
- public void sendFyiForGLEntries(PurchaseOrderDocument po)
sendFyiForGLEntries
in interface PurchaseOrderService
po
- protected List<org.kuali.rice.krad.bo.AdHocRoutePerson> createFyiFiscalOfficerListForAmendGlEntries(PurchaseOrderDocument po)
po
- public HashMap<String,List<PurchaseOrderItem>> categorizeItemsForSplit(List<PurchaseOrderItem> items)
PurchaseOrderService
categorizeItemsForSplit
in interface PurchaseOrderService
items
- A ListPurchaseOrderService.categorizeItemsForSplit(java.util.List)
public PurchaseOrderVendorQuote populateQuoteWithVendor(Integer headerId, Integer detailId, String documentNumber)
PurchaseOrderService
populateQuoteWithVendor
in interface PurchaseOrderService
headerId
- The vendorHeaderGeneratedIdentifier of the selected vendor.detailId
- The vendorDetailAssignedIdentifier of the selected vendor.documentNumber
- The documentNumber of the PurchaseOrderDocument containing this quote.org.kuali.module.purap.service.PurchaseOrderService#populateQuoteWithVendor(java.lang.Integer, java.lang.Integer,
java.lang.String)
protected PurchaseOrderVendorQuote populateAddressForPOVendorQuote(VendorDetail newVendor, String documentNumber)
newVendor
- The VendorDetail object from which we obtain the values for the address fields.documentNumber
- The documentNumber of the PurchaseOrderDocument containing the PurchaseOrderVendorQuote.protected void updateDefaultVendorAddress(VendorDetail vendor)
vendor
- The VendorDetail object whose default address we'll obtain and set the fields.public void processACMReq(ContractManagerAssignmentDocument acmDoc)
PurchaseOrderService
processACMReq
in interface PurchaseOrderService
acmDoc
- An assign a contract manager documentPurchaseOrderService.processACMReq(org.kuali.ole.module.purap.document.ContractManagerAssignmentDocument)
public boolean autoCloseFullyDisencumberedOrders()
PurchaseOrderService
autoCloseFullyDisencumberedOrders
in interface PurchaseOrderService
PurchaseOrderService.autoCloseFullyDisencumberedOrders()
public boolean autoCloseRecurringOrders()
PurchaseOrderService
autoCloseRecurringOrders
in interface PurchaseOrderService
PurchaseOrderService.autoCloseRecurringOrders()
protected List<AutoClosePurchaseOrderView> filterDocumentsForAppDocStatusOpen(List<AutoClosePurchaseOrderView> autoClosePurchaseOrderViews)
List
- appDocStatus
- protected org.kuali.rice.krad.document.Document findDocument(String documentHeaderId)
documentHeaderId
- protected Calendar getTodayMinusThreeMonths()
protected org.kuali.rice.core.api.mail.MailMessage setMessageAddressesAndSubject(org.kuali.rice.core.api.mail.MailMessage message, String parameterEmail)
message
- The MailMessage object of the email to be sent.parameterEmail
- The String of email addresses with delimiters of ";" obtained from the system parameter.protected void sendMessage(org.kuali.rice.core.api.mail.MailMessage message, String emailBody)
message
- The MailMessage object containing information to be sent.emailBody
- The String containing the body of the email to be sent.protected void resetAutoCloseRecurringOrderDateParameter()
protected void resetAutoClosePurchaseOrderDateParameter()
protected List<String> getExcludedVendorChoiceCodes()
protected void createNoteForAutoCloseOrders(PurchaseOrderDocument purchaseOrderDocument, String annotation)
purchaseOrderDocument
- The purchase order document that is being closed by the batch job.annotation
- The string to appear on the note to be attached to the purchase order.public List<PurchasingCapitalAssetItem> retrieveCapitalAssetItemsForIndividual(Integer poId)
PurchaseOrderService
retrieveCapitalAssetItemsForIndividual
in interface PurchaseOrderService
poId
- Purchase Order ID used to retrieve the asset information for the current POPurchaseOrderService.retrieveCapitalAssetItemsForIndividual(java.lang.Integer)
public CapitalAssetSystem retrieveCapitalAssetSystemForOneSystem(Integer poId)
PurchaseOrderService
retrieveCapitalAssetSystemForOneSystem
in interface PurchaseOrderService
poId
- Purchase Order ID used to retrieve the asset information for the current POPurchaseOrderService.retrieveCapitalAssetSystemForOneSystem(java.lang.Integer)
public List<CapitalAssetSystem> retrieveCapitalAssetSystemsForMultipleSystem(Integer poId)
PurchaseOrderService
retrieveCapitalAssetSystemsForMultipleSystem
in interface PurchaseOrderService
poId
- Purchase Order ID used to retrieve the asset information for the current POPurchaseOrderService.retrieveCapitalAssetSystemsForMultipleSystem(java.lang.Integer)
protected void fixItemReferences(PurchaseOrderDocument po)
public List getPendingPurchaseOrderFaxes()
PurchaseOrderService
getPendingPurchaseOrderFaxes
in interface PurchaseOrderService
protected List<PurchaseOrderDocument> filterPurchaseOrderDocumentByAppDocStatus(Collection<PurchaseOrderDocument> purchaseOrderDocuments, String... appDocStatus)
paymentRequestDocuments
- appDocStatus
- protected List<String> filterPurchaseOrderDocumentNumbersByAppDocStatus(List<String> lookupDocNumbers, String... appDocStatus)
lookupDocNumbers
- appDocStatus
- public String getPurchaseOrderAppDocStatus(Integer poId)
PurchaseOrderService
getPurchaseOrderAppDocStatus
in interface PurchaseOrderService
protected void savePurchaseOrderData(PurchaseOrderDocument po)
po
- protected org.kuali.rice.kim.api.identity.PersonService getPersonService()
public void setB2bPurchaseOrderService(B2BPurchaseOrderService purchaseOrderService)
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService boService)
public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
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 setPrintService(PrintService printService)
public void setPurchaseOrderDao(PurchaseOrderDao purchaseOrderDao)
public void setWorkflowDocumentService(org.kuali.rice.kew.api.document.WorkflowDocumentService workflowDocumentService)
public void setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService)
public void setKualiRuleService(org.kuali.rice.krad.service.KualiRuleService kualiRuleService)
public void setVendorService(VendorService vendorService)
public void setRequisitionService(RequisitionService requisitionService)
public void setPurapWorkflowIntegrationService(PurApWorkflowIntegrationService purapWorkflowIntegrationService)
public void setMaintenanceDocumentService(org.kuali.rice.krad.service.MaintenanceDocumentService maintenanceDocumentService)
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
public void setMailService(org.kuali.rice.krad.service.MailService mailService)
public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
public void initiateTransmission(PurchaseOrderDocument po, PurApItem item)
initiateTransmission
in interface PurchaseOrderService
po
- public String getEmailAddress(VendorTransmissionFormatDetail vendorTransmissionFormatDetail)
public boolean savePurchaseOrderEdi(PurchaseOrderDocument po, String file, PurApItem item)
po
- file
- isRetransmit
- environment
- public boolean savePurchaseOrderPdf(PurchaseOrderDocument po, String file, PurApItem item)
public PurchaseOrderParameters getPurchaseOrderParameters()
public boolean processFTPTransmission(VendorTransmissionFormatDetail vendorTransmissionFormatDetail, String file, String fileName)
processFTPTransmission
in interface PurchaseOrderService
vendorTransmissionFormatDetail
- file
- fileName
- public String getVendorFormatType(Long id)
public String getVendorTransmissionType(Integer id)
public void sendEmail()
public OleSelectDocumentService getOleSelectDocumentService()
public void setOleSelectDocumentService(OleSelectDocumentService oleSelectDocumentService)
Copyright © 2004–2016 The Kuali Foundation. All rights reserved.