use of com.axelor.apps.businessproduction.service.OperationOrderTimesheetService in project axelor-open-suite by axelor.
the class TimesheetController method updateOperationOrders.
/**
* Called from timesheet form view, on save. <br>
* Call {@link OperationOrderTimesheetService#updateAllRealDuration(List)}.
*
* @param request
* @param response
*/
public void updateOperationOrders(ActionRequest request, ActionResponse response) {
try {
Timesheet timesheet = request.getContext().asType(Timesheet.class);
Beans.get(OperationOrderTimesheetService.class).updateOperationOrders(timesheet);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
use of com.axelor.apps.businessproduction.service.OperationOrderTimesheetService in project axelor-open-suite by axelor.
the class TimesheetLineController method updateOperationOrder.
/**
* Called from timesheet line form view, on save. <br>
* Call {@link OperationOrderTimesheetService#updateOperationOrders(Timesheet)}.
*
* @param request
* @param response
*/
public void updateOperationOrder(ActionRequest request, ActionResponse response) {
try {
TimesheetLine timesheetLine = request.getContext().asType(TimesheetLine.class);
Timesheet timesheet = timesheetLine.getTimesheet();
if (timesheet == null && request.getContext().getParent() != null) {
timesheet = request.getContext().getParent().asType(Timesheet.class);
}
if (timesheet != null) {
Beans.get(OperationOrderTimesheetService.class).updateOperationOrders(timesheet);
}
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
Aggregations