org.kuali.kfs.module.purap.document.service.impl
Class PurapServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.purap.document.service.impl.PurapServiceImpl
All Implemented Interfaces:
PurapService

public class PurapServiceImpl
extends Object
implements PurapService


Constructor Summary
PurapServiceImpl()
           
 
Method Summary
 void addBelowLineItems(PurchasingAccountsPayableDocument document)
          Add the allowed below the line items to the given document
 boolean allowEncumberNextFiscalYear()
          Returns true if the current date falls within the allowed range to encumber in the next fiscal year.
protected  String assemblePurchaseOrderNote(AccountsPayableDocumentBase apDocument, String docType, String action)
          Generate a note for the close/reopen po method.
protected  void calculateItemTax(boolean useTaxIndicator, String deliveryPostalCode, Date transactionTaxDate, PurApItem item, Class itemUseTaxClass, PurchasingAccountsPayableDocument purapDocument)
           
 void calculateTax(PurchasingAccountsPayableDocument purapDocument)
          Calculates sales or use tax for each item if sales tax enabled and item is taxable.
 void clearAllTaxes(PurchasingAccountsPayableDocument purapDoc)
           
 void clearTax(PurchasingAccountsPayableDocument purapDocument, boolean useTax)
          Clears the tax from a document.
 void deleteUnenteredItems(PurapItemOperations document)
          Remove items that have not been "entered" which means no data has been added to them so no more processing needs to continue on these items.
protected  boolean doesAccountAllowCallToTaxService(String deliveryState, PurApItem item)
          Checks if the account is taxable, based on the delivery state, fund/subfund groups, and object code level/consolidations.
protected  boolean doesCommodityAllowCallToTaxService(PurApItem item)
          Determines if the the tax service should be called due to the commodity code.
 List<Integer> getAllowedFiscalYears()
          Returns a list of fiscal years that can be selected from on the document (built for Requisition and Purchase Order).
 org.kuali.rice.kns.util.KualiDecimal getApoLimit(Integer vendorContractGeneratedIdentifier, String chart, String org)
          Retrieve the Automatic Purchase Order Limit amount based first on the derived contract limit (see VendorService.getApoLimitFromContract(Integer, String, String)) and if that is null then based on the OrganizationParameter associated with the given 'chart' and 'org' values.
 PurApItem getBelowTheLineByType(PurchasingAccountsPayableDocument document, ItemType iT)
          Retrieve the below the line item for a doc by item type (unknown result if multiple of same below the line item type)
 String[] getBelowTheLineForDocument(PurchasingAccountsPayableDocument document)
          Retrieves the below the line items allowed from the parameter table for the given document
 Date getDateFromOffsetFromToday(int offsetDays)
          Return a Date object which is which is a given number of days away from today, in either direction.
protected  String getDeliveryPostalCode(PurchasingAccountsPayableDocument purapDocument)
           
 String getDeliveryState(PurchasingAccountsPayableDocument purapDocument)
          Retrieves the delivery state from the document
 org.kuali.rice.kns.util.KualiDecimal getFullDiscountTaxablePrice(org.kuali.rice.kns.util.KualiDecimal extendedPrice, PurchasingAccountsPayableDocument purapDocument)
           
 PurapAccountingService getPurapAccountingService()
           
 List<String> getRelatedDocumentIds(Integer accountsPayablePurchasingDocumentLinkIdentifier)
           
 List getRelatedViews(Class clazz, Integer accountsPayablePurchasingDocumentLinkIdentifier)
          Retrieve list of views for given identifier
 boolean isAccountingLineTaxable(PurApAccountingLine acctLine, boolean deliveryStateTaxable)
          Determines if the accounting line is taxable based on account and object code.
protected  boolean isAccountTaxable(String parameterSuffix, PurApAccountingLine acctLine)
          Checks if the account fund/subfund groups are in a set of parameters taking into account allowed/denied constraints and ultimately determines if taxable.
