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.sql.Timestamp; 19 20 import org.kuali.rice.core.api.util.type.KualiDecimal; 21 22 /** 23 * 24 * This service interface defines the methods that a DisbursementVoucherTravelService implementation must provide. 25 * 26 * Performs calculations of travel per diem and mileage amounts. 27 * 28 */ 29 public interface DisbursementVoucherTravelService { 30 31 /** 32 * 33 * Calculates the per diem travel amount. 34 * 35 * @param startDateTime The start date and time of the period of time we will calculate the per diem amount for. 36 * @param endDateTime The end date and time of the period of time we will calculate the per diem amount for. 37 * @param perDiemRate The per diem rate used to calculate the total amount. 38 * @return The per diem amount for the time period passed in and based on the rate given. 39 */ 40 public KualiDecimal calculatePerDiemAmount(Timestamp startDateTime, Timestamp endDateTime, KualiDecimal perDiemRate); 41 42 /** 43 * 44 * Calculates the mileage travel amount. 45 * 46 * @param totalMileage The total distance traveled. 47 * @param travelStartDate The start date of the travel. 48 * @return The mileage amount for the mileage given. 49 */ 50 public KualiDecimal calculateMileageAmount(Integer totalMileage, Timestamp travelStartDate); 51 52 }