use of org.kuali.kfs.module.cam.document.service.GlLineService in project cu-kfs by CU-CommunityApps.
the class CapitalAssetInformationAction method prepareRecordsForDisplay.
protected void prepareRecordsForDisplay(CapitalAssetInformationForm capitalAssetForm, GeneralLedgerEntry entry) {
GlLineService glLineService = SpringContext.getBean(GlLineService.class);
entry.setSelected(true);
capitalAssetForm.setGeneralLedgerEntry(entry);
capitalAssetForm.setPrimaryGlAccountId(entry.getGeneralLedgerAccountIdentifier());
List<CapitalAssetInformation> capitalAssetInformations = glLineService.findAllCapitalAssetInformation(entry.getDocumentNumber());
Collection<GeneralLedgerEntry> glEntries = glLineService.findAllGeneralLedgerEntry(entry.getDocumentNumber());
if (!capitalAssetInformations.isEmpty() && capitalAssetInformations.size() != glEntries.size()) {
// we need to generate missing capital asset info
glLineService.setupMissingCapitalAssetInformation(entry.getDocumentNumber());
}
List<CapitalAssetInformation> capitalAssetInformation = glLineService.findCapitalAssetInformationForGLLine(entry);
// to render and subsequent processing to occur successfully.
if (capitalAssetInformation.isEmpty()) {
glLineService.setupCapitalAssetInformation(entry);
capitalAssetInformation = glLineService.findCapitalAssetInformationForGLLine(entry);
}
capitalAssetForm.setCapitalAssetInformation(capitalAssetInformation);
}
Aggregations