protected  boolean isAllowedFound(org.kuali.rice.kns.service.ParameterEvaluator eval)
          Helper method to work with parameter evaluator to find, allowed and found in parameter value.
protected  boolean isAllowedNotFound(org.kuali.rice.kns.service.ParameterEvaluator eval)
          Helper method to work with parameter evaluator to find, allowed and not found in parameter value.
protected  boolean isCommodityCodeTaxable(CommodityCode commodityCode)
           
 boolean isDateAYearBeforeToday(Date compareDate)
          We are obliged not to simply use a dateDiff and compare the result to 365, because we have to worry about leap years.
 boolean isDateInPast(Date compareDate)
          Determine whether a given date is in the past.
 boolean isDateMoreThanANumberOfDaysAway(Date compareDate, int daysAway)
          Determine whether a given date is more than a given number of days away from the current date.
 boolean isDeliveryStateTaxable(String deliveryState)
          Determines if the delivery state is taxable or not.
protected  boolean isDeniedFound(org.kuali.rice.kns.service.ParameterEvaluator eval)
          Helper method to work with parameter evaluator to find, denied and found in parameter value.
protected  boolean isDeniedNotFound(org.kuali.rice.kns.service.ParameterEvaluator eval)
          Helper method to work with parameter evaluator to find, denied and not found in parameter value.
 boolean isDocumentStoppedInRouteNode(PurchasingAccountsPayableDocument document, String nodeName)
          Determines if a document is in a specified node.
 boolean isFullDocumentEntryCompleted(PurchasingAccountsPayableDocument purapDocument)
          Determines if full entry mode has ended for this Purchasing/Accounts Payable document.
 boolean isItemTypeConflictWithTaxPolicy(PurchasingDocument purchasingDocument, PurApItem item)
          Determines if the item type specified conflict with the Account tax policy.
protected  boolean isObjectCodeTaxable(String parameterSuffix, PurApAccountingLine acctLine)
          Checks if the object code level/consolidation groups are in a set of parameters taking into account allowed/denied constraints and ultimately determines if taxable.
 boolean isTaxable(boolean useTaxIndicator, String deliveryState, PurApItem item)
          Determines if the item is taxable based on a decision tree.
 boolean isTaxableForSummary(boolean useTaxIndicator, String deliveryState, PurApItem item)
          Determines if the item is taxable based on a decision tree.
protected  boolean isTaxDisabledForVendor(PurchasingDocument purapDocument)
          Determines if tax is disabled for vendor, in default always returns false
 boolean isTodayWithinApoAllowedRange()
          Returns true if today is within the APO allowed date range.
 void performLogicForCloseReopenPO(PurchasingAccountsPayableDocument purapDocument)
          Main hook point for close/Reopen PO.
 Object performLogicWithFakedUserSession(String requiredPersonPersonUserId, LogicContainer logicToRun, Object... objects)
          Performs the given logic with the given fake user id.
 void processCloseReopenPo(AccountsPayableDocumentBase apDocument, String docType)
          Actual method that will close or reopen a po.
 void prorateForTradeInAndFullOrderDiscount(PurchasingAccountsPayableDocument purDoc)
          Proation for Trade in and Full Order Discount miscellaneous items.
 void saveDocumentNoValidation(org.kuali.rice.kns.document.Document document)
          Saves the document without doing validation by invoking the saveDocument method of documentService.
 void saveRoutingDataForRelatedDocuments(Integer accountsPayablePurchasingDocumentLinkIdentifier)
           
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService boService)
           
 void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
           
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
           
 void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
           
 void setNoteService(org.kuali.rice.kns.service.NoteService noteService)
           
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
           
 void setPersistenceService(org.kuali.rice.kns.service.PersistenceService persistenceService)
           
 void setPurapAccountingService(PurapAccountingService purapAccountingService)
           
 void setPurchaseOrderService(PurchaseOrderService purchaseOrderService)
           
 void setTaxService(TaxService taxService)
           
 void setUniversityDateService(UniversityDateService universityDateService)
           
 void setVendorService(VendorService vendorService)
           
 void sortBelowTheLine(PurchasingAccountsPayableDocument document)
          Sort the below the line elements of the given document
