use of com.axelor.apps.sale.service.saleorder.SaleOrderLineService in project axelor-open-suite by axelor.
the class SaleOrderLineController method computeSubMargin.
public void computeSubMargin(ActionRequest request, ActionResponse response) throws AxelorException {
Context context = request.getContext();
SaleOrderLine saleOrderLine = context.asType(SaleOrderLine.class);
SaleOrderLineService saleOrderLineService = Beans.get(SaleOrderLineService.class);
SaleOrder saleOrder = saleOrderLineService.getSaleOrder(context);
saleOrderLine.setSaleOrder(saleOrder);
Map<String, BigDecimal> map = saleOrderLineService.computeSubMargin(saleOrder, saleOrderLine);
response.setValues(map);
}
use of com.axelor.apps.sale.service.saleorder.SaleOrderLineService in project axelor-open-suite by axelor.
the class SaleOrderServiceSupplychainImpl method createShippingCostLine.
@Override
public SaleOrderLine createShippingCostLine(SaleOrder saleOrder, Product shippingCostProduct) throws AxelorException {
SaleOrderLine shippingCostLine = new SaleOrderLine();
shippingCostLine.setSaleOrder(saleOrder);
shippingCostLine.setProduct(shippingCostProduct);
SaleOrderLineService saleOrderLineService = Beans.get(SaleOrderLineService.class);
saleOrderLineService.computeProductInformation(shippingCostLine, saleOrder);
saleOrderLineService.computeValues(saleOrder, shippingCostLine);
return shippingCostLine;
}
Aggregations