/** * @see * org.kuali.module.labor.service.LaborScrubberValidator#validateTransaction(owrg.kuali.module.labor.bo.LaborOriginEntry, * org.kuali.kfs.module.ld.businessobject.LaborOriginEntry, * org.kuali.kfs.gl.businessobject.UniversityDate) */ public List<Message> validateTransaction( OriginEntryInformation originEntry, OriginEntryInformation scrubbedEntry, UniversityDate universityRunDate, boolean laborIndicator, AccountingCycleCachingService laborAccountingCycleCachingService) { LOG.debug("validateTransaction() started"); List<Message> errors = new ArrayList<Message>(); continuationAccountIndicator = false; LaborOriginEntry laborOriginEntry = (LaborOriginEntry) originEntry; LaborOriginEntry laborScrubbedEntry = (LaborOriginEntry) scrubbedEntry; // gl scrubber validation errors = scrubberValidator.validateTransaction( laborOriginEntry, laborScrubbedEntry, universityRunDate, laborIndicator, laborAccountingCycleCachingService); refreshOriginEntryReferences(laborOriginEntry); refreshOriginEntryReferences(laborScrubbedEntry); if (StringUtils.isBlank(laborOriginEntry.getEmplid())) { laborScrubbedEntry.setEmplid(LaborConstants.getDashEmplId()); } if (StringUtils.isBlank(laborOriginEntry.getPositionNumber())) { laborScrubbedEntry.setPositionNumber(LaborConstants.getDashPositionNumber()); } Message err = null; // this validation is duplicated. This is in ScrubberValidatorImpl under GL // err = this.validateClosedPeriodCode(laborOriginEntry, laborScrubbedEntry); // if (err != null) { // errors.add(err); // } err = validatePayrollEndFiscalYear( laborOriginEntry, laborScrubbedEntry, universityRunDate, (LaborAccountingCycleCachingService) laborAccountingCycleCachingService); if (err != null) { errors.add(err); } err = validatePayrollEndFiscalPeriodCode( laborOriginEntry, laborScrubbedEntry, universityRunDate, (LaborAccountingCycleCachingService) laborAccountingCycleCachingService); if (err != null) { errors.add(err); } err = validateAccount( laborOriginEntry, laborScrubbedEntry, universityRunDate, (LaborAccountingCycleCachingService) laborAccountingCycleCachingService); if (err != null) { errors.add(err); } err = validateSubAccount( laborOriginEntry, laborScrubbedEntry, (LaborAccountingCycleCachingService) laborAccountingCycleCachingService); if (err != null) { errors.add(err); } return errors; }
/** * @see * org.kuali.kfs.gl.service.ScrubberValidator#isAccountExpired(org.kuali.kfs.coa.businessobject.Account, * org.kuali.kfs.sys.businessobject.UniversityDate) */ public boolean isAccountExpired(Account account, UniversityDate universityRunDate) { return scrubberValidator.isAccountExpired(account, universityRunDate); }