protected  void sortBelowTheLine(String[] itemTypes, List<PurApItem> existingItems, List<PurApItem> belowTheLine)
          Sorts the below the line elements
 boolean updateStatus(PurchasingAccountsPayableDocument document, String newStatus)
          Update the status for the given Purchasing/Accounts Payable document
 void updateUseTaxIndicator(PurchasingAccountsPayableDocument purapDocument, boolean newUseTaxIndicatorValue)
          Updates the use tax field, clearing old values if it has changed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PurapServiceImpl

public PurapServiceImpl()
Method Detail

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService boService)

setDateTimeService

public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)

setDocumentService

public void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)

setDataDictionaryService

public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)

setVendorService

public void setVendorService(VendorService vendorService)

setPersistenceService

public void setPersistenceService(org.kuali.rice.kns.service.PersistenceService persistenceService)

setPurchaseOrderService

public void setPurchaseOrderService(PurchaseOrderService purchaseOrderService)

setNoteService

public void setNoteService(org.kuali.rice.kns.service.NoteService noteService)

setUniversityDateService

public void setUniversityDateService(UniversityDateService universityDateService)

setTaxService

public void setTaxService(TaxService taxService)

updateStatus

public boolean updateStatus(PurchasingAccountsPayableDocument document,
                            String newStatus)
Description copied from interface: PurapService
Update the status for the given Purchasing/Accounts Payable document

Specified by:
updateStatus in interface PurapService
Returns:
See Also:
PurapService.updateStatus(org.kuali.kfs.module.purap.document.PurchasingAccountsPayableDocument, java.lang.String)

saveRoutingDataForRelatedDocuments

public void saveRoutingDataForRelatedDocuments(Integer accountsPayablePurchasingDocumentLinkIdentifier)
Specified by:
saveRoutingDataForRelatedDocuments in interface PurapService

getRelatedDocumentIds

public List<String> getRelatedDocumentIds(Integer accountsPayablePurchasingDocumentLinkIdentifier)
Specified by:
getRelatedDocumentIds in interface PurapService
See Also:
PurapService.getRelatedDocumentIds(java.lang.Integer)

getRelatedViews

public List getRelatedViews(Class clazz,
                            Integer accountsPayablePurchasingDocumentLinkIdentifier)
Description copied from interface: PurapService
Retrieve list of views for given identifier

Specified by:
getRelatedViews in interface PurapService
Returns:
List of views for given identifier
See Also:
PurapService.getRelatedViews(java.lang.Class, java.lang.Integer)

addBelowLineItems

public void addBelowLineItems(PurchasingAccountsPayableDocument document)
Description copied from interface: PurapService
Add the allowed below the line items to the given document

Specified by:
addBelowLineItems in interface PurapService
Parameters:
document - PurchasingAccountsPayableDocument
See Also:
PurapService.addBelowLineItems(org.kuali.kfs.module.purap.document.PurchasingAccountsPayableDocument)

sortBelowTheLine

protected void sortBelowTheLine(String[] itemTypes,
                                List<PurApItem> existingItems,
                                List<PurApItem> belowTheLine)
Sorts the below the line elements

Parameters:
itemTypes -
existingItems -
belowTheLine -

sortBelowTheLine

public void sortBelowTheLine(PurchasingAccountsPayableDocument document)
Description copied from interface: PurapService
Sort the below the line elements of the given document

Specified by:
sortBelowTheLine in interface PurapService
Parameters:
document - PurchasingAccountsPayableDocument to be sorted
See Also:
org.kuali.kfs.module.purap.document.service.PurapService#sortBelowTheLine(java.lang.String[], java.util.List, java.util.List)

getBelowTheLineForDocument

public String[] getBelowTheLineForDocument(PurchasingAccountsPayableDocument document)
Description copied from interface: PurapService
Retrieves the below the line items allowed from the parameter table for the given document

