001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.opensource.org/licenses/ecl1.php
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.kuali.module.purap.dao;
017:
018: import java.sql.Date;
019: import java.util.Iterator;
020: import java.util.List;
021:
022: import org.kuali.core.util.KualiDecimal;
023: import org.kuali.module.purap.document.PaymentRequestDocument;
024: import org.kuali.module.purap.util.VendorGroupingHelper;
025:
026: /**
027: * Payment Request DAO Interface.
028: */
029: public interface PaymentRequestDao {
030:
031: /**
032: * Get all the payment requests that need to be extracted that match a credit memo.
033: *
034: * @param campusCode - limit results to a single chart
035: * @param paymentRequestIdentifier - Payment Request Identifier (can be null)
036: * @param purchaseOrderIdentifier - PO Identifier (can be null)
037: * @param vendorHeaderGeneratedIdentifier - Vendor Header ID
038: * @param vendorDetailAssignedIdentifier - Vendor Detail ID
039: * @return - list of payment requests that need to be extracted
040: */
041: public Iterator<PaymentRequestDocument> getPaymentRequestsToExtract(
042: String campusCode, Integer paymentRequestIdentifier,
043: Integer purchaseOrderIdentifier,
044: Integer vendorHeaderGeneratedIdentifier,
045: Integer vendorDetailAssignedIdentifier);
046:
047: /**
048: * Get all the payment requests that need to be extracted that match a credit memo.
049: *
050: * @param campusCode - limit results to a single chart
051: * @param vendor - Vendor Header ID, Vendor Detail ID, Country, Zip Code
052: * @return - list of payment requests that need to be extracted
053: */
054: public Iterator<PaymentRequestDocument> getPaymentRequestsToExtractForVendor(
055: String campusCode, VendorGroupingHelper vendor);
056:
057: /**
058: * Get all the payment requests that need to be extracted to PDP.
059: *
060: * @param onlySpecialPayments - true only include special payments, False - include all
061: * @param chartCode - if not null, limit results to a single chart
062: * @return - Iterator of payment requests
063: */
064: public Iterator<PaymentRequestDocument> getPaymentRequestsToExtract(
065: boolean onlySpecialPayments, String chartCode);
066:
067: /**
068: * Get all the payment requests that are marked immediate that need to be extracted to PDP.
069: *
070: * @param chartCode - chart of accounts code
071: * @return - Iterator of payment requests
072: */
073: public Iterator<PaymentRequestDocument> getImmediatePaymentRequestsToExtract(
074: String chartCode);
075:
076: /**
077: * Get all payment request documents that are eligible for auto-approval. Whether or not a document is eligible for
078: * auto-approval is determined according to whether or not the document total is below a pre-determined minimum amount. This
079: * amount is derived from the accounts, charts and/or organizations associated with a given document. If no minimum amount can
080: * be determined from chart associations a default minimum specified as a system parameter is used to determine the minimum
081: * amount threshold.
082: *
083: * @return - an Iterator over all payment request documents eligible for automatic approval
084: */
085: public List<PaymentRequestDocument> getEligibleForAutoApproval();
086:
087: /**
088: * Get a payment request document number by id.
089: *
090: * @param id - PaymentRequest Id
091: * @return - PaymentRequest or null if not found
092: */
093: public String getDocumentNumberByPaymentRequestId(Integer id);
094:
095: /**
096: * Retrieves a list of document numbers by purchase order id.
097: *
098: * @param id - purchase order id
099: * @return - list of document numbers
100: */
101: public List<String> getDocumentNumbersByPurchaseOrderId(Integer id);
102:
103: /**
104: * Retrieves a list of Payment Requests with the given vendor id and invoice number.
105: *
106: * @param vendorHeaderGeneratedId - header id of the vendor id
107: * @param vendorDetailAssignedId - detail id of the vendor id
108: * @param invoiceNumber - invoice number as entered by AP
109: * @return - List of Payment Requests.
110: */
111: public List getActivePaymentRequestsByVendorNumberInvoiceNumber(
112: Integer vendorHeaderGeneratedId,
113: Integer vendorDetailAssignedId, String invoiceNumber);
114:
115: /**
116: * Retrieves a list of Payment Requests with the given PO Id, invoice amount, and invoice date.
117: *
118: * @param poId - purchase order ID
119: * @param invoiceAmount - amount of the invoice as entered by AP
120: * @param invoiceDate - date of the invoice as entered by AP
121: * @return - List of Pay Reqs.
122: */
123: public List getActivePaymentRequestsByPOIdInvoiceAmountInvoiceDate(
124: Integer poId, KualiDecimal invoiceAmount, Date invoiceDate);
125:
126: /**
127: * Deletes the summary accounts by purap document id.
128: *
129: * @param purapDocumentIdentifier - purap document id
130: */
131: public void deleteSummaryAccounts(Integer purapDocumentIdentifier);
132:
133: }
|