|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl
@Transactional public class AssetDepreciationServiceImpl
This class is a service that calculates the depreciation amount for each asset that has a eligible asset payment.
When an error occurs running this process, a pdf file will be created with the error message. However, this doesn't mean that this process automatically leaves all the records as they were right before running the program. If the process fails, is suggested to do the following before trying to run the process again: a.)Delete gl pending entry depreciation entries: DELETE FROM GL_PENDING_ENTRY_T WHERE FDOC_TYP_CD = 'DEPR' b.)Substract from the accumulated depreciation amount the depreciation calculated for the fiscal month that was ran, and then reset the depreciation amount field for the fiscal month that was ran. ex: Assuming that the fiscal month = 8 then: UPDATE CM_AST_PAYMENT_T SET AST_ACUM_DEPR1_AMT = AST_ACUM_DEPR1_AMT - AST_PRD8_DEPR1_AMT, AST_PRD8_DEPR1_AMT=0
Constructor Summary | |
---|---|
AssetDepreciationServiceImpl()
|
Method Summary | |
---|---|
protected Map<String,AssetObjectCode> |
buildChartObjectToCapitalizationObjectMap()
Builds map between object code to corresponding asset object code |
protected SortedMap<String,AssetDepreciationTransaction> |
calculateDepreciation(Collection<AssetPaymentInfo> depreciableAssetsCollection,
Calendar depreciationDate)
This method calculates the depreciation of each asset payment, creates the depreciation transactions that will be stored in the general ledger pending entry table |
protected String |
createNewDepreciationDocument()
|
org.kuali.rice.kns.service.DataDictionaryService |
getDataDictionaryService()
|
DepreciationBatchDao |
getDepreciationBatchDao()
Gets the depreciationBatchDao attribute. |
protected ObjectCode |
getDepreciationObjectCode(Map<String,ObjectCode> capObjectCodesCache,
AssetPaymentInfo assetPaymentInfo,
String capitalizationFinancialObjectCode)
Depreciation object code is returned from cache or from DB |
protected void |
populateDepreciationTransaction(AssetPaymentInfo assetPayment,
String transactionType,
String plantCOA,
String plantAccount,
ObjectCode deprObjectCode,
SortedMap<String,AssetDepreciationTransaction> depreciationTransactionSummary)
This method stores in a collection of business objects the depreciation transaction that later on will be passed to the processGeneralLedgerPendingEntry method in order to store the records in gl pending entry table |
protected void |
processGeneralLedgerPendingEntry(SortedMap<String,AssetDepreciationTransaction> trans)
This method stores the depreciation transactions in the general pending entry table and creates a new documentHeader entry. |
void |
runDepreciation()
This method runs depreciation process |
void |
setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
|
void |
setCamsReportService(ReportService reportService)
|
void |
setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
|
void |
setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
|
void |
setDepreciableAssetsDao(DepreciableAssetsDao depreciableAssetsDao)
|
void |
setDepreciationBatchDao(DepreciationBatchDao depreciationBatchDao)
Sets the depreciationBatchDao attribute value. |
void |
setGeneralLedgerPendingEntryService(GeneralLedgerPendingEntryService generalLedgerPendingEntryService)
|
void |
setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kcs)
|
void |
setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
|
void |
setUniversityDateDao(UniversityDateDao universityDateDao)
|
void |
setWorkflowDocumentService(org.kuali.rice.kns.workflow.service.WorkflowDocumentService workflowDocumentService)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AssetDepreciationServiceImpl()
Method Detail |
---|
public void runDepreciation()
AssetDepreciationService
runDepreciation
in interface AssetDepreciationService
AssetDepreciationService.runDepreciation()
protected SortedMap<String,AssetDepreciationTransaction> calculateDepreciation(Collection<AssetPaymentInfo> depreciableAssetsCollection, Calendar depreciationDate)
depreciableAssetsCollection
- asset payments eligible for depreciation
protected void populateDepreciationTransaction(AssetPaymentInfo assetPayment, String transactionType, String plantCOA, String plantAccount, ObjectCode deprObjectCode, SortedMap<String,AssetDepreciationTransaction> depreciationTransactionSummary)
assetPayment
- asset paymenttransactionType
- which can be [C]redit or [D]ebitplantCOA
- plant fund char of account codeplantAccount
- plant fund char of account codefinancialObject
- char of account object code linked to the paymentdepreciationTransactionSummary
- protected void processGeneralLedgerPendingEntry(SortedMap<String,AssetDepreciationTransaction> trans)
trans
- SortedMap with the transactionsprotected String createNewDepreciationDocument() throws org.kuali.rice.kew.exception.WorkflowException
org.kuali.rice.kew.exception.WorkflowException
protected ObjectCode getDepreciationObjectCode(Map<String,ObjectCode> capObjectCodesCache, AssetPaymentInfo assetPaymentInfo, String capitalizationFinancialObjectCode)
capitalizationObjectCodes
- collection cacheassetPaymentInfo
- capitalizationFinancialObjectCode
-
protected Map<String,AssetObjectCode> buildChartObjectToCapitalizationObjectMap()
public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
public void setDepreciableAssetsDao(DepreciableAssetsDao depreciableAssetsDao)
public void setCamsReportService(ReportService reportService)
public void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kcs)
public void setGeneralLedgerPendingEntryService(GeneralLedgerPendingEntryService generalLedgerPendingEntryService)
public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
public void setUniversityDateDao(UniversityDateDao universityDateDao)
public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
public void setWorkflowDocumentService(org.kuali.rice.kns.workflow.service.WorkflowDocumentService workflowDocumentService)
public org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
public DepreciationBatchDao getDepreciationBatchDao()
public void setDepreciationBatchDao(DepreciationBatchDao depreciationBatchDao)
setDepreciationBatchDao
in interface AssetDepreciationService
depreciationBatchDao
- The depreciationBatchDao to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |