org.kuali.kfs.module.purap.service
Interface PurapAccountingService

All Known Implementing Classes:
PurapAccountingServiceImpl

public interface PurapAccountingService

This class is used to generate Account Summaries for the Purchasing Accounts Payable Module account lists as well as to generate account lists that can be used for distribution to below the line items or any other items that may require distribution


Method Summary
 void convertMoneyToPercent(PaymentRequestDocument pr)
          Converts the amount to percent and updates the percent field on the CreditMemoAccount
 void deleteSummaryAccounts(Integer purapDocumentIdentifier, String docType)
          Deletes the ap summary accounts by the id of the doc type (Payment Request - PREQ or Credit Memo - CM)
 List<PurApAccountingLine> generateAccountDistributionForProration(List<SourceAccountingLine> accounts, org.kuali.rice.kns.util.KualiDecimal totalAmount, Integer percentScale)
          Deprecated.  
 List<PurApAccountingLine> generateAccountDistributionForProration(List<SourceAccountingLine> accounts, org.kuali.rice.kns.util.KualiDecimal totalAmount, Integer percentScale, Class clazz)
          Determines an appropriate account distribution for a particular Purchasing Accounts Payable list of Accounts.
 List<PurApAccountingLine> generateAccountDistributionForProrationWithZeroTotal(PurchasingAccountsPayableDocument purapdoc)
          Determines an appropriate account distribution for a particular Purchasing Accounts Payable list of Accounts.
 List<SourceAccountingLine> generateSourceAccountsForVendorRemit(PurchasingAccountsPayableDocument document)
          This method generates summary accounts for a vendor payment.
 List<SourceAccountingLine> generateSummary(List<PurApItem> items)
          Generates an account summary, that is it creates a list of source accounts by rounding up the Purchasing Accounts Payable accounts off of the Purchasing Accounts Payable items.
 List<SummaryAccount> generateSummaryAccounts(PurchasingAccountsPayableDocument document)
          This creates summary accounts based on a list of items.
 List<SummaryAccount> generateSummaryAccountsWithNoZeroTotals(PurchasingAccountsPayableDocument document)
          This creates summary accounts based on a list of items excluding zero totals.
 List<SummaryAccount> generateSummaryAccountsWithNoZeroTotalsNoUseTax(PurchasingAccountsPayableDocument document)
          This creates summary accounts based on a list of items excluding zero totals and use tax.
 List<SourceAccountingLine> generateSummaryExcludeItemTypes(List<PurApItem> items, Set excludedItemTypeCodes)
          convenience method that generates a list of source accounts while excluding items with the specified item types
 List<SourceAccountingLine> generateSummaryExcludeItemTypesAndNoZeroTotals(List<PurApItem> items, Set excludedItemTypeCodes)
          convenience method that generates a list of source accounts while excluding items with the specified item types and not including items with zero totals
 List<SourceAccountingLine> generateSummaryIncludeItemTypes(List<PurApItem> items, Set includedItemTypeCodes)
          convenience method that generates a list of source accounts while only including items with the specified item types
 List<SourceAccountingLine> generateSummaryIncludeItemTypesAndNoZeroTotals(List<PurApItem> items, Set includedItemTypeCodes)
          convenience method that generates a list of source accounts while only including items with the specified item types and not including items with zero totals
 List<SourceAccountingLine> generateSummaryTaxableAccounts(List<PurApItem> items)
          Generates an account summary with only taxable accounts.
 List<SourceAccountingLine> generateSummaryWithNoZeroTotals(List<PurApItem> items)
          convenience method that generates a list of source accounts while excluding items with $0 amounts
 List<SourceAccountingLine> generateSummaryWithNoZeroTotalsNoUseTax(List<PurApItem> items)
          convenience method that generates a list of source accounts while excluding items with $0 amounts and use tax
 List<SourceAccountingLine> generateSummaryWithNoZeroTotalsUsingAlternateAmount(List<PurApItem> items)
          convenience method that generates a list of source accounts while excluding items with $0 amounts and using the alternate amount
 List<UseTaxContainer> generateUseTaxAccount(PurchasingAccountsPayableDocument document)
          Generates use tax helper class for a purap document
 List<PurApAccountingLine> getAccountsFromItem(PurApItem item)
           
 List getAccountsPayableSummaryAccounts(Integer purapDocumentIdentifier, String docType)
          Retrieves the ap summary accounts by the id of the doc type (Payment Request - PREQ or Credit Memo - CM)
 boolean isTaxAccount(PurchasingAccountsPayableDocument document, SourceAccountingLine account)
          Checks whether the specified accounting line in the specified PurAP document is used for tax withholding.
 List<SourceAccountingLine> mergeAccountingLineLists(List<SourceAccountingLine> accountingLines1, List<SourceAccountingLine> accountingLines2)
          Merges list 2 into list 1
 void updateAccountAmounts(PurchasingAccountsPayableDocument document)
          Updates account amounts based on the percents.
