View Javadoc
1   /*
2    * Copyright 2007 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.module.purap.service;
17  
18  import org.kuali.ole.module.purap.document.*;
19  import org.kuali.ole.sys.businessobject.AccountingLine;
20  import org.kuali.ole.sys.businessobject.GeneralLedgerPendingEntry;
21  
22  
23  public interface PurapGeneralLedgerService {
24  
25      public final static String CREATE_PAYMENT_REQUEST = "create";
26      public final static String CANCEL_PAYMENT_REQUEST = "cancel";
27      public final static String MODIFY_PAYMENT_REQUEST = "modify";
28      public final static String CREATE_INVOICE = "create";
29      public final static String CANCEL_INVOICE = "cancel";
30      public final static String MODIFY_INVOICE = "modify";
31      public final static boolean CREATE_CREDIT_MEMO = false;
32      public final static boolean CANCEL_CREDIT_MEMO = !CREATE_CREDIT_MEMO;
33  
34      /**
35       * Customize the given general ledger entry based on the document type.
36       *
37       * @param purapDocument           Document creating entries
38       * @param accountingLine          AccountingLine from document used to create the pending entry
39       * @param explicitEntry           GeneralLedgerPendingEntry that has been created with account info
40       * @param referenceDocumentNumber Number of the referenced document
41       * @param debitCreditCode         String field indicating if the entry is a debit or credit
42       * @param docType                 Document type creating the pending entries
43       * @param isEncumbrance           Boolean to indicate if the entry is an encumbrance
44       */
45      public void customizeGeneralLedgerPendingEntry(PurchasingAccountsPayableDocument purapDocument, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry, Integer referenceDocumentNumber, String debitCreditCode, String docType, boolean isEncumbrance);
46  
47      /**
48       * Generates general ledger pending entries for the creation of a Payment Request
49       *
50       * @param preq PaymentRequestDocument which holds the accounts to create the entries
51       */
52      public void generateEntriesCreatePaymentRequest(PaymentRequestDocument preq);
53  
54      /**
55       * Generates general ledger pending entries for the modification of a Payment Request. No entries will be created if the
56       * calculated change is zero (meaning no change was made). Also, no encumbrance entries will be created.
57       *
58       * @param preq PaymentRequestDocument which holds the accounts to create the entries
59       */
60      public void generateEntriesModifyPaymentRequest(PaymentRequestDocument preq);
61  
62      public void generateEntriesModifyInvoice(InvoiceDocument inv);
63  
64      /**
65       * Generates general ledger pending entries for the creation of a Credit Memo
66       *
67       * @param cm CreditMemoDocument which holds the accounts to create the entries
68       */
69      public void generateEntriesCreateCreditMemo(VendorCreditMemoDocument cm);
70  
71      /**
72       * Generates general ledger pending entries for the creation of a Invoice
73       *
74       * @param inv InvoiceDocument which holds the accounts to create the entries
75       */
76      public void generateEntriesCreateInvoice(InvoiceDocument inv);
77  
78      /**
79       * Generates general ledger pending entries for the cancellation of an Accounts Payable document.
80       *
81       * @param apDocument AccountsPayableDocument which holds the accounts to create the entries for the cancellation
82       */
83      public void generateEntriesCancelAccountsPayableDocument(AccountsPayableDocument apDocument);
84  
85      /**
86       * Generates general ledger pending entries for the amendment of a Purchase Order
87       *
88       * @param po PurchaseOrderDocument which holds the accounts to create the entries
89       */
90      public void generateEntriesApproveAmendPurchaseOrder(PurchaseOrderDocument po);
91  
92      /**
93       * Generates general ledger pending entries for when a Purchase Order is closed which will disencumber all the remaining
94       * encumbrances
95       *
96       * @param po PurchaseOrderDocument which holds the accounts to create the entries
97       */
98      public void generateEntriesClosePurchaseOrder(PurchaseOrderDocument po);
99  
100     /**
101      * Generates general ledger pending entries for when a Purchase Order is reopened which will calculate the funds to be
102      * re-encumbered
103      *
104      * @param po PurchaseOrderDocument which holds the accounts to create the entries
105      */
106     public void generateEntriesReopenPurchaseOrder(PurchaseOrderDocument po);
107 
108     /**
109      * Generates general ledger pending entries for when a Purchase Order is voided
110      *
111      * @param po PurchaseOrderDocument which holds the accounts to create the entries
112      */
113     public void generateEntriesVoidPurchaseOrder(PurchaseOrderDocument po);
114 
115 }