org.kuali.kfs.module.cab.document.service.impl
Class PurApLineServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.cab.document.service.impl.PurApLineServiceImpl
All Implemented Interfaces:
PurApLineService

@Transactional
public class PurApLineServiceImpl
extends Object
implements PurApLineService

This class provides default implementations of PurApLineService


Constructor Summary
PurApLineServiceImpl()
           
 
Method Summary
protected  void addAllocateHistory(PurchasingAccountsPayableLineAssetAccount sourceAccount, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory, org.kuali.rice.kns.util.KualiDecimal additionalAmount, PurchasingAccountsPayableLineAssetAccount newAccount)
          Save allocate action into session object.
protected  void addAssetLock(Map<String,Set> removableAssetLocks, PurchasingAccountsPayableItemAsset processedItem)
           
protected  void addMergeHistory(List<PurchasingAccountsPayableActionHistory> actionsTakenHistory, String actionTypeCode, PurchasingAccountsPayableItemAsset sourceItem, PurchasingAccountsPayableItemAsset targetItem)
          Add merge action to the action history.
protected  void addNewAccountToItemList(List<PurchasingAccountsPayableLineAssetAccount> newAccountList)
          update account list for each line item
protected  void addPercentPaymentHistory(List<PurchasingAccountsPayableActionHistory> actionsTakenHistory, PurchasingAccountsPayableItemAsset item, org.kuali.rice.kns.util.KualiDecimal oldQty)
          Update action history for the percent payment action.
protected  void addSplitHistory(PurchasingAccountsPayableItemAsset currentItemAsset, PurchasingAccountsPayableItemAsset newItemAsset, List<PurchasingAccountsPayableActionHistory> actionsTakenHistory)
          Update action history for a split action.
protected  void allocateByItemAccountAmount(PurchasingAccountsPayableLineAssetAccount sourceAccount, List<PurchasingAccountsPayableLineAssetAccount> targetAccounts, List<PurchasingAccountsPayableLineAssetAccount> newAccountList, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory)
          Allocate one account line to target account lines percentage based on the account line amount.
 boolean allocateLinesHasDifferentObjectSubTypes(List<PurchasingAccountsPayableItemAsset> targetLines, PurchasingAccountsPayableItemAsset sourceLine)
          Check the payments in given asset lines have different object sub types.
 void buildPurApItemAssetList(List<PurchasingAccountsPayableDocument> purApDocs)
          Build PurAp document collection and line item collection.
 org.kuali.rice.kns.util.KualiDecimal calculateItemAssetTotalCost(PurchasingAccountsPayableItemAsset item)
          Calculate item asset total cost
 void conditionallyUpdateDocumentStatusAsProcessed(PurchasingAccountsPayableDocument selectedDoc)
          In-activate document when all the associated items are inactive.
protected  void createAccountsForNewItemAsset(PurchasingAccountsPayableItemAsset currentItemAsset, PurchasingAccountsPayableItemAsset newItemAsset)
          Create asset account list for new item asset and update the current account amount.
protected  List<PurchasingAccountsPayableLineAssetAccount> getAllocateTargetAccounts(PurchasingAccountsPayableLineAssetAccount sourceAccount, List<PurchasingAccountsPayableItemAsset> allocateTargetLines, boolean addtionalCharge)
          Get the target account lines which will be used for allocate.
 List<PurchasingAccountsPayableItemAsset> getAllocateTargetLines(PurchasingAccountsPayableItemAsset selectedLineItem, List<PurchasingAccountsPayableDocument> purApDocs)
          Get the target lines based on allocation line type
protected  AssetService getAssetService()
          get CAMS AssetService.
 org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
          Gets the businessObjectService attribute.
 CapitalAssetManagementModuleService getCapitalAssetManagementModuleService()
          Gets the capitalAssetManagementModuleService attribute.
protected  PurchasingAccountsPayableLineAssetAccount getFromTargetAccountList(List<PurchasingAccountsPayableLineAssetAccount> targetAccounts, Long glIdentifier)
          Search matching account in targetAccounts by glIdentifier.
protected  PurchasingAccountsPayableLineAssetAccount getMatchingFromAccountList(List<PurchasingAccountsPayableLineAssetAccount> accountList, Long glIdentifier, PurchasingAccountsPayableLineAssetAccount targetAccount)
          Searching in accountList by glIdentifier for matching account which associated with the same item as targetAccount.
