@Transactional public class PurapGeneralLedgerServiceImpl extends Object implements PurapGeneralLedgerService
CANCEL_CREDIT_MEMO, CANCEL_INVOICE, CANCEL_PAYMENT_REQUEST, CREATE_CREDIT_MEMO, CREATE_INVOICE, CREATE_PAYMENT_REQUEST, MODIFY_INVOICE, MODIFY_PAYMENT_REQUEST| Constructor and Description | 
|---|
| PurapGeneralLedgerServiceImpl() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected org.kuali.rice.core.api.util.type.KualiDecimal | calculateQuantityChange(boolean cancel,
                                              PurchaseOrderItem poItem,
                                              org.kuali.rice.core.api.util.type.KualiDecimal cmQuantity)Calculate quantity change for creating Credit Memo entries | 
| void | customizeGeneralLedgerPendingEntry(PurchasingAccountsPayableDocument purapDocument,
                                                                    AccountingLine accountingLine,
                                                                    GeneralLedgerPendingEntry explicitEntry,
                                                                    Integer referenceDocumentNumber,
                                                                    String debitCreditCode,
                                                                    String docType,
                                                                    boolean isEncumbrance)Customize the given general ledger entry based on the document type. | 
| protected String | entryDescription(String description)Format description for general ledger entry. | 
| void | generateEntriesApproveAmendPurchaseOrder(PurchaseOrderDocument po)Generates general ledger pending entries for the amendment of a Purchase Order | 
| void | generateEntriesCancelAccountsPayableDocument(AccountsPayableDocument apDocument)Generates general ledger pending entries for the cancellation of an Accounts Payable document. | 
| protected void | generateEntriesCancelCreditMemo(VendorCreditMemoDocument cm)Called from generateEntriesCancelAccountsPayableDocument() for Payment Request Document | 
| protected void | generateEntriesCancelInvoice(InvoiceDocument prqs) | 
| protected void | generateEntriesCancelPaymentRequest(PaymentRequestDocument preq)Called from generateEntriesCancelAccountsPayableDocument() for Payment Request Document | 
| void | generateEntriesClosePurchaseOrder(PurchaseOrderDocument po)Generates general ledger pending entries for when a Purchase Order is closed which will disencumber all the remaining
 encumbrances | 
| void | generateEntriesCreateCreditMemo(VendorCreditMemoDocument cm)Generates general ledger pending entries for the creation of a Credit Memo | 
| void | generateEntriesCreateInvoice(InvoiceDocument inv)Generates general ledger pending entries for the creation of a Invoice | 
| void | generateEntriesCreatePaymentRequest(PaymentRequestDocument preq)Generates general ledger pending entries for the creation of a Payment Request | 
| protected boolean | generateEntriesCreditMemo(VendorCreditMemoDocument cm,
                                                  boolean isCancel)Creates the general ledger entries for Credit Memo actions. | 
| protected boolean | generateEntriesInvoice(InvoiceDocument inv,
                                            List encumbrances,
                                            List summaryAccounts,
                                            String processType)Creates the general ledger entries for Invoice actions. | 
| void | generateEntriesModifyInvoice(InvoiceDocument inv) | 
| void | generateEntriesModifyPaymentRequest(PaymentRequestDocument preq)Generates general ledger pending entries for the modification of a Payment Request. | 
| protected boolean | generateEntriesPaymentRequest(PaymentRequestDocument preq,
                                                          List encumbrances,
                                                          List summaryAccounts,
                                                          String processType)Creates the general ledger entries for Payment Request actions. | 
| void | generateEntriesReopenPurchaseOrder(PurchaseOrderDocument po)Generates general ledger pending entries for when a Purchase Order is reopened which will calculate the funds to be
 re-encumbered | 
| void | generateEntriesVoidPurchaseOrder(PurchaseOrderDocument po)Generates general ledger pending entries for when a Purchase Order is voided | 
| protected List<SourceAccountingLine> | getCreditMemoEncumbrance(VendorCreditMemoDocument cm,
                                                PurchaseOrderDocument po,
                                                boolean cancel)Re-encumber the Encumbrance on a PO based on values in a PREQ. | 
