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.service;
017    
018    import java.sql.Date;
019    
020    import org.kuali.kfs.module.ar.businessobject.CustomerInvoiceDetail;
021    import org.kuali.kfs.module.ar.document.CustomerInvoiceDocument;
022    
023    public interface InvoiceRecurrenceDocumentService {
024            
025        /**
026         * This method returns true if customer invoice detail amount can be taxed.
027         * 
028         * @param customer
029         * @param customerInvoiceDetail
030         * @return
031         */
032        public boolean isCustomerInvoiceDetailTaxable( CustomerInvoiceDocument document, CustomerInvoiceDetail customerInvoiceDetail );
033        
034        /**
035         * This method returns the appropriate postal code for taxation
036         * @param document
037         * @return
038         */
039        public String getPostalCodeForTaxation( CustomerInvoiceDocument document );
040    
041        /**
042         * This method returns true if the invoice has an approved status.
043         * 
044         * @param invoiceNumber
045         * @return
046         */
047        public boolean isInvoiceApproved( String invoiceNumber ) ;
048    
049        /**
050         * This method returns true if the bein date is valid.
051         * 
052         * @param invoiceNumber
053         * @return
054         */
055        public boolean isValidRecurrenceBeginDate( Date beginDate ) ;
056    
057        /**
058         * This method returns true if the end date is valid.
059         * 
060         * @param invoiceNumber
061         * @return
062         */
063        public boolean isValidRecurrenceEndDate( Date beginDate, Date endDate ) ;
064    
065        /**
066         * This method returns true if the end date and number of recurrences are valid if entered together.
067         * 
068         * @param invoiceNumber
069         * @return
070         */
071        public boolean isValidEndDateAndTotalRecurrenceNumber( Date beginDate, Date endDate, Integer totalRecurrenceNumber, String intervalCode ) ;
072    
073        /**
074         * This method returns true if one of the end date or the number of recurrences is entered.
075         * 
076         * @param invoiceNumber
077         * @return
078         */
079        public boolean isValidEndDateOrTotalRecurrenceNumber( Date endDate, Integer totalRecurrenceNumber ) ;
080    
081        /**
082         * This method returns true if the number of recurrences is not more than the maximum allowed.
083         * 
084         * @param invoiceNumber
085         * @return
086         */
087        public boolean isValidMaximumNumberOfRecurrences( Integer totalRecurrenceNumber, String intervalCode ) ;
088    
089        /**
090         * This method returns true if the initiator is valid.
091         * 
092         * @param invoiceNumber
093         * @return
094         */
095        public boolean isValidInitiator( String initiator ) ;
096    
097        
098    }