protected  int getMaxCabLineNbrForItemInForm(PurchasingAccountsPayableDocument purApDoc, PurchasingAccountsPayableItemAsset currentItemAsset)
          Search the current active items and return the max CAB line # for split new item .
protected  int getMaxCabLineNumber(PurchasingAccountsPayableItemAsset splitItemAsset, PurchasingAccountsPayableDocument purApDoc)
          Get the max cab line #.
 Pretag getPreTagLineItem(Integer purchaseOrderIdentifier, Integer lineItemNumber)
          Get preTag if exists for give line item.
 PurApInfoService getPurApInfoService()
          Gets the purApInfoService attribute.
 PurApLineDao getPurApLineDao()
          Gets the purApLineDao attribute.
protected  Map<String,Set> getRemovableAssetLocks(List<PurchasingAccountsPayableItemAsset> processedItems)
          Build removable asset lock map from the processedItems list.
 List<PurchasingAccountsPayableItemAsset> getSelectedMergeLines(boolean isMergeAll, List<PurchasingAccountsPayableDocument> purApDocs)
          Get selected merge lines.
protected  Pretag getTargetPretag(List<PurchasingAccountsPayableItemAsset> itemLines, Integer purchaseOrderIdentifier)
          Get the first pre-tag for given itemLines
 boolean isAdditionalChargeExistInAllLines(List<PurchasingAccountsPayableDocument> purApDocs)
          Check if there is additional charge line exist in all lines.
 boolean isAdditionalChargePending(List<PurchasingAccountsPayableItemAsset> itemAssets)
          If item assets are from the same document, we can ignore additional charges pending.
 boolean isMergeAllAction(List<PurchasingAccountsPayableDocument> purApDocs)
          Check if the merge action is merge all.
 boolean isMultipleTagExisting(Integer purchaseOrderIdentifier, Set<Integer> itemLineNumbers)
          Check if more than one pre-tagging exists for given itemLineNumber and PO_ID.
 boolean isPretaggingExisting(Pretag newTag)
          Check pretag existing
 boolean isTradeInAllowanceExist(List<PurchasingAccountsPayableDocument> purApDocs)
          Check if there is trade-in allowance not allocated yet.
 boolean isTradeInIndExistInSelectedLines(List<PurchasingAccountsPayableItemAsset> itemAssets)
          Check if there is TI indicator exists in the given itemAssets List.
protected  boolean isTradeInIndicatorExistInAllLines(List<PurchasingAccountsPayableDocument> purApDocs)
          Check if TI indicator exists in all form lines
 boolean mergeLinesHasDifferentObjectSubTypes(List<PurchasingAccountsPayableItemAsset> mergeLines)
          Check the payments in given asset lines have different object sub types.
protected  void postAllocateProcess(PurchasingAccountsPayableItemAsset selectedLineItem, List<PurchasingAccountsPayableItemAsset> allocateTargetLines, List<PurchasingAccountsPayableDocument> purApDocs, List<PurchasingAccountsPayableLineAssetAccount> newAccountList, boolean initiateFromBatch)
          Process after allocate.
protected  void postMergeProcess(List<PurchasingAccountsPayableItemAsset> mergeLines, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory, boolean isMergeAll)
          Process after merge.
 boolean processAllocate(PurchasingAccountsPayableItemAsset allocateSourceLine, List<PurchasingAccountsPayableItemAsset> allocateTargetLines, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory, List<PurchasingAccountsPayableDocument> purApDocs, boolean initiateFromBatch)
          Handle additional charge allocate in the same document.
 void processMerge(List<PurchasingAccountsPayableItemAsset> mergeLines, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory, boolean isMergeAll)
          Merge line items.
 void processPercentPayment(PurchasingAccountsPayableItemAsset itemAsset, List<PurchasingAccountsPayableActionHistory> actionsTakenHistory)
          Changes percent quantities to a quantity of 1 for selected line item.
 void processSaveBusinessObjects(List<PurchasingAccountsPayableDocument> purApDocs, PurApLineSession purApLineSession)
          Save purApDoc, item assets and account lines for persistence
 void processSplit(PurchasingAccountsPayableItemAsset splitItemAsset, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory)
          Split the selected line item quantity and create a new line item.
 void resetSelectedValue(List<PurchasingAccountsPayableDocument> purApDocs)
          Reset selectedValue for all line items