| protected int | getNextAvailableSequence(String documentNumber)Retrieves the next available sequence number from the general ledger pending entry table for this document | 
| protected PurchaseOrderItem | getPoItem(PurchaseOrderDocument po,
                  Integer nbr,
                  ItemType itemType)Find item in PO based on given parameters. | 
| protected List<SourceAccountingLine> | reencumberEncumbrance(InvoiceDocument prqs) | 
| protected List<SourceAccountingLine> | reencumberEncumbrance(PaymentRequestDocument preq)Re-encumber the Encumbrance on a PO based on values in a PREQ. | 
| protected List<SourceAccountingLine> | relieveEncumbrance(InvoiceDocument inv)Relieve the Encumbrance on a PO based on values in a PREQ. | 
| protected List<SourceAccountingLine> | relieveEncumbrance(PaymentRequestDocument preq)Relieve the Encumbrance on a PO based on values in a PREQ. | 
| protected void | saveAccountsPayableSummaryAccounts(List<SummaryAccount> summaryAccounts,
                                                                    Integer purapDocumentIdentifier,
                                                                    String docType)Save the given accounts for the given document. | 
| protected void | saveGLEntries(List<GeneralLedgerPendingEntry> glEntries)Save the given general ledger entries | 
| protected void | saveInvoiceAccountsPayableSummaryAccounts(List<SummaryAccount> summaryAccounts,
                                                                                  Integer purapDocumentIdentifier,
                                                                                  String docType)Save the given accounts for the given document. | 
| void | setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService) | 
| void | setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService) | 
| void | setGeneralLedgerPendingEntryService(GeneralLedgerPendingEntryService generalLedgerPendingEntryService) | 
| void | setInvoiceService(InvoiceService invoiceService)Sets the invoiceService attribute value. | 
| void | setKualiRuleService(org.kuali.rice.krad.service.KualiRuleService kualiRuleService) | 
| void | setObjectCodeService(ObjectCodeService objectCodeService) | 
| void | setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService) | 
| void | setPaymentRequestService(PaymentRequestService paymentRequestService) | 
| void | setPurapAccountingService(PurapAccountingService purapAccountingService) | 
| void | setPurchaseOrderService(PurchaseOrderService purchaseOrderService) | 
| void | setSubObjectCodeService(SubObjectCodeService subObjectCodeService) | 
| void | setUniversityDateService(UniversityDateService universityDateService) | 
| protected boolean | shouldGenerateGLPEForPurchaseOrder(PurchaseOrderDocument po)We should not generate general ledger pending entries for Purchase Order Close Document and
 Purchase Order Reopen Document with $0 amount. | 
public PurapGeneralLedgerServiceImpl()
public void customizeGeneralLedgerPendingEntry(PurchasingAccountsPayableDocument purapDocument, AccountingLine accountingLine, GeneralLedgerPendingEntry explicitEntry, Integer referenceDocumentNumber, String debitCreditCode, String docType, boolean isEncumbrance)
PurapGeneralLedgerServicecustomizeGeneralLedgerPendingEntry in interface PurapGeneralLedgerServicepurapDocument - Document creating entriesaccountingLine - AccountingLine from document used to create the pending entryexplicitEntry - GeneralLedgerPendingEntry that has been created with account inforeferenceDocumentNumber - Number of the referenced documentdebitCreditCode - String field indicating if the entry is a debit or creditdocType - Document type creating the pending entriesisEncumbrance - Boolean to indicate if the entry is an encumbrancePurapGeneralLedgerService.customizeGeneralLedgerPendingEntry(org.kuali.ole.module.purap.document.PurchasingAccountsPayableDocument,
      org.kuali.ole.sys.businessobject.AccountingLine, org.kuali.ole.sys.businessobject.GeneralLedgerPendingEntry,
      java.lang.Integer, java.lang.String, java.lang.String, boolean)public void generateEntriesCancelAccountsPayableDocument(AccountsPayableDocument apDocument)
