View Javadoc
1   /*
2    * Copyright 2011 The Kuali Foundation.
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.select.document.service;
17  
18  import org.kuali.ole.batch.bo.OLEBatchProcessProfileBo;
19  import org.kuali.ole.docstore.common.document.content.bib.marc.BibMarcRecord;
20  import org.kuali.ole.module.purap.businessobject.PurApItem;
21  import org.kuali.ole.module.purap.document.PaymentRequestDocument;
22  import org.kuali.ole.module.purap.document.service.InvoiceService;
23  import org.kuali.ole.module.purap.util.ExpiredOrClosedAccountEntry;
24  import org.kuali.ole.pojo.OleInvoiceRecord;
25  import org.kuali.ole.select.businessobject.OleInvoiceItem;
26  import org.kuali.ole.select.document.OleInvoiceDocument;
27  import org.kuali.ole.select.form.OLEInvoiceForm;
28  import org.kuali.ole.vnd.businessobject.OleExchangeRate;
29  import org.kuali.rice.core.api.util.type.KualiDecimal;
30  import org.kuali.rice.kew.api.exception.WorkflowException;
31  
32  import java.util.HashMap;
33  import java.util.List;
34  
35  public interface OleInvoiceService extends InvoiceService {
36  
37      public void completePaymentDocument(OleInvoiceDocument invoiceDocument);
38  
39      public void calculateProrateItemSurcharge(OleInvoiceDocument invoiceDocument);
40  
41      public boolean validateProratedSurcharge(OleInvoiceDocument invoiceDocument);
42  
43      public void calculateWithoutProrates(OleInvoiceDocument invoiceDocument);
44  
45      /**
46       * Checks whether the invoice document is eligible for auto approval. If so, then updates
47       * the status of the document to auto approved and calls the documentService to blanket approve
48       * the document, then returns false.
49       * If the document is not eligible for auto approval then returns true.
50       *
51       * @param doc The invoice document to be auto approved.
52       * @return boolean true if the invoice document is not eligible for auto approval.
53       * @throws RuntimeException To indicate to Spring transactional management that the transaction for this document should be rolled back
54       */
55      public boolean autoApprovePaymentRequest(PaymentRequestDocument doc);
56  
57      public void createPaymentRequestOrCreditMemoDocument(OleInvoiceDocument inv);
58  
59      public OleInvoiceDocument populateInvoiceFromPurchaseOrders(OleInvoiceDocument invoiceDocument, HashMap<String, ExpiredOrClosedAccountEntry> expiredOrClosedAccountList);
60  
61      public void populateInvoice(OleInvoiceDocument invoiceDocument);
62  
63      public OleInvoiceDocument populateVendorDetail(String vendorNumber, OleInvoiceDocument oleInvoiceDocument);
64  
65      public void createCreditMemoDocument(OleInvoiceDocument invoiceDocument, List<OleInvoiceItem> item,boolean flag);
66  
67      public OleInvoiceDocument getInvoiceDocumentById(Integer invoiceIdentifier);
68  
69      public String saveInvoiceDocument(OleInvoiceDocument invoiceDocument) throws WorkflowException;
70  
71      public String routeInvoiceDocument(OleInvoiceDocument invoiceDocument) throws WorkflowException;
72  
73      public boolean autoApprovePaymentRequest(OleInvoiceDocument doc);
74  
75      public OleInvoiceDocument populateInvoiceItems (OleInvoiceDocument invoiceDocument);
76  
77      public OleInvoiceDocument populateInvoiceDocument (OleInvoiceDocument invoiceDocument);
78  
79      public void calculateAccount(PurApItem purapItem);
80  
81      public void convertPOItemToInvoiceItem (OleInvoiceDocument oleInvoiceDocument);
82  
83      public String createInvoiceNoMatchQuestionText(OleInvoiceDocument invoiceDocument);
84  
85      public String createSubscriptionDateOverlapQuestionText(OleInvoiceDocument invoiceDocument);
86  
87      public String getParameter(String name);
88  
89      public KualiDecimal getTotalDollarAmountWithExclusionsSubsetItems(String[] excludedTypes, boolean includeBelowTheLine, List<PurApItem> itemsForTotal);
90  
91      public String[] getCollapseSections();
92  
93      public String[] getDefaultCollapseSections();
94  
95      public boolean canCollapse(String sectionName,String[] collapseSections);
96  
97      public boolean isDuplicationExists(OleInvoiceDocument invoiceDocument, OLEInvoiceForm invoiceForm, boolean isBlanketApprove);
98  
99      public String getPaymentMethodType(String paymentId);
100 
101     public boolean validateDepositAccount(OleInvoiceDocument oleInvoiceDocument);
102 
103     public boolean isNotificationRequired(OleInvoiceDocument invoiceDocument);
104 
105     public String createInvoiceAmountExceedsThresholdText(OleInvoiceDocument oleInvoiceDocument);
106 
107     public OleInvoiceRecord populateValuesFromProfile(BibMarcRecord bibMarcRecord);
108 
109     public void setOleBatchProcessProfileBo(OLEBatchProcessProfileBo oleBatchProcessProfileBo);
110 
111     public void setDefaultAndConstantValuesToInvoiceRecord(OleInvoiceRecord oleInvoiceRecord);
112 
113     public String getCurrencyType(String currencyTypeId);
114 
115     public OleExchangeRate getExchangeRate(String currencyTypeId);
116 
117     public String getCurrencyTypeIdFromCurrencyType(String currencyType);
118 
119     public void deleteInvoiceItem(OleInvoiceDocument oleInvoiceDocument);
120 }