protected  void setAssetIndicator(List<PurchasingAccountsPayableDocument> purApDocs)
          Set create asset and apply payment indicator.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setCapitalAssetManagementModuleService(CapitalAssetManagementModuleService capitalAssetManagementModuleService)
          Sets the capitalAssetManagementModuleService attribute value.
protected  void setFirstFinancialObjectCode(PurchasingAccountsPayableItemAsset item)
          Set object code by the first one from the accounting lines.
protected  void setItemAssetUnitCost(PurchasingAccountsPayableItemAsset item, org.kuali.rice.kns.util.KualiDecimal totalCost)
          Set item asset unit cost.
protected  void setLineItemCost(PurchasingAccountsPayableItemAsset item)
          Set line item total cost and unit cost.
 void setPurApInfoService(PurApInfoService purApInfoService)
          Sets the purApInfoService attribute value.
 void setPurApLineDao(PurApLineDao purApLineDao)
          Sets the purApLineDao attribute value.
protected  void updateAccountAmount(org.kuali.rice.kns.util.KualiDecimal additionalAmount, PurchasingAccountsPayableLineAssetAccount targetAccount)
          Update targetAccount by additionalAmount.
protected  void updateAssetIndicatorAfterMerge(List<PurchasingAccountsPayableItemAsset> mergeLines)
          Update create asset and apply payment indicators after merge.
protected  void updateItemStatusAsUserModified(PurchasingAccountsPayableItemAsset itemAsset)
          Update activity status code when percent payment/split/allocate/merge action taken.
protected  void updateLineItemsCost(List<PurchasingAccountsPayableItemAsset> lineItems)
          Reset item total cost and unit cost for each item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PurApLineServiceImpl

public PurApLineServiceImpl()
Method Detail

mergeLinesHasDifferentObjectSubTypes

public boolean mergeLinesHasDifferentObjectSubTypes(List<PurchasingAccountsPayableItemAsset> mergeLines)
Description copied from interface: PurApLineService
Check the payments in given asset lines have different object sub types.

Specified by:
mergeLinesHasDifferentObjectSubTypes in interface PurApLineService
Returns:
See Also:
PurApLineService.mergeLinesHasDifferentObjectSubTypes(java.util.List)

allocateLinesHasDifferentObjectSubTypes

public boolean allocateLinesHasDifferentObjectSubTypes(List<PurchasingAccountsPayableItemAsset> targetLines,
                                                       PurchasingAccountsPayableItemAsset sourceLine)
Description copied from interface: PurApLineService
Check the payments in given asset lines have different object sub types.

Specified by:
allocateLinesHasDifferentObjectSubTypes in interface PurApLineService
Returns:
See Also:
PurApLineService.allocateLinesHasDifferentObjectSubTypes(java.util.List, org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset)

conditionallyUpdateDocumentStatusAsProcessed

public void conditionallyUpdateDocumentStatusAsProcessed(PurchasingAccountsPayableDocument selectedDoc)
Description copied from interface: PurApLineService
In-activate document when all the associated items are inactive.

Specified by:
conditionallyUpdateDocumentStatusAsProcessed in interface PurApLineService
See Also:
org.kuali.kfs.module.cab.document.service.PurApLineDocumentService#inActivateDocument(org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableDocument)

resetSelectedValue

public void resetSelectedValue(List<PurchasingAccountsPayableDocument> purApDocs)
Description copied from interface: PurApLineService
Reset selectedValue for all line items

Specified by:
resetSelectedValue in interface PurApLineService
See Also:
PurApLineService.resetSelectedValue(java.util.List)

processAllocate

public boolean processAllocate(PurchasingAccountsPayableItemAsset allocateSourceLine,
                               List<PurchasingAccountsPayableItemAsset> allocateTargetLines,
                               List<PurchasingAccountsPayableActionHistory> actionsTakeHistory,
                               List<PurchasingAccountsPayableDocument> purApDocs,
                               boolean initiateFromBatch)
Description copied from interface: PurApLineService
Handle additional charge allocate in the same document.

