/** This method is for validation of PayrollEndFiscalPeriodCode */ protected Message validatePayrollEndFiscalPeriodCode( LaborOriginEntry laborOriginEntry, LaborOriginEntry laborWorkingEntry, UniversityDate universityRunDate, LaborAccountingCycleCachingService laborAccountingCycleCachingService) { LOG.debug("validateUniversityFiscalPeriodCode() started"); AccountingPeriod accountingPeriod = null; Integer tempPayrollFiscalYear = 0; if (laborOriginEntry.getPayrollEndDateFiscalYear() == null) { tempPayrollFiscalYear = universityRunDate.getUniversityFiscalYear(); } else { tempPayrollFiscalYear = laborOriginEntry.getPayrollEndDateFiscalYear(); } if (!laborOriginEntry.getPayrollEndDateFiscalPeriodCode().equals("")) { accountingPeriod = laborAccountingCycleCachingService.getAccountingPeriod( tempPayrollFiscalYear, laborOriginEntry.getPayrollEndDateFiscalPeriodCode()); if (accountingPeriod == null) { return MessageBuilder.buildMessage( KFSKeyConstants.ERROR_PAYROLL_END_DATE_FISCAL_PERIOD, laborOriginEntry.getPayrollEndDateFiscalPeriodCode(), Message.TYPE_FATAL); } } return null; }
/** This method is for validation of payrollEndFiscalYear */ protected Message validatePayrollEndFiscalYear( LaborOriginEntry laborOriginEntry, LaborOriginEntry laborWorkingEntry, UniversityDate universityRunDate, LaborAccountingCycleCachingService laborAccountingCycleCachingService) { LOG.debug("validatePayrollEndFiscalYear() started"); SystemOptions scrubbedEntryOption = null; if (laborOriginEntry.getPayrollEndDateFiscalYear() != null) { scrubbedEntryOption = laborAccountingCycleCachingService.getSystemOptions( laborOriginEntry.getPayrollEndDateFiscalYear()); if (scrubbedEntryOption == null) { return MessageBuilder.buildMessage( KFSKeyConstants.ERROR_PAYROLL_END_DATE_FISCAL_YEAR, "" + laborOriginEntry.getPayrollEndDateFiscalYear(), Message.TYPE_FATAL); } } return null; }