Specified by:
getBelowTheLineForDocument in interface PurapService
Parameters:
document - PurchasingAccountsPayableDocument
Returns:
Array list of below the line items
See Also:
PurapService.getBelowTheLineForDocument(org.kuali.kfs.module.purap.document.PurchasingAccountsPayableDocument)

getBelowTheLineByType

public PurApItem getBelowTheLineByType(PurchasingAccountsPayableDocument document,
                                       ItemType iT)
Description copied from interface: PurapService
Retrieve the below the line item for a doc by item type (unknown result if multiple of same below the line item type)

Specified by:
getBelowTheLineByType in interface PurapService
Parameters:
document - the document
iT - the itemType
Returns:
below the line item by item type
See Also:
PurapService.getBelowTheLineByType(org.kuali.kfs.module.purap.document.PurchasingAccountsPayableDocument, org.kuali.kfs.module.purap.businessobject.ItemType)

getDateFromOffsetFromToday

public Date getDateFromOffsetFromToday(int offsetDays)
Description copied from interface: PurapService
Return a Date object which is which is a given number of days away from today, in either direction.

Specified by:
getDateFromOffsetFromToday in interface PurapService
Returns:
A java.sql.Date
See Also:
PurapService.getDateFromOffsetFromToday(int)

isDateInPast

public boolean isDateInPast(Date compareDate)
Description copied from interface: PurapService
Determine whether a given date is in the past.

Specified by:
isDateInPast in interface PurapService
Parameters:
compareDate - An SQL date (not a DateFormatter date, or a util Date)
Returns:
True if the given date is before today.
See Also:
PurapService.isDateInPast(java.sql.Date)

isDateMoreThanANumberOfDaysAway

public boolean isDateMoreThanANumberOfDaysAway(Date compareDate,
                                               int daysAway)
Description copied from interface: PurapService
Determine whether a given date is more than a given number of days away from the current date.

Specified by:
isDateMoreThanANumberOfDaysAway in interface PurapService
Parameters:
compareDate - An SQL date (not a DateFormatter date, or a util Date)
daysAway - An int, positive for future days, negative for past days
Returns:
True if the given date is more than the given number of days away in either direction.
See Also:
PurapService.isDateMoreThanANumberOfDaysAway(java.sql.Date, int)

isDateAYearBeforeToday

public boolean isDateAYearBeforeToday(Date compareDate)
Description copied from interface: PurapService
We are obliged not to simply use a dateDiff and compare the result to 365, because we have to worry about leap years.

Specified by:
isDateAYearBeforeToday in interface PurapService
Parameters:
compareDate - An SQL date (not a DateFormatter date, or a util Date)
Returns:
True if the date given for comparison is more than a year in the past, not including today.
See Also:
org.kuali.kfs.module.purap.document.service.PurapService#isDateAYearAfterToday(java.sql.Date)

getApoLimit

public org.kuali.rice.kns.util.KualiDecimal getApoLimit(Integer vendorContractGeneratedIdentifier,
                                                        String chart,
                                                        String org)
Description copied from interface: PurapService
Retrieve the Automatic Purchase Order Limit amount based first on the derived contract limit (see VendorService.getApoLimitFromContract(Integer, String, String)) and if that is null then based on the OrganizationParameter associated with the given 'chart' and 'org' values.

Specified by:
getApoLimit in interface PurapService
chart - chart code to use when looking up limit amount on VendorContract and OrganizationParameter
org - organization code to use when looking up limit amount on VendorContract and OrganizationParameter
Returns:
a KualiDecimal if a valid limit amount is found or null if one is not found
See Also:
PurapService.getApoLimit(java.lang.Integer, java.lang.String, java.lang.String)

isFullDocumentEntryCompleted

public boolean isFullDocumentEntryCompleted(PurchasingAccountsPayableDocument purapDocument)
Description copied from interface: PurapService
Determines if full entry mode has ended for this Purchasing/Accounts Payable document.