Specified by:
processAllocate in interface PurApLineService
Returns:
See Also:
org.kuali.kfs.module.cab.document.service.PurApLineService#processAllocate(org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset, java.util.List, org.kuali.kfs.module.cab.document.web.PurApLineSession, java.util.List)

postAllocateProcess

protected void postAllocateProcess(PurchasingAccountsPayableItemAsset selectedLineItem,
                                   List<PurchasingAccountsPayableItemAsset> allocateTargetLines,
                                   List<PurchasingAccountsPayableDocument> purApDocs,
                                   List<PurchasingAccountsPayableLineAssetAccount> newAccountList,
                                   boolean initiateFromBatch)
Process after allocate.

Parameters:
selectedLineItem -
allocateTargetLines -
purApDocs -
newAccountList -

getRemovableAssetLocks

protected Map<String,Set> getRemovableAssetLocks(List<PurchasingAccountsPayableItemAsset> processedItems)
Build removable asset lock map from the processedItems list. We need to remove all asset locks hold be items which has been merged or allocated to other lines.

Parameters:
processedItems -
Returns:

addAssetLock

protected void addAssetLock(Map<String,Set> removableAssetLocks,
                            PurchasingAccountsPayableItemAsset processedItem)

updateLineItemsCost

protected void updateLineItemsCost(List<PurchasingAccountsPayableItemAsset> lineItems)
Reset item total cost and unit cost for each item.

Parameters:
allocateTargetLines -

addNewAccountToItemList

protected void addNewAccountToItemList(List<PurchasingAccountsPayableLineAssetAccount> newAccountList)
update account list for each line item

Parameters:
updatedAccountList -

setLineItemCost

protected void setLineItemCost(PurchasingAccountsPayableItemAsset item)
Set line item total cost and unit cost.

Parameters:
item -

allocateByItemAccountAmount

protected void allocateByItemAccountAmount(PurchasingAccountsPayableLineAssetAccount sourceAccount,
                                           List<PurchasingAccountsPayableLineAssetAccount> targetAccounts,
                                           List<PurchasingAccountsPayableLineAssetAccount> newAccountList,
                                           List<PurchasingAccountsPayableActionHistory> actionsTakeHistory)
Allocate one account line to target account lines percentage based on the account line amount.

Parameters:
sourceAccount - Account line to be allocated.
targetAccounts - Account lines which accept amount.

addAllocateHistory

protected void addAllocateHistory(PurchasingAccountsPayableLineAssetAccount sourceAccount,
                                  List<PurchasingAccountsPayableActionHistory> actionsTakeHistory,
                                  org.kuali.rice.kns.util.KualiDecimal additionalAmount,
                                  PurchasingAccountsPayableLineAssetAccount newAccount)
Save allocate action into session object.

Parameters:
sourceAccount -
actionsTakeHistory -
additionalAmount -
newAccount -

getFromTargetAccountList

protected PurchasingAccountsPayableLineAssetAccount getFromTargetAccountList(List<PurchasingAccountsPayableLineAssetAccount> targetAccounts,
                                                                             Long glIdentifier)
Search matching account in targetAccounts by glIdentifier.

Parameters:
targetAccounts -
glIdentifier -
Returns:

updateAccountAmount

protected void updateAccountAmount(org.kuali.rice.kns.util.KualiDecimal additionalAmount,
                                   PurchasingAccountsPayableLineAssetAccount targetAccount)
Update targetAccount by additionalAmount.

Parameters:
additionalAmount -
targetAccount -

getMatchingFromAccountList

protected PurchasingAccountsPayableLineAssetAccount getMatchingFromAccountList(List<PurchasingAccountsPayableLineAssetAccount> accountList,
                                                                               Long glIdentifier,
                                                                               PurchasingAccountsPayableLineAssetAccount targetAccount)
Searching in accountList by glIdentifier for matching account which associated with the same item as targetAccount.

Parameters:
accountList -
glIdentifier -
targetAccount -
Returns:

getAllocateTargetAccounts

protected List<PurchasingAccountsPayableLineAssetAccount> getAllocateTargetAccounts(PurchasingAccountsPayableLineAssetAccount sourceAccount,
                                                                                    List<PurchasingAccountsPayableItemAsset> allocateTargetLines,
                                                                                    boolean addtionalCharge)
Get the target account lines which will be used for allocate.

