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 org.kuali.kfs.sys.businessobject.AccountingLine;
019 import org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntry;
020 import org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySourceDetail;
021 import org.kuali.rice.kns.document.TransactionalDocument;
022
023 /**
024 * Methods needed to update pending entries on FP year end documents
025 */
026 public interface YearEndPendingEntryService {
027 /**
028 * @return the previous fiscal year used with all GLPE
029 */
030 public abstract Integer getPreviousFiscalYear();
031
032 /**
033 * @return the accounting period code used with all GLPE
034 */
035 public abstract String getFinalAccountingPeriod();
036
037 /**
038 * populates a <code>GeneralLedgerPendingEntry</code> populated with common year end document data into the explicit general
039 * ledger pending entry. currently is the following:
040 * <ol>
041 * <li>fiscal period code = final accounting period code
042 * <li>fiscal year= previous fiscal year
043 * </ol>
044 *
045 * @param transactionalDocument
046 * @param accountingLine
047 * @param explicitEntry
048 */
049 public abstract void customizeExplicitGeneralLedgerPendingEntry(TransactionalDocument transactionalDocument, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry);
050
051 /**
052 * Populates an offset GeneralLedgerPendingEntry such that it uses the Offset Definition from the previous year
053 * @param transactionalDocument the transactional document with general ledger pending entries on it
054 * @param accountingLine the general ledger pending entry source which generated the explicit and offset entry
055 * @param explicitEntry the explicit entry requiring this offset entry
056 * @param offsetEntry the offset entry which is being customized
057 * @return whether the offset could be successfully customized for year end or not
058 */
059 public abstract boolean customizeOffsetGeneralLedgerPendingEntry(TransactionalDocument transactionalDocument, GeneralLedgerPendingEntrySourceDetail accountingLine, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry);
060
061
062
063
064 }