Subversion Repositories SmartDukaan

Rev

Rev 5979 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5979 Rev 19225
Line 116... Line 116...
116
			// periodically.
116
			// periodically.
117
			e.printStackTrace();
117
			e.printStackTrace();
118
		}
118
		}
119
		return null;
119
		return null;
120
	}
120
	}
-
 
121
	
-
 
122
	public static Map<Long, Warehouse> getAllWarehousesForBillingWarehouse(long warehouseId){
-
 
123
		try{
-
 
124
		    InventoryClient catalogServiceClient = new InventoryClient();
-
 
125
			InventoryService.Client catalogClient = catalogServiceClient.getClient();
-
 
126
			List<Warehouse> warehouses = catalogClient.getWarehouses(null, InventoryType.GOOD, 0, warehouseId, 0);
-
 
127
			Map<Long, Warehouse> warehouseMap = new HashMap<Long, Warehouse>();
-
 
128
			for(Warehouse warehouse: warehouses){
-
 
129
				warehouseMap.put(warehouse.getId(), warehouse);
-
 
130
			}
-
 
131
			return warehouseMap;
-
 
132
		}catch(Exception e){
-
 
133
			// TODO: Oops! We couldn't reduce the item reservation count. This will
-
 
134
			// result in underestimation of inventory stock. Should be corrected
-
 
135
			// periodically.
-
 
136
			e.printStackTrace();
-
 
137
		}
-
 
138
		return null;
-
 
139
	}
121
 
140
 
122
    public static Warehouse getWarehouse(long warehouseId) {
141
    public static Warehouse getWarehouse(long warehouseId) {
123
        try{
142
        try{
124
            InventoryClient catalogServiceClient = new InventoryClient();
143
            InventoryClient catalogServiceClient = new InventoryClient();
125
            InventoryService.Client catalogClient = catalogServiceClient.getClient();
144
            InventoryService.Client catalogClient = catalogServiceClient.getClient();