Parameters:
sourceAccount -
lineItems -
addtionalCharge -
Returns:

getAllocateTargetLines

public List<PurchasingAccountsPayableItemAsset> getAllocateTargetLines(PurchasingAccountsPayableItemAsset selectedLineItem,
                                                                       List<PurchasingAccountsPayableDocument> purApDocs)
Description copied from interface: PurApLineService
Get the target lines based on allocation line type

Specified by:
getAllocateTargetLines in interface PurApLineService
Returns:
See Also:
PurApLineService.getAllocateTargetLines(org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset, java.util.List)

getSelectedMergeLines

public List<PurchasingAccountsPayableItemAsset> getSelectedMergeLines(boolean isMergeAll,
                                                                      List<PurchasingAccountsPayableDocument> purApDocs)
Get selected merge lines. If this is merge all action, we need to manually append all additional charge lines since no select box associated with them.

Specified by:
getSelectedMergeLines in interface PurApLineService
Returns:
See Also:
PurApLineService.getSelectedMergeLines(boolean, java.util.List)

isTradeInAllowanceExist

public boolean isTradeInAllowanceExist(List<PurchasingAccountsPayableDocument> purApDocs)
Description copied from interface: PurApLineService
Check if there is trade-in allowance not allocated yet.

Specified by:
isTradeInAllowanceExist in interface PurApLineService
Returns:
See Also:
PurApLineService.isTradeInAllowanceExist(java.util.List)

isTradeInIndicatorExistInAllLines

protected boolean isTradeInIndicatorExistInAllLines(List<PurchasingAccountsPayableDocument> purApDocs)
Check if TI indicator exists in all form lines

Parameters:
purApDocs -
Returns:

isTradeInIndExistInSelectedLines

public boolean isTradeInIndExistInSelectedLines(List<PurchasingAccountsPayableItemAsset> itemAssets)
Description copied from interface: PurApLineService
Check if there is TI indicator exists in the given itemAssets List.

Specified by:
isTradeInIndExistInSelectedLines in interface PurApLineService
Returns:
See Also:
org.kuali.kfs.module.cab.document.service.PurApLineService#isTradeInIndicatorExist(java.util.List)

isAdditionalChargePending

public boolean isAdditionalChargePending(List<PurchasingAccountsPayableItemAsset> itemAssets)
If item assets are from the same document, we can ignore additional charges pending.

Specified by:
isAdditionalChargePending in interface PurApLineService
Returns:
See Also:
PurApLineService.isAdditionalChargePending(java.util.List)

isMergeAllAction

public boolean isMergeAllAction(List<PurchasingAccountsPayableDocument> purApDocs)
Check if the merge action is merge all.

Specified by:
isMergeAllAction in interface PurApLineService
Returns:
See Also:
PurApLineService.isMergeAllAction(java.util.List)

isAdditionalChargeExistInAllLines

public boolean isAdditionalChargeExistInAllLines(List<PurchasingAccountsPayableDocument> purApDocs)
Description copied from interface: PurApLineService
Check if there is additional charge line exist in all lines.

Specified by:
isAdditionalChargeExistInAllLines in interface PurApLineService
Returns:
See Also:
PurApLineService.isAdditionalChargeExistInAllLines(java.util.List)

processMerge

public void processMerge(List<PurchasingAccountsPayableItemAsset> mergeLines,
                         List<PurchasingAccountsPayableActionHistory> actionsTakeHistory,
                         boolean isMergeAll)
Description copied from interface: PurApLineService
Merge line items.

Specified by:
processMerge in interface PurApLineService
See Also:
org.kuali.kfs.module.cab.document.service.PurApLineService#processMerge(java.util.List)

postMergeProcess

protected void postMergeProcess(List<PurchasingAccountsPayableItemAsset> mergeLines,
                                List<PurchasingAccountsPayableActionHistory> actionsTakeHistory,
                                boolean isMergeAll)
Process after merge.

Parameters:
mergeLines -
purApLineSession -
isMergeAll -

updateAssetIndicatorAfterMerge

protected void updateAssetIndicatorAfterMerge(List<PurchasingAccountsPayableItemAsset> mergeLines)
Update create asset and apply payment indicators after merge.

Parameters:
mergeLines -

getTargetPretag

protected Pretag getTargetPretag(List<PurchasingAccountsPayableItemAsset> itemLines,
                                 Integer purchaseOrderIdentifier)
Get the first pre-tag for given itemLines

Parameters:
itemLines -
purchaseOrderIdentifier -
Returns:

isPretaggingExisting

public boolean isPretaggingExisting(Pretag newTag)
Description copied from interface: PurApLineService
Check pretag existing

Specified by:
isPretaggingExisting in interface PurApLineService
Returns:
See Also:
PurApLineService.isPretaggingExisting(org.kuali.kfs.module.cab.businessobject.Pretag)

isMultipleTagExisting

public boolean isMultipleTagExisting(Integer purchaseOrderIdentifier,
                                     Set<Integer> itemLineNumbers)
Description copied from interface: PurApLineService
Check if more than one pre-tagging exists for given itemLineNumber and PO_ID.

Specified by:
isMultipleTagExisting in interface PurApLineService
Returns:
See Also:
PurApLineService.isMultipleTagExisting(java.lang.Integer, java.util.Set)

addMergeHistory

protected void addMergeHistory(List<PurchasingAccountsPayableActionHistory> actionsTakenHistory,
                               String actionTypeCode,
                               PurchasingAccountsPayableItemAsset sourceItem,
                               PurchasingAccountsPayableItemAsset targetItem)
Add merge action to the action history.

Parameters:
purApLineSession -
isMergeAllAction -
firstItem -
item -

processPercentPayment

public void processPercentPayment(PurchasingAccountsPayableItemAsset itemAsset,
                                  List<PurchasingAccountsPayableActionHistory> actionsTakenHistory)
Description copied from interface: PurApLineService
Changes percent quantities to a quantity of 1 for selected line item.

Specified by:
processPercentPayment in interface PurApLineService
Parameters:
itemAsset - Selected line item.
See Also:
org.kuali.kfs.module.cab.document.service.PurApLineService#processPercentPayment(org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset)

updateItemStatusAsUserModified

protected void updateItemStatusAsUserModified(PurchasingAccountsPayableItemAsset itemAsset)
Update activity status code when percent payment/split/allocate/merge action taken.

Parameters:
itemAsset -

addPercentPaymentHistory

protected void addPercentPaymentHistory(List<PurchasingAccountsPayableActionHistory> actionsTakenHistory,
                                        PurchasingAccountsPayableItemAsset item,
                                        org.kuali.rice.kns.util.KualiDecimal oldQty)
Update action history for the percent payment action.

Parameters:
actionsTaken -
item -
oldQty -

processSplit

public void processSplit(PurchasingAccountsPayableItemAsset splitItemAsset,
                         List<PurchasingAccountsPayableActionHistory> actionsTakeHistory)
Description copied from interface: PurApLineService
Split the selected line item quantity and create a new line item.

Specified by:
processSplit in interface PurApLineService
See Also:
org.kuali.kfs.module.cab.document.service.PurApLineService#processSplit(org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset)

getMaxCabLineNumber

protected int getMaxCabLineNumber(PurchasingAccountsPayableItemAsset splitItemAsset,
                                  PurchasingAccountsPayableDocument purApDoc)
Get the max cab line #. As part of the primary key, it should be the max value among the form item list and DB.

Parameters:
splitItemAsset -
purApDoc -
Returns:

getMaxCabLineNbrForItemInForm

protected int getMaxCabLineNbrForItemInForm(PurchasingAccountsPayableDocument purApDoc,
                                            PurchasingAccountsPayableItemAsset currentItemAsset)
Search the current active items and return the max CAB line # for split new item .

Parameters:
purApDoc -
currentItemAsset -
Returns:

addSplitHistory

protected void addSplitHistory(PurchasingAccountsPayableItemAsset currentItemAsset,
                               PurchasingAccountsPayableItemAsset newItemAsset,
                               List<PurchasingAccountsPayableActionHistory> actionsTakenHistory)
Update action history for a split action.

Parameters:
currentItemAsset -
newItemAsset -
actionsTaken -

processSaveBusinessObjects

public void processSaveBusinessObjects(List<PurchasingAccountsPayableDocument> purApDocs,
                                       PurApLineSession purApLineSession)
Description copied from interface: PurApLineService
Save purApDoc, item assets and account lines for persistence

