use of com.axelor.apps.supplychain.db.TimetableTemplate in project axelor-open-suite by axelor.
the class TimetableController method applyTemplate.
public void applyTemplate(ActionRequest request, ActionResponse response) {
Context context = request.getContext();
try {
if (context.get("timetableTemplate") == null || context.get("exTaxTotal") == null || context.get("computationDate") == null) {
return;
}
TimetableTemplate template = (TimetableTemplate) context.get("timetableTemplate");
List<Timetable> timetableList = timetableService.applyTemplate(template, (BigDecimal) context.get("exTaxTotal"), (LocalDate) context.get("computationDate"));
response.setValue("timetableList", timetableList);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
Aggregations