Specified by:
isFullDocumentEntryCompleted in interface PurapService
Parameters:
purapDocument - PurchasingAccountsPayableDocument
Returns:
a boolean to indicate if document has completed full entry mode
See Also:
PurapService.isFullDocumentEntryCompleted(org.kuali.kfs.module.purap.document.PurchasingAccountsPayableDocument)

performLogicForCloseReopenPO

public void performLogicForCloseReopenPO(PurchasingAccountsPayableDocument purapDocument)
Main hook point for close/Reopen PO.

Specified by:
performLogicForCloseReopenPO in interface PurapService
Parameters:
purapDocument - PurchasingAccountsPayableDocument
See Also:
PurapService.performLogicForCloseReopenPO(org.kuali.kfs.module.purap.document.PurchasingAccountsPayableDocument)

deleteUnenteredItems

public void deleteUnenteredItems(PurapItemOperations document)
Remove items that have not been "entered" which means no data has been added to them so no more processing needs to continue on these items.

Specified by:
deleteUnenteredItems in interface PurapService
Parameters:
apDocument - AccountsPayableDocument which contains list of items to be reviewed

processCloseReopenPo

public void processCloseReopenPo(AccountsPayableDocumentBase apDocument,
                                 String docType)
Actual method that will close or reopen a po.

Parameters:
apDocument - AccountsPayableDocument
docType -

assemblePurchaseOrderNote

protected String assemblePurchaseOrderNote(AccountsPayableDocumentBase apDocument,
                                           String docType,
                                           String action)
Generate a note for the close/reopen po method.

Parameters:
docType -
preqId -
Returns:
Note to be saved

performLogicWithFakedUserSession

public Object performLogicWithFakedUserSession(String requiredPersonPersonUserId,
                                               LogicContainer logicToRun,
                                               Object... objects)
                                        throws org.kuali.rice.kew.exception.WorkflowException,
                                               Exception
Description copied from interface: PurapService
Performs the given logic with the given fake user id. Need this to control the user.

Specified by:
performLogicWithFakedUserSession in interface PurapService
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException
Exception
See Also:
PurapService.performLogicWithFakedUserSession(java.lang.String, org.kuali.kfs.module.purap.document.service.LogicContainer, java.lang.Object[])

saveDocumentNoValidation

public void saveDocumentNoValidation(org.kuali.rice.kns.document.Document document)
Description copied from interface: PurapService
Saves the document without doing validation by invoking the saveDocument method of documentService.

Specified by:
saveDocumentNoValidation in interface PurapService
Parameters:
document - The purchase order document to be saved.
See Also:
org.kuali.kfs.module.purap.document.service.PurchaseOrderService#saveDocumentNoValidation(org.kuali.kfs.module.purap.document.PurchaseOrderDocument)

isDocumentStoppedInRouteNode

public boolean isDocumentStoppedInRouteNode(PurchasingAccountsPayableDocument document,
                                            String nodeName)
Description copied from interface: PurapService
Determines if a document is in a specified node.

Specified by:
isDocumentStoppedInRouteNode in interface PurapService
Returns:

allowEncumberNextFiscalYear

public boolean allowEncumberNextFiscalYear()
Description copied from interface: PurapService
Returns true if the current date falls within the allowed range to encumber in the next fiscal year.

Specified by:
allowEncumberNextFiscalYear in interface PurapService
Returns:
See Also:
PurapService.allowEncumberNextFiscalYear()

getAllowedFiscalYears

public List<Integer> getAllowedFiscalYears()
Description copied from interface: PurapService
Returns a list of fiscal years that can be selected from on the document (built for Requisition and Purchase Order). Typically only the current year is returned. However, if the current date falls within the allowed range to encumber in the next fiscal year, the current year and the next current year is returned.

Specified by:
getAllowedFiscalYears in interface PurapService
Returns:
List
See Also:
PurapService.getAllowedFiscalYears()

isTodayWithinApoAllowedRange