Specified by:
processSaveBusinessObjects in interface PurApLineService
See Also:
PurApLineService.processSaveBusinessObjects(java.util.List, org.kuali.kfs.module.cab.document.web.PurApLineSession)

createAccountsForNewItemAsset

protected void createAccountsForNewItemAsset(PurchasingAccountsPayableItemAsset currentItemAsset,
                                             PurchasingAccountsPayableItemAsset newItemAsset)
Create asset account list for new item asset and update the current account amount.

Parameters:
oldItemAsset - old line item.
newItemAsset - new line item.

setFirstFinancialObjectCode

protected void setFirstFinancialObjectCode(PurchasingAccountsPayableItemAsset item)
Set object code by the first one from the accounting lines.

Parameters:
item - Selected line item.

buildPurApItemAssetList

public void buildPurApItemAssetList(List<PurchasingAccountsPayableDocument> purApDocs)
Description copied from interface: PurApLineService
Build PurAp document collection and line item collection.

Specified by:
buildPurApItemAssetList in interface PurApLineService
See Also:
PurApLineService.buildPurApItemAssetList(java.util.List)

getPreTagLineItem

public Pretag getPreTagLineItem(Integer purchaseOrderIdentifier,
                                Integer lineItemNumber)
Description copied from interface: PurApLineService
Get preTag if exists for give line item.

Specified by:
getPreTagLineItem in interface PurApLineService
Returns:
See Also:
org.kuali.kfs.module.cab.document.service.PurApLineService#getPreTagLineItem(java.lang.String, java.lang.Integer)

setAssetIndicator

protected void setAssetIndicator(List<PurchasingAccountsPayableDocument> purApDocs)
Set create asset and apply payment indicator. These two indicators are referenced by jsp to control display of these two buttons. How to set these two indicators is based on the business rules. We need to put the following situations into consideration. Since we move allocate additional charge allocation to CAB batch, we bring over addl charge lines only when they are the only items in the document or they are from the FO changes. To accommodate this, we relax the rules and defined as:

1. If the line is trade-in allowance and without trade-in indicator items, we open these two buttons.

2. For line items, if it has trade-in indicator set, there must be no trade-in allowance pending for allocation. Trade-in allowance could from other document but share the same po_id.

Parameters:
purApDocs -

setItemAssetUnitCost

protected void setItemAssetUnitCost(PurchasingAccountsPayableItemAsset item,
                                    org.kuali.rice.kns.util.KualiDecimal totalCost)
Set item asset unit cost.

Parameters:
item - line item
totalCost - total cost for this line item.

calculateItemAssetTotalCost

public org.kuali.rice.kns.util.KualiDecimal calculateItemAssetTotalCost(PurchasingAccountsPayableItemAsset item)
Calculate item asset total cost

Parameters:
item -
Returns:
line item total cost

getBusinessObjectService

public org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
Gets the businessObjectService attribute.

Returns:
Returns the businessObjectService.

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.

Parameters:
businessObjectService - The businessObjectService to set.

getPurApLineDao

public PurApLineDao getPurApLineDao()
Gets the purApLineDao attribute.

Returns:
Returns the purApLineDao.

setPurApLineDao

public void setPurApLineDao(PurApLineDao purApLineDao)
Sets the purApLineDao attribute value.

Parameters:
purApLineDao - The purApLineDao to set.

getPurApInfoService

public PurApInfoService getPurApInfoService()
Gets the purApInfoService attribute.

Returns:
Returns the purApInfoService.

setPurApInfoService

public void setPurApInfoService(PurApInfoService purApInfoService)
Sets the purApInfoService attribute value.

Parameters:
purApInfoService - The purApInfoService to set.

getAssetService

protected AssetService getAssetService()
get CAMS AssetService.

Returns:

getCapitalAssetManagementModuleService

public CapitalAssetManagementModuleService getCapitalAssetManagementModuleService()
Gets the capitalAssetManagementModuleService attribute.

Returns:
Returns the capitalAssetManagementModuleService.

setCapitalAssetManagementModuleService

public void setCapitalAssetManagementModuleService(CapitalAssetManagementModuleService capitalAssetManagementModuleService)
Sets the capitalAssetManagementModuleService attribute value.

Parameters:
capitalAssetManagementModuleService - The capitalAssetManagementModuleService to set.


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