use of com.axelor.apps.production.service.config.ProductionConfigService in project axelor-open-suite by axelor.
the class ManufOrderServiceImpl method getManufOrderSeq.
@Override
public String getManufOrderSeq(ManufOrder manufOrder) throws AxelorException {
ProductionConfigService productionConfigService = Beans.get(ProductionConfigService.class);
ProductionConfig productionConfig = productionConfigService.getProductionConfig(manufOrder.getCompany());
Sequence sequence = productionConfigService.getManufOrderSequence(productionConfig, manufOrder.getWorkshopStockLocation());
String seq = sequenceService.getSequenceNumber(sequence);
if (seq == null) {
throw new AxelorException(TraceBackRepository.CATEGORY_CONFIGURATION_ERROR, I18n.get(IExceptionMessage.MANUF_ORDER_SEQ));
}
return seq;
}
Aggregations