public boolean isTodayWithinApoAllowedRange()
Description copied from interface: PurapService
Returns true if today is within the APO allowed date range. If the difference between today and this years closing date is less than or equal to the number of days allowed for APO.

Specified by:
isTodayWithinApoAllowedRange in interface PurapService
Returns:
boolean
See Also:
PurapService.isTodayWithinApoAllowedRange()

clearTax

public void clearTax(PurchasingAccountsPayableDocument purapDocument,
                     boolean useTax)
Description copied from interface: PurapService
Clears the tax from a document. Useful when changing from use to sales

Specified by:
clearTax in interface PurapService
Parameters:
purapDocument - document
useTax - the whether to clear use or sales
See Also:
org.kuali.kfs.module.purap.document.service.PurapService#clearTax(org.kuali.kfs.module.purap.document.PurchasingAccountsPayableDocument)

updateUseTaxIndicator

public void updateUseTaxIndicator(PurchasingAccountsPayableDocument purapDocument,
                                  boolean newUseTaxIndicatorValue)
Description copied from interface: PurapService
Updates the use tax field, clearing old values if it has changed

Specified by:
updateUseTaxIndicator in interface PurapService
Parameters:
purapDocument - document
newUseTaxIndicatorValue - useTaxIndicator to change to

calculateTax

public void calculateTax(PurchasingAccountsPayableDocument purapDocument)
Description copied from interface: PurapService
Calculates sales or use tax for each item if sales tax enabled and item is taxable.

Specified by:
calculateTax in interface PurapService
See Also:
PurapService.calculateTax(org.kuali.kfs.module.purap.document.PurchasingAccountsPayableDocument)

getDeliveryState

public String getDeliveryState(PurchasingAccountsPayableDocument purapDocument)
Description copied from interface: PurapService
Retrieves the delivery state from the document

Specified by:
getDeliveryState in interface PurapService
Returns:

getDeliveryPostalCode

protected String getDeliveryPostalCode(PurchasingAccountsPayableDocument purapDocument)

isTaxable

public boolean isTaxable(boolean useTaxIndicator,
                         String deliveryState,
                         PurApItem item)
Determines if the item is taxable based on a decision tree.

Specified by:
isTaxable in interface PurapService
Parameters:
useTaxIndicator -
deliveryState -
item -
Returns:

isTaxableForSummary

public boolean isTaxableForSummary(boolean useTaxIndicator,
                                   String deliveryState,
                                   PurApItem item)
Description copied from interface: PurapService
Determines if the item is taxable based on a decision tree. Does not consider if item is entered, this is not used to calculate tax, just if the item is indeed taxable.

Specified by:
isTaxableForSummary in interface PurapService
Returns:
See Also:
PurapService.isTaxableForSummary(boolean, java.lang.String, org.kuali.kfs.module.purap.businessobject.PurApItem)

doesCommodityAllowCallToTaxService

protected boolean doesCommodityAllowCallToTaxService(PurApItem item)
Determines if the the tax service should be called due to the commodity code.

Parameters:
item -
Returns:

isCommodityCodeTaxable

protected boolean isCommodityCodeTaxable(CommodityCode commodityCode)

isDeliveryStateTaxable

public boolean isDeliveryStateTaxable(String deliveryState)
Description copied from interface: PurapService
Determines if the delivery state is taxable or not. If parameter is Allow and delivery state in list, or parameter is Denied and delivery state is not in list then state is taxable.

Specified by:
isDeliveryStateTaxable in interface PurapService
Returns:
See Also:
PurapService.isDeliveryStateTaxable(java.lang.String)

doesAccountAllowCallToTaxService

protected boolean doesAccountAllowCallToTaxService(String deliveryState,
                                                   PurApItem item)
Checks if the account is taxable, based on the delivery state, fund/subfund groups, and object code level/consolidations.

Parameters:
deliveryState -
item -
Returns:

isAccountingLineTaxable

public boolean isAccountingLineTaxable(PurApAccountingLine acctLine,
                                       boolean deliveryStateTaxable)
Description copied from interface: PurapService
Determines if the accounting line is taxable based on account and object code.

