use of com.axelor.apps.base.service.PeriodService in project axelor-open-suite by axelor.
the class EmployeeBonusController method compute.
public void compute(ActionRequest request, ActionResponse response) {
EmployeeBonusMgt employeeBonusMgt = request.getContext().asType(EmployeeBonusMgt.class);
PeriodService periodService = Beans.get(PeriodService.class);
try {
employeeBonusMgt = Beans.get(EmployeeBonusMgtRepository.class).find(employeeBonusMgt.getId());
Beans.get(EmployeeBonusService.class).compute(employeeBonusMgt);
response.setReload(true);
periodService.checkPeriod(employeeBonusMgt.getPayPeriod());
periodService.checkPeriod(employeeBonusMgt.getLeavePeriod());
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
Aggregations