<T extends PurApAccountingLine>
void
updateAccountAmountsWithTotal(List<T> sourceAccountingLines, org.kuali.rice.kns.util.KualiDecimal totalAmount)
          calculates values for a list of accounting lines based on an amount
 void updateItemAccountAmounts(PurApItem item)
          Updates a single items account amounts
 

Method Detail

generateAccountDistributionForProration

List<PurApAccountingLine> generateAccountDistributionForProration(List<SourceAccountingLine> accounts,
                                                                  org.kuali.rice.kns.util.KualiDecimal totalAmount,
                                                                  Integer percentScale)
Deprecated. 

unused see other generateAccountDistribution methods

Parameters:
accounts -
totalAmount -
percentScale -
Returns:

generateAccountDistributionForProration

List<PurApAccountingLine> generateAccountDistributionForProration(List<SourceAccountingLine> accounts,
                                                                  org.kuali.rice.kns.util.KualiDecimal totalAmount,
                                                                  Integer percentScale,
                                                                  Class clazz)
Determines an appropriate account distribution for a particular Purchasing Accounts Payable list of Accounts. It does this by looking at the accounts that were provided which should be generated from a generateSummary method. It then builds up a list of PurApAccountingLines (specified by the Class variable) and tries to determine the appropriate percents to use on the new accounts, this may require some moving of percents to the last account as a slush.

Parameters:
accounts - the incoming source accounts from generateSummary
totalAmount - the total amount of the document
percentScale - the scale to round to
clazz - the class of the Purchasing Accounts Payable Account
Returns:
a list of new Purchasing Accounts Payable Accounts

generateAccountDistributionForProrationWithZeroTotal

List<PurApAccountingLine> generateAccountDistributionForProrationWithZeroTotal(PurchasingAccountsPayableDocument purapdoc)
Determines an appropriate account distribution for a particular Purchasing Accounts Payable list of Accounts. It does this by looking at the accounts that were provided which should be generated from a generateSummary method. It then builds up a list of PurApAccountingLines (specified by the Class variable) and tries to determine the appropriate percents to use on the new accounts, this may require some moving of percents to the last account as a slush. This is called when a document has a zero dollar total

Parameters:
accounts - the incoming source accounts from generateSummary
percentScale - the scale to round to
clazz - the class of the Purchasing Accounts Payable Account
Returns:
a list of new Purchasing Accounts Payable Accounts

generateSummaryAccounts

List<SummaryAccount> generateSummaryAccounts(PurchasingAccountsPayableDocument document)
This creates summary accounts based on a list of items.

Parameters:
document - the document to generate the summary accounts from
Returns:
a list of summary accounts.

generateSummaryAccountsWithNoZeroTotals

List<SummaryAccount> generateSummaryAccountsWithNoZeroTotals(PurchasingAccountsPayableDocument document)
This creates summary accounts based on a list of items excluding zero totals.

Parameters:
document - the document to generate the summary accounts from
Returns:
a list of summary accounts.

generateSummaryAccountsWithNoZeroTotalsNoUseTax

List<SummaryAccount> generateSummaryAccountsWithNoZeroTotalsNoUseTax(PurchasingAccountsPayableDocument document)
This creates summary accounts based on a list of items excluding zero totals and use tax.

Parameters:
document - the document to generate the summary accounts from
Returns:
a list of summary accounts.

generateSummary

List<SourceAccountingLine> generateSummary(List<PurApItem> items)
Generates an account summary, that is it creates a list of source accounts by rounding up the Purchasing Accounts Payable accounts off of the Purchasing Accounts Payable items.

Parameters:
document - the document to generate the summary from
Returns:
a list of source accounts

generateSummaryTaxableAccounts

List<SourceAccountingLine> generateSummaryTaxableAccounts(List<PurApItem> items)
Generates an account summary with only taxable accounts.

Parameters:
items -
Returns:

generateSummaryWithNoZeroTotals

List<SourceAccountingLine> generateSummaryWithNoZeroTotals(List<PurApItem> items)
convenience method that generates a list of source accounts while excluding items with $0 amounts

Parameters:
items - the items to generate source accounts from
Returns:
a list of source accounts "rolled up" from the purap accounts

generateSummaryWithNoZeroTotalsNoUseTax

List<SourceAccountingLine> generateSummaryWithNoZeroTotalsNoUseTax(List<PurApItem> items)
convenience method that generates a list of source accounts while excluding items with $0 amounts and use tax

Parameters:
items - the items to generate source accounts from
Returns:
a list of source accounts "rolled up" from the purap accounts

generateSummaryWithNoZeroTotalsUsingAlternateAmount

List<SourceAccountingLine> generateSummaryWithNoZeroTotalsUsingAlternateAmount(List<PurApItem> items)
convenience method that generates a list of source accounts while excluding items with $0 amounts and using the alternate amount

