use of com.axelor.apps.stock.db.InventoryLine in project axelor-open-suite by axelor.
the class InventoryLineController method compute.
public void compute(ActionRequest request, ActionResponse response) {
InventoryLine inventoryLine = request.getContext().asType(InventoryLine.class);
Inventory inventory = request.getContext().getParent() != null ? request.getContext().getParent().asType(Inventory.class) : inventoryLine.getInventory();
inventoryLine = Beans.get(InventoryLineService.class).compute(inventoryLine, inventory);
response.setValue("unit", inventoryLine.getUnit());
response.setValue("gap", inventoryLine.getGap());
response.setValue("gapValue", inventoryLine.getGapValue());
response.setValue("realValue", inventoryLine.getRealValue());
}
use of com.axelor.apps.stock.db.InventoryLine in project axelor-open-suite by axelor.
the class InventoryLineController method updateInventoryLine.
public void updateInventoryLine(ActionRequest request, ActionResponse response) throws AxelorException {
InventoryLine inventoryLine = request.getContext().asType(InventoryLine.class);
Inventory inventory = request.getContext().getParent() != null ? request.getContext().getParent().asType(Inventory.class) : inventoryLine.getInventory();
inventoryLine = Beans.get(InventoryLineService.class).updateInventoryLine(inventoryLine, inventory);
response.setValue("rack", inventoryLine.getRack());
response.setValue("currentQty", inventoryLine.getCurrentQty());
}
Aggregations