use of org.kuali.kfs.sys.businessobject.SystemOptions in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractCollectorBatchBuilder method getActualFinancialBalanceTypeCodeForCollectorBatch.
protected String getActualFinancialBalanceTypeCodeForCollectorBatch() {
Integer fiscalYear = Integer.valueOf(collectorBatch.getUniversityFiscalYear());
SystemOptions fiscalYearOptions = optionsService.getOptions(fiscalYear);
return fiscalYearOptions.getActualFinancialBalanceTypeCd();
}
use of org.kuali.kfs.sys.businessobject.SystemOptions in project cu-kfs by CU-CommunityApps.
the class CuBalanceServiceImpl method findReversionBalancesForFiscalYear.
/**
* Returns all of the balances to be forwarded for the organization reversion process
* @param year the year of balances to find
* @param endOfYear whether the organization reversion process is running end of year (before the fiscal year change over) or
* beginning of year (after the fiscal year change over)
* @return an iterator of balances to put through the strenuous organization reversion process
* @see org.kuali.kfs.gl.service.BalanceService#findOrganizationReversionBalancesForFiscalYear(java.lang.Integer, boolean)
*/
public Iterator<Balance> findReversionBalancesForFiscalYear(Integer year, boolean endOfYear) {
SystemOptions options = SpringContext.getBean(OptionsService.class).getOptions(year);
List<ParameterEvaluator> parameterEvaluators = new ArrayList<ParameterEvaluator>();
int i = 1;
boolean moreParams = true;
while (moreParams) {
if (parameterService.parameterExists(Reversion.class, PARAMETER_PREFIX + i)) {
ParameterEvaluator parameterEvaluator = /*REFACTORME*/
SpringContext.getBean(ParameterEvaluatorService.class).getParameterEvaluator(Reversion.class, PARAMETER_PREFIX + i);
parameterEvaluators.add(parameterEvaluator);
} else {
moreParams = false;
}
i++;
}
return ((CuBalanceDao) balanceDao).findReversionBalancesForFiscalYear(year, endOfYear, options, parameterEvaluators);
}
use of org.kuali.kfs.sys.businessobject.SystemOptions in project cu-kfs by CU-CommunityApps.
the class ScrubberValidatorImpl method validateFiscalYear.
/**
* Validates the fiscal year of the origin entry
*
* @param originEntry the origin entry being scrubbed
* @param workingEntry the scrubbed version of the origin entry
* @param universityRunDate the university date when this scrubber process is being run
* @return a Message if an error was encountered, otherwise null
*/
protected Message validateFiscalYear(OriginEntryInformation originEntry, OriginEntryInformation workingEntry, UniversityDate universityRunDate, AccountingCycleCachingService accountingCycleCachingService) {
LOG.debug("validateFiscalYear() started");
if ((originEntry.getUniversityFiscalYear() == null) || (originEntry.getUniversityFiscalYear().intValue() == 0)) {
// commented out for KULLAB-627
// if (!originEntry.getFinancialBalanceTypeCode().equals(KFSConstants.BALANCE_TYPE_A21)){
workingEntry.setUniversityFiscalYear(universityRunDate.getUniversityFiscalYear());
workingEntry.setUniversityFiscalPeriodCode(universityRunDate.getUniversityFiscalAccountingPeriod());
// TODO:- to display updated values on report
// TODO:- need to check because below two lines are commented out in validateUniversityFiscalPeriodCode
originEntry.setUniversityFiscalYear(universityRunDate.getUniversityFiscalYear());
originEntry.setUniversityFiscalPeriodCode(universityRunDate.getUniversityFiscalAccountingPeriod());
} else {
workingEntry.setUniversityFiscalYear(originEntry.getUniversityFiscalYear());
}
SystemOptions originEntryOption = accountingCycleCachingService.getSystemOptions(workingEntry.getUniversityFiscalYear());
if (originEntryOption == null) {
return MessageBuilder.buildMessage(KFSKeyConstants.ERROR_UNIV_FISCAL_YR_NOT_FOUND, originEntry.getUniversityFiscalYear() + "", Message.TYPE_FATAL);
}
return null;
}
use of org.kuali.kfs.sys.businessobject.SystemOptions in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractCollectorBatchBuilderTest method buildMockOptionsService.
protected OptionsService buildMockOptionsService() {
return buildMockService(OptionsService.class, (service) -> {
SystemOptions testOptions = new SystemOptions();
testOptions.setActualFinancialBalanceTypeCd(BalanceTypeService.ACTUAL_BALANCE_TYPE);
EasyMock.expect(service.getOptions(EasyMock.anyObject())).andStubReturn(testOptions);
});
}
Aggregations