View Javadoc
1   /*
2    * Copyright 2006 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.fp.document.service;
17  
18  import java.util.List;
19  
20  import org.kuali.ole.fp.document.DisbursementVoucherDocument;
21  import org.kuali.rice.core.api.util.type.KualiDecimal;
22  
23  /**
24   * 
25   * This service interface defines the methods that a DisbursementVoucherTaxService implementation must provide.
26   * 
27   * Handles queries and validation on tax id numbers.
28   * 
29   */
30  public interface DisbursementVoucherTaxService {
31  
32      /**
33       * Returns the vendor id number whose tax number matches the number passed in, or null if no vendor is found.
34       * 
35       * @param taxIDNumber A vendor tax id number.
36       * @param taxpayerTypeCode A vendor tax payer type code.
37       * @return The id of the vendor found with a matching tax id number and payer type code, or null if no vendor is found.
38       */
39      public String getVendorId(String taxIDNumber, String taxpayerTypeCode);
40  
41      /**
42       * Returns the employee id number whose tax number matches the number passed in, or null if no employee is found.
43       * 
44       * @param taxIDNumber A vendor tax id number.
45       * @param taxpayerTypeCode A vendor tax payer type code.
46       * @return The universal id of the employee found with a matching tax id number and payer type code, or null if no employee is found.
47       */
48      public String getUniversalId(String taxIDNumber, String taxpayerTypeCode);
49  
50      /**
51       * Removes non-resident alien tax lines from the document's accounting lines and updates the check total.
52       * 
53       * @param document The disbursement voucher document being modified.
54       */
55      public void clearNRATaxLines(DisbursementVoucherDocument document);
56  
57      /**
58       * Clears non-resident alien tax info.
59       * 
60       * @param document The disbursement voucher document being modified.
61       */
62      public void clearNRATaxInfo(DisbursementVoucherDocument document);
63      
64      /**
65       * Generates new tax lines based on associated non-resident alien information, and debits the check total
66       * 
67       * @param document The disbursement voucher document being modified.
68       */
69      public void processNonResidentAlienTax(DisbursementVoucherDocument document);
70  
71      /**
72       * Returns the non-resident alien accounting line tax amount (if any).
73       * 
74       * @param document The disbursement voucher being reviewed.
75       * @return The total tax amount of the non-resident alien accounting lines for the given disbursement voucher document.
76       */
77      public KualiDecimal getNonResidentAlienTaxAmount(DisbursementVoucherDocument document);
78  
79      /**
80       * Returns a list of Integers representing the non-resident alien tax line numbers parsed from the line string.
81       * 
82       * @param taxLineString The tax line representation as as string that will be parsed for the non-resident alien tax line numbers.
83       * @return A collection of Integers representing the line numbers of non-resident alien tax lines.
84       */
85      public List getNRATaxLineNumbers(String taxLineString);
86  }