PurapGeneralLedgerServicegenerateEntriesCancelAccountsPayableDocument in interface PurapGeneralLedgerServiceapDocument - AccountsPayableDocument which holds the accounts to create the entries for the cancellationPurapGeneralLedgerService.generateEntriesCancelAccountsPayableDocument(org.kuali.ole.module.purap.document.AccountsPayableDocument)public void generateEntriesCreatePaymentRequest(PaymentRequestDocument preq)
PurapGeneralLedgerServicegenerateEntriesCreatePaymentRequest in interface PurapGeneralLedgerServicepreq - PaymentRequestDocument which holds the accounts to create the entriesPurapGeneralLedgerService.generateEntriesCreatePaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument)public void generateEntriesCreateInvoice(InvoiceDocument inv)
PurapGeneralLedgerServicegenerateEntriesCreateInvoice in interface PurapGeneralLedgerServiceinv - InvoiceDocument which holds the accounts to create the entriesPurapGeneralLedgerService.generateEntriesCreatePaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument)protected void generateEntriesCancelPaymentRequest(PaymentRequestDocument preq)
preq - Payment Request document to cancelPurapGeneralLedgerService.generateEntriesCancelAccountsPayableDocument(org.kuali.ole.module.purap.document.AccountsPayableDocument)protected void generateEntriesCancelInvoice(InvoiceDocument prqs)
public void generateEntriesModifyPaymentRequest(PaymentRequestDocument preq)
PurapGeneralLedgerServicegenerateEntriesModifyPaymentRequest in interface PurapGeneralLedgerServicepreq - PaymentRequestDocument which holds the accounts to create the entriesPurapGeneralLedgerService.generateEntriesModifyPaymentRequest(org.kuali.ole.module.purap.document.PaymentRequestDocument)public void generateEntriesModifyInvoice(InvoiceDocument inv)
public void generateEntriesCreateCreditMemo(VendorCreditMemoDocument cm)
PurapGeneralLedgerServicegenerateEntriesCreateCreditMemo in interface PurapGeneralLedgerServicecm - CreditMemoDocument which holds the accounts to create the entriesPurapGeneralLedgerService.generateEntriesCreateCreditMemo(VendorCreditMemoDocument)protected void generateEntriesCancelCreditMemo(VendorCreditMemoDocument cm)
cm - VendorCreditMemoDocument to cancelPurapGeneralLedgerService.generateEntriesCancelAccountsPayableDocument(org.kuali.ole.module.purap.document.AccountsPayableDocument)protected int getNextAvailableSequence(String documentNumber)
documentNumber - Document number to find next sequence numberprotected boolean generateEntriesPaymentRequest(PaymentRequestDocument preq, List encumbrances, List summaryAccounts, String processType)
preq - Payment Request document to create entriesencumbrances - List of encumbrance accounts if appliessummaryAccounts - List of preq accounts to create entriesprocessType - Type of process (create, modify, cancel)protected boolean generateEntriesInvoice(InvoiceDocument inv, List encumbrances, List summaryAccounts, String processType)
inv - Invoice document to create entriesencumbrances - List of encumbrance accounts if appliessummaryAccounts - List of Invoice accounts to create entriesprocessType - Type of process (create, modify, cancel)protected boolean generateEntriesCreditMemo(VendorCreditMemoDocument cm, boolean isCancel)
cm - Credit Memo document to create entriesisCancel - Indicates if request is a cancel or createpublic void generateEntriesApproveAmendPurchaseOrder(PurchaseOrderDocument po)
PurapGeneralLedgerServicegenerateEntriesApproveAmendPurchaseOrder in interface PurapGeneralLedgerServicepo - PurchaseOrderDocument which holds the accounts to create the entriesPurapGeneralLedgerService.generateEntriesApproveAmendPurchaseOrder(org.kuali.ole.module.purap.document.PurchaseOrderDocument)public void generateEntriesClosePurchaseOrder(PurchaseOrderDocument po)
PurapGeneralLedgerServicegenerateEntriesClosePurchaseOrder in interface PurapGeneralLedgerServicepo - PurchaseOrderDocument which holds the accounts to create the entriesPurapGeneralLedgerService.generateEntriesClosePurchaseOrder(org.kuali.ole.module.purap.document.PurchaseOrderDocument)protected boolean shouldGenerateGLPEForPurchaseOrder(PurchaseOrderDocument po)
po - public void generateEntriesReopenPurchaseOrder(PurchaseOrderDocument po)
PurapGeneralLedgerServicegenerateEntriesReopenPurchaseOrder in interface PurapGeneralLedgerServicepo - PurchaseOrderDocument which holds the accounts to create the entriesPurapGeneralLedgerService.generateEntriesReopenPurchaseOrder(org.kuali.ole.module.purap.document.PurchaseOrderDocument)public void generateEntriesVoidPurchaseOrder(PurchaseOrderDocument po)
PurapGeneralLedgerServicegenerateEntriesVoidPurchaseOrder in interface PurapGeneralLedgerServicepo - PurchaseOrderDocument which holds the accounts to create the entriesPurapGeneralLedgerService.generateEntriesVoidPurchaseOrder(org.kuali.ole.module.purap.document.PurchaseOrderDocument)protected List<SourceAccountingLine> relieveEncumbrance(PaymentRequestDocument preq)
preq - PREQ for invoiceprotected List<SourceAccountingLine> relieveEncumbrance(InvoiceDocument inv)
inv - inv for InvoiceDocumentprotected List<SourceAccountingLine> reencumberEncumbrance(PaymentRequestDocument preq)
preq - PREQ for invoiceprotected List<SourceAccountingLine> reencumberEncumbrance(InvoiceDocument prqs)
protected List<SourceAccountingLine> getCreditMemoEncumbrance(VendorCreditMemoDocument cm, PurchaseOrderDocument po, boolean cancel)
cm - Credit Memo documentpo - Purchase Order document modify encumbrancesprotected void saveGLEntries(List<GeneralLedgerPendingEntry> glEntries)
glEntries - List of GeneralLedgerPendingEntries to be savedprotected void saveAccountsPayableSummaryAccounts(List<SummaryAccount> summaryAccounts, Integer purapDocumentIdentifier, String docType)
summaryAccounts - Accounts to be savedpurapDocumentIdentifier - Purap document id for accountsprotected void saveInvoiceAccountsPayableSummaryAccounts(List<SummaryAccount> summaryAccounts, Integer purapDocumentIdentifier, String docType)
summaryAccounts - Accounts to be savedpurapDocumentIdentifier - Purap document id for accountsdocType - Document Type Usedprotected PurchaseOrderItem getPoItem(PurchaseOrderDocument po, Integer nbr, ItemType itemType)
po - Purchase Order containing list of itemsnbr - Line # of desired item (could be null)itemType - Item type of desired itemprotected String entryDescription(String description)
description - String to be formattedprotected org.kuali.rice.core.api.util.type.KualiDecimal calculateQuantityChange(boolean cancel, PurchaseOrderItem poItem, org.kuali.rice.core.api.util.type.KualiDecimal cmQuantity)
cancel - Boolean indicating whether entries are for creation or cancellation of credit memopoItem - Purchase Order ItemcmQuantity - Quantity on credit memo itempublic void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
public void setGeneralLedgerPendingEntryService(GeneralLedgerPendingEntryService generalLedgerPendingEntryService)
public void setKualiRuleService(org.kuali.rice.krad.service.KualiRuleService kualiRuleService)
public void setPurapAccountingService(PurapAccountingService purapAccountingService)
public void setUniversityDateService(UniversityDateService universityDateService)
public void setPurchaseOrderService(PurchaseOrderService purchaseOrderService)
public void setObjectCodeService(ObjectCodeService objectCodeService)
public void setSubObjectCodeService(SubObjectCodeService subObjectCodeService)
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
public void setPaymentRequestService(PaymentRequestService paymentRequestService)
public void setInvoiceService(InvoiceService invoiceService)
invoiceService - The invoiceService to set.Copyright © 2004–2015 The Kuali Foundation. All rights reserved.