use of com.axelor.apps.production.service.app.AppProductionService in project axelor-open-suite by axelor.
the class ManufOrderServiceBusinessImpl method createManufOrder.
@Override
public ManufOrder createManufOrder(Product product, BigDecimal qty, int priority, boolean isToInvoice, Company company, BillOfMaterial billOfMaterial, LocalDateTime plannedStartDateT, LocalDateTime plannedEndDateT) throws AxelorException {
ManufOrder manufOrder = super.createManufOrder(product, qty, priority, isToInvoice, company, billOfMaterial, plannedStartDateT, plannedEndDateT);
AppProductionService appProductionService = Beans.get(AppProductionService.class);
if (!appProductionService.isApp("production") || !appProductionService.getAppProduction().getManageBusinessProduction()) {
return manufOrder;
}
manufOrder.setIsToInvoice(isToInvoice);
return manufOrder;
}
use of com.axelor.apps.production.service.app.AppProductionService in project axelor-open-suite by axelor.
the class OperationOrderServiceBusinessImpl method copyProdHumanResource.
@Override
protected ProdHumanResource copyProdHumanResource(ProdHumanResource prodHumanResource) {
AppProductionService appProductionService = Beans.get(AppProductionService.class);
if (!appProductionService.isApp("production") || !appProductionService.getAppProduction().getManageBusinessProduction()) {
return super.copyProdHumanResource(prodHumanResource);
}
ProdHumanResource prodHumanResourceCopy = new ProdHumanResource(prodHumanResource.getProduct(), prodHumanResource.getDuration());
prodHumanResourceCopy.setEmployee(prodHumanResource.getEmployee());
return prodHumanResourceCopy;
}
use of com.axelor.apps.production.service.app.AppProductionService in project axelor-open-suite by axelor.
the class TimesheetBusinessProductionServiceImpl method validate.
@Override
@Transactional
public void validate(Timesheet timesheet) {
super.validate(timesheet);
AppProductionService appProductionService = Beans.get(AppProductionService.class);
if (appProductionService.isApp("production") && appProductionService.getAppProduction().getManageBusinessProduction()) {
Beans.get(OperationOrderTimesheetServiceImpl.class).updateAllRealDuration(timesheet.getTimesheetLineList());
}
}
use of com.axelor.apps.production.service.app.AppProductionService in project axelor-open-suite by axelor.
the class TimesheetBusinessProductionServiceImpl method refuse.
@Override
@Transactional
public void refuse(Timesheet timesheet) {
super.refuse(timesheet);
AppProductionService appProductionService = Beans.get(AppProductionService.class);
if (appProductionService.isApp("production") && appProductionService.getAppProduction().getManageBusinessProduction()) {
Beans.get(OperationOrderTimesheetServiceImpl.class).updateAllRealDuration(timesheet.getTimesheetLineList());
}
}
use of com.axelor.apps.production.service.app.AppProductionService in project axelor-open-suite by axelor.
the class TimesheetBusinessProductionServiceImpl method confirm.
@Override
@Transactional(rollbackOn = { Exception.class })
public void confirm(Timesheet timesheet) throws AxelorException {
super.confirm(timesheet);
AppProductionService appProductionService = Beans.get(AppProductionService.class);
if (appProductionService.isApp("production") && appProductionService.getAppProduction().getManageBusinessProduction()) {
Beans.get(OperationOrderTimesheetServiceImpl.class).updateAllRealDuration(timesheet.getTimesheetLineList());
}
}
Aggregations