Subversion Repositories SmartDukaan

Rev

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

Rev 5948 Rev 5979
Line 98... Line 98...
98
			e.printStackTrace();
98
			e.printStackTrace();
99
		}
99
		}
100
		return null;
100
		return null;
101
	}
101
	}
102
	
102
	
103
	public static void reduceReservationCount(long itemId, long warehouseId, double quantity){
-
 
104
		GWT.log("Got a call to reduce the reservation count for item " + itemId + " and warehouse " + warehouseId);
-
 
105
		try{
-
 
106
			InventoryClient catalogServiceClient = new InventoryClient();
-
 
107
			InventoryService.Client catalogClient = catalogServiceClient.getClient();
-
 
108
			catalogClient.reduceReservationCount(itemId, warehouseId, quantity);
-
 
109
		}catch(Exception e){
-
 
110
			// TODO: Oops! We couldn't reduce the item reservation count. This will
-
 
111
			// result in underestimation of inventory stock. Should be corrected
-
 
112
			// periodically.
-
 
113
			e.printStackTrace();
-
 
114
		}
-
 
115
	}
-
 
116
	
-
 
117
	
-
 
118
	public static Map<Long, String> getWarehousesForBillingWarehouse(long warehouseId){
103
	public static Map<Long, String> getWarehousesForBillingWarehouse(long warehouseId){
119
		try{
104
		try{
120
		    InventoryClient catalogServiceClient = new InventoryClient();
105
		    InventoryClient catalogServiceClient = new InventoryClient();
121
			InventoryService.Client catalogClient = catalogServiceClient.getClient();
106
			InventoryService.Client catalogClient = catalogServiceClient.getClient();
122
			List<Warehouse> warehouses = catalogClient.getWarehouses(null, InventoryType.GOOD, 0, warehouseId, 0);
107
			List<Warehouse> warehouses = catalogClient.getWarehouses(null, InventoryType.GOOD, 0, warehouseId, 0);