1 /* 2 * The Kuali Financial System, a comprehensive financial management system for higher education. 3 * 4 * Copyright 2005-2014 The Kuali Foundation 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU Affero General Public License as 8 * published by the Free Software Foundation, either version 3 of the 9 * License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU Affero General Public License for more details. 15 * 16 * You should have received a copy of the GNU Affero General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 package org.kuali.kfs.integration.ar; 20 21 import java.sql.Date; 22 import java.util.List; 23 24 import org.kuali.kfs.integration.cg.ContractsAndGrantsBillingAward; 25 import org.kuali.rice.core.api.util.type.KualiDecimal; 26 27 /** 28 * Methods needed for Contracts & Grants modules to interact with an Accounts Receivable module to perform Contracts & Grants Billing 29 * operations. 30 * NOTE: If you are not using Contracts & Grants Billing functionality, then there is no reason for your institution to implement this service; 31 * just use the provided no op implementation 32 */ 33 public interface AccountsReceivableModuleBillingService { 34 /** 35 * This method gets the award billed to date amount using ContractsGrantsInvoiceDocumentService 36 * 37 * @param award the award to find the total billed to date for 38 * @return the total amount billed to date on the award 39 */ 40 public KualiDecimal getAwardBilledToDateAmount(ContractsAndGrantsBillingAward award); 41 42 /** 43 * This method calculates total payments to date by Award using ContractsGrantsInvoiceDocumentService 44 * 45 * @param proposalNumber 46 * @return 47 */ 48 public KualiDecimal calculateTotalPaymentsToDateByAward(Long proposalNumber); 49 50 /** 51 * This method returns a new instance of the MilestoneSchedule class. 52 * 53 * @return new MilestoneSchedule instance 54 */ 55 public AccountsReceivableMilestoneSchedule getMilestoneSchedule(); 56 57 /** 58 * This method returns a new instance of the PredeterminedBillingSchedule class. 59 * 60 * @return new PredeterminedBillingSchedule instance 61 */ 62 public AccountsReceivablePredeterminedBillingSchedule getPredeterminedBillingSchedule(); 63 64 /** 65 * Checks to see if the award corresponding to the passed in proposalNumber has a 66 * MilestoneSchedule associated with it. 67 * 68 * @param proposalNumber proposalNumber for the Award use as key to look for MilestoneSchedule 69 * @return true if there is an active MilestoneSchedule for this proposalNumber, false otherwise 70 */ 71 public boolean hasMilestoneSchedule(Long proposalNumber); 72 73 /** 74 * Checks to see if the award corresponding to the passed in proposalNumber has a 75 * PredeterminedBillingSchedule associated with it. 76 * 77 * @param proposalNumber proposalNumber for the Award use as key to look for PredeterminedBillingSchedule 78 * @return true if there is an active PredeterminedBillingSchedule for this proposalNumber, false otherwise 79 */ 80 public boolean hasPredeterminedBillingSchedule(Long proposalNumber); 81 82 /** 83 * Checks to see if the award corresponding to the passed in proposalNumber has active 84 * Milestones associated with it. 85 * 86 * @param proposalNumber proposalNumber for the Award use as key to look for MilestoneSchedule 87 * @return true if there is at least one active Milestone for this proposalNumber, false otherwise 88 */ 89 public boolean hasActiveMilestones(Long proposalNumber); 90 91 /** 92 * Checks to see if the award corresponding to the passed in proposalNumber has active 93 * Bills associated with it. 94 * 95 * @param proposalNumber proposalNumber for the Award use as key to look for PredeterminedBillingSchedule 96 * @return true if there is at least one active Bill for this proposalNumber, false otherwise 97 */ 98 public boolean hasActiveBills(Long proposalNumber); 99 100 /** 101 * Calculate the lastBilledDate for the Award based on it's AwardAccounts 102 * 103 * @param award the Award used to calculate lastBilledDate 104 * @return the lastBilledDate 105 */ 106 public Date getLastBilledDate(ContractsAndGrantsBillingAward award); 107 108 /** 109 * This method checks the Contract Control account set for Award Account based on award's invoicing option. 110 * 111 * @return errorString 112 */ 113 public List<String> checkAwardContractControlAccounts(ContractsAndGrantsBillingAward award); 114 115 /** 116 * Gets the Contracts & Grants Invoice Document Type 117 * 118 * @return Contracts & Grants Invoice Document Type 119 */ 120 public String getContractsGrantsInvoiceDocumentType(); 121 122 /** 123 * Determines whether the CG and Billing Enhancements are on from the system parameters 124 * 125 * @return true if Contracts & Grants Billing enhancement is enabled 126 */ 127 public boolean isContractsGrantsBillingEnhancementActive(); 128 129 /** 130 * Gets the Default Dunning Campaign code 131 * 132 * @return Default Dunning Campaign code 133 */ 134 135 public String getDefaultDunningCampaignCode(); 136 137 138 /** 139 * Gets the Default Billing Frequency code 140 * 141 * @return Default Billing Frequency code 142 */ 143 public String getDefaultBillingFrequency(); 144 145 /** 146 * Gets the Default Invoicing Option code 147 * 148 * @return Default Invoicing Option code 149 */ 150 public String getDefaultInvoicingOption(); 151 152 }