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.fp.document.service;
017
018 import java.util.List;
019
020 import org.kuali.kfs.fp.document.DisbursementVoucherDocument;
021 import org.kuali.rice.kns.util.KualiDecimal;
022
023 /**
024 *
025 * This service interface defines the methods that a DisbursementVoucherTaxService implementation must provide.
026 *
027 * Handles queries and validation on tax id numbers.
028 *
029 */
030 public interface DisbursementVoucherTaxService {
031
032 /**
033 * Returns the vendor id number whose tax number matches the number passed in, or null if no vendor is found.
034 *
035 * @param taxIDNumber A vendor tax id number.
036 * @param taxpayerTypeCode A vendor tax payer type code.
037 * @return The id of the vendor found with a matching tax id number and payer type code, or null if no vendor is found.
038 */
039 public String getVendorId(String taxIDNumber, String taxpayerTypeCode);
040
041 /**
042 * Returns the employee id number whose tax number matches the number passed in, or null if no employee is found.
043 *
044 * @param taxIDNumber A vendor tax id number.
045 * @param taxpayerTypeCode A vendor tax payer type code.
046 * @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.
047 */
048 public String getUniversalId(String taxIDNumber, String taxpayerTypeCode);
049
050 /**
051 * Removes non-resident alien tax lines from the document's accounting lines and updates the check total.
052 *
053 * @param document The disbursement voucher document being modified.
054 */
055 public void clearNRATaxLines(DisbursementVoucherDocument document);
056
057 /**
058 * Generates new tax lines based on associated non-resident alien information, and debits the check total
059 *
060 * @param document The disbursement voucher document being modified.
061 */
062 public void processNonResidentAlienTax(DisbursementVoucherDocument document);
063
064 /**
065 * Returns the non-resident alien accounting line tax amount (if any).
066 *
067 * @param document The disbursement voucher being reviewed.
068 * @return The total tax amount of the non-resident alien accounting lines for the given disbursement voucher document.
069 */
070 public KualiDecimal getNonResidentAlienTaxAmount(DisbursementVoucherDocument document);
071
072 /**
073 * Returns a list of Integers representing the non-resident alien tax line numbers parsed from the line string.
074 *
075 * @param taxLineString The tax line representation as as string that will be parsed for the non-resident alien tax line numbers.
076 * @return A collection of Integers representing the line numbers of non-resident alien tax lines.
077 */
078 public List getNRATaxLineNumbers(String taxLineString);
079 }