001    /*
002     * Copyright 2011 The Kuali Foundation.
003     * 
004     * Licensed under the Educational Community License, Version 2.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/ecl2.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.kfs.module.ar.document.dataaccess;
017    
018    import java.util.Collection;
019    import java.util.List;
020    
021    import org.kuali.kfs.module.ar.document.CustomerInvoiceDocument;
022    
023    public interface CustomerInvoiceDocumentDao {
024        
025        /**
026         * 
027         * Retrieves all Invoice document numbers that meet the following criteria: 
028         * 1) PrintIndicator = BY_USER
029         * 2) PrintDate = null 
030         * 3) DocHeader.Status = Approved
031         * 
032         * WARNING that all the returned documents lack any workflow wiring.
033         * 
034         * @param initiatorPrincipalName
035         * @return
036         */
037        public List<String> getPrintableCustomerInvoiceDocumentNumbersFromUserQueue();
038    
039        /**
040         * 
041         * Retrieves all Invoice document numbers in the system associated with the given 
042         * Processing Chart and Org, that are approved and ready to print.
043         * 
044         * WARNING that all the returned documents lack any workflow wiring.
045         * 
046         * @param chartOfAccountsCode
047         * @param organizationCode
048         * @return
049         */
050        public List<String> getPrintableCustomerInvoiceDocumentNumbersByProcessingChartAndOrg(String chartOfAccountsCode, String organizationCode);
051        
052        /**
053         * 
054         * Retrieves all Invoice document numbers in the system associated with the given 
055         * Billing Chart and Org, that are approved and ready to print.
056         * 
057         * WARNING that all the returned documents lack any workflow wiring.
058         * 
059         * @param chartOfAccountsCode
060         * @param organizationCode
061         * @return
062         */
063        public List<String> getPrintableCustomerInvoiceDocumentNumbersByBillingChartAndOrg(String chartOfAccountsCode, String organizationCode);
064    
065        /**
066         * 
067         * Retrieves all Invoice document numbers in the system associated with the given 
068         * Billing Chart and Org, that are approved but disregards ready to print and print date as this is for Billing Statement generation.
069         * 
070         * WARNING that all the returned documents lack any workflow wiring.
071         * 
072         * @param chartOfAccountsCode
073         * @param organizationCode
074         * @return
075         */
076        public List<String> getPrintableCustomerInvoiceDocumentNumbersForBillingStatementByBillingChartAndOrg(String chartOfAccountsCode, String organizationCode);
077        
078        /**
079         * 
080         * Retrieves all Invoice document numbers in the system associated with the given 
081         * Processing Chart and Org.
082         * 
083         * WARNING that all the returned documents lack any workflow wiring.
084         * 
085         * @param chartOfAccountsCode
086         * @param organizationCode
087         * @return
088         */
089        public List<String> getCustomerInvoiceDocumentNumbersByProcessingChartAndOrg(String chartOfAccountsCode, String organizationCode);
090        
091        /**
092         * 
093         * Retrieves all Invoice document numbers in the system associated with the given 
094         * Billing Chart and Org.
095         * 
096         * WARNING that all the returned documents lack any workflow wiring.
097         * 
098         * @param chartOfAccountsCode
099         * @param organizationCode
100         * @return
101         */
102        public List<String> getCustomerInvoiceDocumentNumbersByBillingChartAndOrg(String chartOfAccountsCode, String organizationCode);
103        
104        /**
105         * 
106         * Retrieves all Open invoices, with outstanding balances.
107         * 
108         * @return
109         */
110        public Collection getAllOpen();
111        
112        /**
113         * 
114         * Retrieves all Open invoices from the specified Customer Number.
115         * @param customerNumber
116         * @return
117         */
118        public Collection getOpenByCustomerNumber(String customerNumber);
119        
120        /**
121         * 
122         * Retrieves all Open invoices, by the specified Customer Name and Customer Type Code
123         * 
124         * Retrieves all Open invoices, by the specified Customer Name (a LIKE customerName* search) and Customer Type Code.
125         * 
126         * @param customerName
127         * @param customerTypeCode
128         * @return
129         */
130        public Collection getOpenByCustomerNameByCustomerType(String customerName, String customerTypeCode);
131        
132        /**
133         * 
134         * Retrieves all Open invoices, by the specified Customer Name.
135         * 
136         * NOTE - this search uses customerName as a leading substring search, 
137         * so it will return anything matching a customerName that begins with the 
138         * value passed in.  ie, a LIKE customerName* search.
139         * 
140         * @param customerName
141         * @return
142         */
143        public Collection getOpenByCustomerName(String customerName);
144        
145        /**
146         * 
147         * Retrieves all Open invoices, by the specified Customer Type Code.
148         * @param customerTypeCode
149         * @return
150         */
151        public Collection getOpenByCustomerType(String customerTypeCode);
152        
153        /**
154         * @param organizationInvoiceNumber
155         * @return
156         */
157        public CustomerInvoiceDocument getInvoiceByOrganizationInvoiceNumber(String organizationInvoiceNumber);
158        
159        /**
160         * @param documentNumber
161         * @return
162         */
163        public CustomerInvoiceDocument getInvoiceByInvoiceDocumentNumber(String documentNumber);
164    }