}
private int checkAvailableQuantity(Item item, Warehouse warehouse, double quantity) {
List<ItemWarehouse> items=itemWarehouseManager.findItemWarehouse(item.getCode(), warehouse.getName());
if(!items.isEmpty()){
ItemWarehouse itemWarehouse=items.get(0);
double warehouseAllocatable=itemWarehouse.getAllocatableQuantity();
double requestedQuantity = quantity;
double diff = warehouseAllocatable- requestedQuantity ;
if(diff<0 && diff<= -requestedQuantity){
return 2;
}