Specified by:
isAccountingLineTaxable in interface PurapService
Returns:
See Also:
PurapService.isAccountingLineTaxable(org.kuali.kfs.module.purap.businessobject.PurApAccountingLine, boolean)

isAccountTaxable

protected boolean isAccountTaxable(String parameterSuffix,
                                   PurApAccountingLine acctLine)
Checks if the account fund/subfund groups are in a set of parameters taking into account allowed/denied constraints and ultimately determines if taxable.

Parameters:
parameterSuffix -
acctLine -
Returns:

isObjectCodeTaxable

protected boolean isObjectCodeTaxable(String parameterSuffix,
                                      PurApAccountingLine acctLine)
Checks if the object code level/consolidation groups are in a set of parameters taking into account allowed/denied constraints and ultimately determines if taxable.

Parameters:
parameterSuffix -
acctLine -
Returns:

isAllowedFound

protected boolean isAllowedFound(org.kuali.rice.kns.service.ParameterEvaluator eval)
Helper method to work with parameter evaluator to find, allowed and found in parameter value.

Parameters:
eval -
Returns:

isAllowedNotFound

protected boolean isAllowedNotFound(org.kuali.rice.kns.service.ParameterEvaluator eval)
Helper method to work with parameter evaluator to find, allowed and not found in parameter value.

Parameters:
eval -
Returns:

isDeniedFound

protected boolean isDeniedFound(org.kuali.rice.kns.service.ParameterEvaluator eval)
Helper method to work with parameter evaluator to find, denied and found in parameter value.

Parameters:
eval -
Returns:

isDeniedNotFound

protected boolean isDeniedNotFound(org.kuali.rice.kns.service.ParameterEvaluator eval)
Helper method to work with parameter evaluator to find, denied and not found in parameter value.

Parameters:
eval -
Returns:

calculateItemTax

protected void calculateItemTax(boolean useTaxIndicator,
                                String deliveryPostalCode,
                                Date transactionTaxDate,
                                PurApItem item,
                                Class itemUseTaxClass,
                                PurchasingAccountsPayableDocument purapDocument)
Parameters:
useTaxIndicator -
deliveryPostalCode -
transactionTaxDate -
item -
itemUseTaxClass -

getFullDiscountTaxablePrice

public org.kuali.rice.kns.util.KualiDecimal getFullDiscountTaxablePrice(org.kuali.rice.kns.util.KualiDecimal extendedPrice,
                                                                        PurchasingAccountsPayableDocument purapDocument)

prorateForTradeInAndFullOrderDiscount

public void prorateForTradeInAndFullOrderDiscount(PurchasingAccountsPayableDocument purDoc)
Description copied from interface: PurapService
Proation for Trade in and Full Order Discount miscellaneous items.

Specified by:
prorateForTradeInAndFullOrderDiscount in interface PurapService

clearAllTaxes

public void clearAllTaxes(PurchasingAccountsPayableDocument purapDoc)
Specified by:
clearAllTaxes in interface PurapService

isItemTypeConflictWithTaxPolicy

public boolean isItemTypeConflictWithTaxPolicy(PurchasingDocument purchasingDocument,
                                               PurApItem item)
Determines if the item type specified conflict with the Account tax policy.

Specified by:
isItemTypeConflictWithTaxPolicy in interface PurapService
Parameters:
purchasingDocument - purchasing document to check
item - item to check if in conflict with tax policy
Returns:
true if item is in conflict, false otherwise

isTaxDisabledForVendor

protected boolean isTaxDisabledForVendor(PurchasingDocument purapDocument)
Determines if tax is disabled for vendor, in default always returns false

Parameters:
purapDocument - the PurchasingDocument with a vendor to check
Returns:
true if tax is disabled, false if it is not - in foundation KFS, tax is never disabled

getPurapAccountingService

public PurapAccountingService getPurapAccountingService()

setPurapAccountingService

public void setPurapAccountingService(PurapAccountingService purapAccountingService)


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