Parameters:
items - the items to generate source accounts from
Returns:
a list of source accounts "rolled up" from the purap accounts

generateSummaryExcludeItemTypes

List<SourceAccountingLine> generateSummaryExcludeItemTypes(List<PurApItem> items,
                                                           Set excludedItemTypeCodes)
convenience method that generates a list of source accounts while excluding items with the specified item types

Parameters:
items - the items to generate source accounts from
excludedItemTypeCodes - the item types to exclude
Returns:
a list of source accounts "rolled up" from the purap accounts

generateSummaryExcludeItemTypesAndNoZeroTotals

List<SourceAccountingLine> generateSummaryExcludeItemTypesAndNoZeroTotals(List<PurApItem> items,
                                                                          Set excludedItemTypeCodes)
convenience method that generates a list of source accounts while excluding items with the specified item types and not including items with zero totals

Parameters:
items - the items to generate source accounts from
excludedItemTypeCodes - the item types to exclude
Returns:
a list of source accounts "rolled up" from the purap accounts

generateSummaryIncludeItemTypes

List<SourceAccountingLine> generateSummaryIncludeItemTypes(List<PurApItem> items,
                                                           Set includedItemTypeCodes)
convenience method that generates a list of source accounts while only including items with the specified item types

Parameters:
items - the items to generate source accounts from
excludedItemTypeCodes - the item types to include
Returns:
a list of source accounts "rolled up" from the purap accounts

generateSummaryIncludeItemTypesAndNoZeroTotals

List<SourceAccountingLine> generateSummaryIncludeItemTypesAndNoZeroTotals(List<PurApItem> items,
                                                                          Set includedItemTypeCodes)
convenience method that generates a list of source accounts while only including items with the specified item types and not including items with zero totals

Parameters:
items - the items to generate source accounts from
excludedItemTypeCodes - the item types to include
Returns:
a list of source accounts "rolled up" from the purap accounts

updateAccountAmounts

void updateAccountAmounts(PurchasingAccountsPayableDocument document)
Updates account amounts based on the percents. If this is a preq past full entry it updates the percents based on the amounts instead

Parameters:
document - the document

updateItemAccountAmounts

void updateItemAccountAmounts(PurApItem item)
Updates a single items account amounts

Parameters:
item -

getAccountsFromItem

List<PurApAccountingLine> getAccountsFromItem(PurApItem item)

deleteSummaryAccounts

void deleteSummaryAccounts(Integer purapDocumentIdentifier,
                           String docType)
Deletes the ap summary accounts by the id of the doc type (Payment Request - PREQ or Credit Memo - CM)

Parameters:
purapDocumentIdentifier - The purapDocumentIdentifier of the document whose summary accounts are to be deleted.

getAccountsPayableSummaryAccounts

List getAccountsPayableSummaryAccounts(Integer purapDocumentIdentifier,
                                       String docType)
Retrieves the ap summary accounts by the id of the doc type (Payment Request - PREQ or Credit Memo - CM)

Parameters:
purapDocumentIdentifier - The purapDocumentIdentifier of the document.

generateSourceAccountsForVendorRemit

List<SourceAccountingLine> generateSourceAccountsForVendorRemit(PurchasingAccountsPayableDocument document)
This method generates summary accounts for a vendor payment.

Parameters:
document -
Returns:
This will get the proper amount on the items that is sent to the vendor

convertMoneyToPercent

void convertMoneyToPercent(PaymentRequestDocument pr)
Converts the amount to percent and updates the percent field on the CreditMemoAccount

Parameters:
pr - The payment request document containing the accounts whose percentage would be set.

generateUseTaxAccount

List<UseTaxContainer> generateUseTaxAccount(PurchasingAccountsPayableDocument document)
Generates use tax helper class for a purap document

Parameters:
document -
Returns:
useTaxContainer

isTaxAccount

boolean isTaxAccount(PurchasingAccountsPayableDocument document,
                     SourceAccountingLine account)
Checks whether the specified accounting line in the specified PurAP document is used for tax withholding. This applies only to PaymentRequestDocument; otherwise it always returns false.

Parameters:
document - the specified PurAP document
account - the specified accounting line
Returns:
true if the accounting line is a tax account

updateAccountAmountsWithTotal

<T extends PurApAccountingLine> void updateAccountAmountsWithTotal(List<T> sourceAccountingLines,
                                                                   org.kuali.rice.kns.util.KualiDecimal totalAmount)
calculates values for a list of accounting lines based on an amount

Type Parameters:
T -
Parameters:
sourceAccountingLines -
totalAmount -

mergeAccountingLineLists

List<SourceAccountingLine> mergeAccountingLineLists(List<SourceAccountingLine> accountingLines1,
                                                    List<SourceAccountingLine> accountingLines2)
Merges list 2 into list 1

Parameters:
list1 -
list2 -
Returns:


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.