Subversion Repositories SmartDukaan

Rev

Rev 12815 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12815 Rev 23454
Line 293... Line 293...
293
	            	inventoryClient = new InventoryClient().getClient();
293
	            	inventoryClient = new InventoryClient().getClient();
294
	            	Cell warehouseCell = row.getCell(WAREHOUSE_ID_INDEX);
294
	            	Cell warehouseCell = row.getCell(WAREHOUSE_ID_INDEX);
295
	            	if(warehouseCell != null && warehouseCell.getCellType() != Cell.CELL_TYPE_BLANK) {
295
	            	if(warehouseCell != null && warehouseCell.getCellType() != Cell.CELL_TYPE_BLANK) {
296
	            		fulfillmentWarehouse = inventoryClient.getWarehouse(new Double(row.getCell(WAREHOUSE_ID_INDEX).getNumericCellValue()).longValue());
296
	            		fulfillmentWarehouse = inventoryClient.getWarehouse(new Double(row.getCell(WAREHOUSE_ID_INDEX).getNumericCellValue()).longValue());
297
	            	} else {
297
	            	} else {
298
	            		List<Long> itemAvailability = inventoryClient.getItemAvailabilityAtLocation(itemId, 1);
298
	            		List<Long> itemAvailability = inventoryClient.getItemAvailabilityAtLocation(itemId, 1, -1);
299
	            		fulfillmentWarehouse = inventoryClient.getWarehouse(itemAvailability.get(0));
299
	            		fulfillmentWarehouse = inventoryClient.getWarehouse(itemAvailability.get(0));
300
	            	}
300
	            	}
301
	            	t_order.setFulfilmentWarehouseId(fulfillmentWarehouse.getId());
301
	            	t_order.setFulfilmentWarehouseId(fulfillmentWarehouse.getId());
302
	            	
302
	            	
303
					long billingWarehouseId = 0;
303
					long billingWarehouseId = 0;