use of com.axelor.apps.businessproject.service.InvoicingProjectService in project axelor-open-suite by axelor.
the class InvoicingProjectController method fillIn.
public void fillIn(ActionRequest request, ActionResponse response) throws AxelorException {
InvoicingProject invoicingProject = request.getContext().asType(InvoicingProject.class);
InvoicingProjectService invoicingProjectService = Beans.get(InvoicingProjectService.class);
Project project = invoicingProject.getProject();
if (project == null) {
throw new AxelorException(TraceBackRepository.CATEGORY_CONFIGURATION_ERROR, I18n.get(IExceptionMessage.INVOICING_PROJECT_PROJECT));
}
invoicingProjectService.clearLines(invoicingProject);
invoicingProjectService.setLines(invoicingProject, project, 0);
response.setValues(invoicingProject);
}
Aggregations