/*
* Copyright 2007 The Kuali Foundation.
*
* Licensed under the Educational Community License, Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/ecl1.php
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kuali.module.purap.dao;
import java.sql.Date;
import java.util.Iterator;
import java.util.List;
import org.kuali.core.util.KualiDecimal;
import org.kuali.module.purap.document.PaymentRequestDocument;
import org.kuali.module.purap.util.VendorGroupingHelper;
/**
* Payment Request DAO Interface.
*/
public interface PaymentRequestDao {
/**
* Get all the payment requests that need to be extracted that match a credit memo.
*
* @param campusCode - limit results to a single chart
* @param paymentRequestIdentifier - Payment Request Identifier (can be null)
* @param purchaseOrderIdentifier - PO Identifier (can be null)
* @param vendorHeaderGeneratedIdentifier - Vendor Header ID
* @param vendorDetailAssignedIdentifier - Vendor Detail ID
* @return - list of payment requests that need to be extracted
*/
public Iterator<PaymentRequestDocument> getPaymentRequestsToExtract(String campusCode, Integer paymentRequestIdentifier, Integer purchaseOrderIdentifier, Integer vendorHeaderGeneratedIdentifier, Integer vendorDetailAssignedIdentifier);
/**
* Get all the payment requests that need to be extracted that match a credit memo.
*
* @param campusCode - limit results to a single chart
* @param vendor - Vendor Header ID, Vendor Detail ID, Country, Zip Code
* @return - list of payment requests that need to be extracted
*/
public Iterator<PaymentRequestDocument> getPaymentRequestsToExtractForVendor(String campusCode, VendorGroupingHelper vendor );
/**
* Get all the payment requests that need to be extracted to PDP.
*
* @param onlySpecialPayments - true only include special payments, False - include all
* @param chartCode - if not null, limit results to a single chart
* @return - Iterator of payment requests
*/
public Iterator<PaymentRequestDocument> getPaymentRequestsToExtract(boolean onlySpecialPayments, String chartCode);
/**
* Get all the payment requests that are marked immediate that need to be extracted to PDP.
*
* @param chartCode - chart of accounts code
* @return - Iterator of payment requests
*/
public Iterator<PaymentRequestDocument> getImmediatePaymentRequestsToExtract(String chartCode);
/**
* Get all payment request documents that are eligible for auto-approval. Whether or not a document is eligible for
* auto-approval is determined according to whether or not the document total is below a pre-determined minimum amount. This
* amount is derived from the accounts, charts and/or organizations associated with a given document. If no minimum amount can
* be determined from chart associations a default minimum specified as a system parameter is used to determine the minimum
* amount threshold.
*
* @return - an Iterator over all payment request documents eligible for automatic approval
*/
public List<PaymentRequestDocument> getEligibleForAutoApproval();
/**
* Get a payment request document number by id.
*
* @param id - PaymentRequest Id
* @return - PaymentRequest or null if not found
*/
public String getDocumentNumberByPaymentRequestId(Integer id);
/**
* Retrieves a list of document numbers by purchase order id.
*
* @param id - purchase order id
* @return - list of document numbers
*/
public List<String> getDocumentNumbersByPurchaseOrderId(Integer id);
/**
* Retrieves a list of Payment Requests with the given vendor id and invoice number.
*
* @param vendorHeaderGeneratedId - header id of the vendor id
* @param vendorDetailAssignedId - detail id of the vendor id
* @param invoiceNumber - invoice number as entered by AP
* @return - List of Payment Requests.
*/
public List getActivePaymentRequestsByVendorNumberInvoiceNumber(Integer vendorHeaderGeneratedId, Integer vendorDetailAssignedId, String invoiceNumber);
/**
* Retrieves a list of Payment Requests with the given PO Id, invoice amount, and invoice date.
*
* @param poId - purchase order ID
* @param invoiceAmount - amount of the invoice as entered by AP
* @param invoiceDate - date of the invoice as entered by AP
* @return - List of Pay Reqs.
*/
public List getActivePaymentRequestsByPOIdInvoiceAmountInvoiceDate(Integer poId, KualiDecimal invoiceAmount, Date invoiceDate);
/**
* Deletes the summary accounts by purap document id.
*
* @param purapDocumentIdentifier - purap document id
*/
public void deleteSummaryAccounts(Integer purapDocumentIdentifier);
}
|