|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.module.cab.document.service.impl.PurApLineServiceImpl
@Transactional public class PurApLineServiceImpl
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 |
---|
public PurApLineServiceImpl()
Method Detail |
---|
public boolean mergeLinesHasDifferentObjectSubTypes(List<PurchasingAccountsPayableItemAsset> mergeLines)
PurApLineService
mergeLinesHasDifferentObjectSubTypes
in interface PurApLineService
PurApLineService.mergeLinesHasDifferentObjectSubTypes(java.util.List)
public boolean allocateLinesHasDifferentObjectSubTypes(List<PurchasingAccountsPayableItemAsset> targetLines, PurchasingAccountsPayableItemAsset sourceLine)
PurApLineService
allocateLinesHasDifferentObjectSubTypes
in interface PurApLineService
PurApLineService.allocateLinesHasDifferentObjectSubTypes(java.util.List,
org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset)
public void conditionallyUpdateDocumentStatusAsProcessed(PurchasingAccountsPayableDocument selectedDoc)
PurApLineService
conditionallyUpdateDocumentStatusAsProcessed
in interface PurApLineService
org.kuali.kfs.module.cab.document.service.PurApLineDocumentService#inActivateDocument(org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableDocument)
public void resetSelectedValue(List<PurchasingAccountsPayableDocument> purApDocs)
PurApLineService
resetSelectedValue
in interface PurApLineService
PurApLineService.resetSelectedValue(java.util.List)
public boolean processAllocate(PurchasingAccountsPayableItemAsset allocateSourceLine, List<PurchasingAccountsPayableItemAsset> allocateTargetLines, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory, List<PurchasingAccountsPayableDocument> purApDocs, boolean initiateFromBatch)
PurApLineService
processAllocate
in interface PurApLineService
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)
protected void postAllocateProcess(PurchasingAccountsPayableItemAsset selectedLineItem, List<PurchasingAccountsPayableItemAsset> allocateTargetLines, List<PurchasingAccountsPayableDocument> purApDocs, List<PurchasingAccountsPayableLineAssetAccount> newAccountList, boolean initiateFromBatch)
selectedLineItem
- allocateTargetLines
- purApDocs
- newAccountList
- protected Map<String,Set> getRemovableAssetLocks(List<PurchasingAccountsPayableItemAsset> processedItems)
processedItems
-
protected void addAssetLock(Map<String,Set> removableAssetLocks, PurchasingAccountsPayableItemAsset processedItem)
protected void updateLineItemsCost(List<PurchasingAccountsPayableItemAsset> lineItems)
allocateTargetLines
- protected void addNewAccountToItemList(List<PurchasingAccountsPayableLineAssetAccount> newAccountList)
updatedAccountList
- protected void setLineItemCost(PurchasingAccountsPayableItemAsset item)
item
- protected void allocateByItemAccountAmount(PurchasingAccountsPayableLineAssetAccount sourceAccount, List<PurchasingAccountsPayableLineAssetAccount> targetAccounts, List<PurchasingAccountsPayableLineAssetAccount> newAccountList, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory)
sourceAccount
- Account line to be allocated.targetAccounts
- Account lines which accept amount.protected void addAllocateHistory(PurchasingAccountsPayableLineAssetAccount sourceAccount, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory, org.kuali.rice.kns.util.KualiDecimal additionalAmount, PurchasingAccountsPayableLineAssetAccount newAccount)
sourceAccount
- actionsTakeHistory
- additionalAmount
- newAccount
- protected PurchasingAccountsPayableLineAssetAccount getFromTargetAccountList(List<PurchasingAccountsPayableLineAssetAccount> targetAccounts, Long glIdentifier)
targetAccounts
- glIdentifier
-
protected void updateAccountAmount(org.kuali.rice.kns.util.KualiDecimal additionalAmount, PurchasingAccountsPayableLineAssetAccount targetAccount)
additionalAmount
- targetAccount
- protected PurchasingAccountsPayableLineAssetAccount getMatchingFromAccountList(List<PurchasingAccountsPayableLineAssetAccount> accountList, Long glIdentifier, PurchasingAccountsPayableLineAssetAccount targetAccount)
accountList
- glIdentifier
- targetAccount
-
protected List<PurchasingAccountsPayableLineAssetAccount> getAllocateTargetAccounts(PurchasingAccountsPayableLineAssetAccount sourceAccount, List<PurchasingAccountsPayableItemAsset> allocateTargetLines, boolean addtionalCharge)
sourceAccount
- lineItems
- addtionalCharge
-
public List<PurchasingAccountsPayableItemAsset> getAllocateTargetLines(PurchasingAccountsPayableItemAsset selectedLineItem, List<PurchasingAccountsPayableDocument> purApDocs)
PurApLineService
getAllocateTargetLines
in interface PurApLineService
PurApLineService.getAllocateTargetLines(org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset,
java.util.List)
public List<PurchasingAccountsPayableItemAsset> getSelectedMergeLines(boolean isMergeAll, List<PurchasingAccountsPayableDocument> purApDocs)
getSelectedMergeLines
in interface PurApLineService
PurApLineService.getSelectedMergeLines(boolean, java.util.List)
public boolean isTradeInAllowanceExist(List<PurchasingAccountsPayableDocument> purApDocs)
PurApLineService
isTradeInAllowanceExist
in interface PurApLineService
PurApLineService.isTradeInAllowanceExist(java.util.List)
protected boolean isTradeInIndicatorExistInAllLines(List<PurchasingAccountsPayableDocument> purApDocs)
purApDocs
-
public boolean isTradeInIndExistInSelectedLines(List<PurchasingAccountsPayableItemAsset> itemAssets)
PurApLineService
isTradeInIndExistInSelectedLines
in interface PurApLineService
org.kuali.kfs.module.cab.document.service.PurApLineService#isTradeInIndicatorExist(java.util.List)
public boolean isAdditionalChargePending(List<PurchasingAccountsPayableItemAsset> itemAssets)
isAdditionalChargePending
in interface PurApLineService
PurApLineService.isAdditionalChargePending(java.util.List)
public boolean isMergeAllAction(List<PurchasingAccountsPayableDocument> purApDocs)
isMergeAllAction
in interface PurApLineService
PurApLineService.isMergeAllAction(java.util.List)
public boolean isAdditionalChargeExistInAllLines(List<PurchasingAccountsPayableDocument> purApDocs)
PurApLineService
isAdditionalChargeExistInAllLines
in interface PurApLineService
PurApLineService.isAdditionalChargeExistInAllLines(java.util.List)
public void processMerge(List<PurchasingAccountsPayableItemAsset> mergeLines, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory, boolean isMergeAll)
PurApLineService
processMerge
in interface PurApLineService
org.kuali.kfs.module.cab.document.service.PurApLineService#processMerge(java.util.List)
protected void postMergeProcess(List<PurchasingAccountsPayableItemAsset> mergeLines, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory, boolean isMergeAll)
mergeLines
- purApLineSession
- isMergeAll
- protected void updateAssetIndicatorAfterMerge(List<PurchasingAccountsPayableItemAsset> mergeLines)
mergeLines
- protected Pretag getTargetPretag(List<PurchasingAccountsPayableItemAsset> itemLines, Integer purchaseOrderIdentifier)
itemLines
- purchaseOrderIdentifier
-
public boolean isPretaggingExisting(Pretag newTag)
PurApLineService
isPretaggingExisting
in interface PurApLineService
PurApLineService.isPretaggingExisting(org.kuali.kfs.module.cab.businessobject.Pretag)
public boolean isMultipleTagExisting(Integer purchaseOrderIdentifier, Set<Integer> itemLineNumbers)
PurApLineService
isMultipleTagExisting
in interface PurApLineService
PurApLineService.isMultipleTagExisting(java.lang.Integer, java.util.Set)
protected void addMergeHistory(List<PurchasingAccountsPayableActionHistory> actionsTakenHistory, String actionTypeCode, PurchasingAccountsPayableItemAsset sourceItem, PurchasingAccountsPayableItemAsset targetItem)
purApLineSession
- isMergeAllAction
- firstItem
- item
- public void processPercentPayment(PurchasingAccountsPayableItemAsset itemAsset, List<PurchasingAccountsPayableActionHistory> actionsTakenHistory)
PurApLineService
processPercentPayment
in interface PurApLineService
itemAsset
- Selected line item.org.kuali.kfs.module.cab.document.service.PurApLineService#processPercentPayment(org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset)
protected void updateItemStatusAsUserModified(PurchasingAccountsPayableItemAsset itemAsset)
itemAsset
- protected void addPercentPaymentHistory(List<PurchasingAccountsPayableActionHistory> actionsTakenHistory, PurchasingAccountsPayableItemAsset item, org.kuali.rice.kns.util.KualiDecimal oldQty)
actionsTaken
- item
- oldQty
- public void processSplit(PurchasingAccountsPayableItemAsset splitItemAsset, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory)
PurApLineService
processSplit
in interface PurApLineService
org.kuali.kfs.module.cab.document.service.PurApLineService#processSplit(org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset)
protected int getMaxCabLineNumber(PurchasingAccountsPayableItemAsset splitItemAsset, PurchasingAccountsPayableDocument purApDoc)
splitItemAsset
- purApDoc
-
protected int getMaxCabLineNbrForItemInForm(PurchasingAccountsPayableDocument purApDoc, PurchasingAccountsPayableItemAsset currentItemAsset)
purApDoc
- currentItemAsset
-
protected void addSplitHistory(PurchasingAccountsPayableItemAsset currentItemAsset, PurchasingAccountsPayableItemAsset newItemAsset, List<PurchasingAccountsPayableActionHistory> actionsTakenHistory)
currentItemAsset
- newItemAsset
- actionsTaken
- public void processSaveBusinessObjects(List<PurchasingAccountsPayableDocument> purApDocs, PurApLineSession purApLineSession)
PurApLineService
processSaveBusinessObjects
in interface PurApLineService
PurApLineService.processSaveBusinessObjects(java.util.List,
org.kuali.kfs.module.cab.document.web.PurApLineSession)
protected void createAccountsForNewItemAsset(PurchasingAccountsPayableItemAsset currentItemAsset, PurchasingAccountsPayableItemAsset newItemAsset)
oldItemAsset
- old line item.newItemAsset
- new line item.protected void setFirstFinancialObjectCode(PurchasingAccountsPayableItemAsset item)
item
- Selected line item.public void buildPurApItemAssetList(List<PurchasingAccountsPayableDocument> purApDocs)
PurApLineService
buildPurApItemAssetList
in interface PurApLineService
PurApLineService.buildPurApItemAssetList(java.util.List)
public Pretag getPreTagLineItem(Integer purchaseOrderIdentifier, Integer lineItemNumber)
PurApLineService
getPreTagLineItem
in interface PurApLineService
org.kuali.kfs.module.cab.document.service.PurApLineService#getPreTagLineItem(java.lang.String, java.lang.Integer)
protected void setAssetIndicator(List<PurchasingAccountsPayableDocument> purApDocs)
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.
purApDocs
- protected void setItemAssetUnitCost(PurchasingAccountsPayableItemAsset item, org.kuali.rice.kns.util.KualiDecimal totalCost)
item
- line itemtotalCost
- total cost for this line item.public org.kuali.rice.kns.util.KualiDecimal calculateItemAssetTotalCost(PurchasingAccountsPayableItemAsset item)
item
-
public org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
businessObjectService
- The businessObjectService to set.public PurApLineDao getPurApLineDao()
public void setPurApLineDao(PurApLineDao purApLineDao)
purApLineDao
- The purApLineDao to set.public PurApInfoService getPurApInfoService()
public void setPurApInfoService(PurApInfoService purApInfoService)
purApInfoService
- The purApInfoService to set.protected AssetService getAssetService()
public CapitalAssetManagementModuleService getCapitalAssetManagementModuleService()
public void setCapitalAssetManagementModuleService(CapitalAssetManagementModuleService capitalAssetManagementModuleService)
capitalAssetManagementModuleService
- The capitalAssetManagementModuleService to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |