Subversion Repositories SmartDukaan

Rev

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

Rev 8661 Rev 8662
Line 165... Line 165...
165
            Warehouse fulfillmentWarehouse= null; 
165
            Warehouse fulfillmentWarehouse= null; 
166
            try {
166
            try {
167
            	inventoryClient = new InventoryClient().getClient();
167
            	inventoryClient = new InventoryClient().getClient();
168
            	List<Long> itemAvailability = inventoryClient.getItemAvailabilityAtLocation(order.getSKUCode(), 1);
168
            	List<Long> itemAvailability = inventoryClient.getItemAvailabilityAtLocation(order.getSKUCode(), 1);
169
            	fulfillmentWarehouse = inventoryClient.getWarehouse(itemAvailability.get(0));
169
            	fulfillmentWarehouse = inventoryClient.getWarehouse(itemAvailability.get(0));
-
 
170
            	logger.info("Fulfillment warehouse id for suborderid  " + order.getSuborderId() + " is " + fulfillmentWarehouse.getId());
170
            	t_order.setFulfilmentWarehouseId(fulfillmentWarehouse.getId());
171
            	t_order.setFulfilmentWarehouseId(fulfillmentWarehouse.getId());
-
 
172
            	logger.info("Billing warehouse id for suborderid  " + order.getSuborderId() + " is " + fulfillmentWarehouse.getBillingWarehouseId());
171
        		t_order.setWarehouse_id(fulfillmentWarehouse.getBillingWarehouseId());
173
        		t_order.setWarehouse_id(fulfillmentWarehouse.getBillingWarehouseId());
172
        		VendorItemPricing vendorItemPricing = inventoryClient.getItemPricing(lineItem.getItem_id(), fulfillmentWarehouse.getVendor().getId());
174
        		VendorItemPricing vendorItemPricing = inventoryClient.getItemPricing(lineItem.getItem_id(), fulfillmentWarehouse.getVendor().getId());
173
        		t_order.getLineitems().get(0).setTransfer_price(vendorItemPricing.getTransferPrice());
175
        		t_order.getLineitems().get(0).setTransfer_price(vendorItemPricing.getTransferPrice());
174
        		t_order.getLineitems().get(0).setNlc(vendorItemPricing.getNlc());
176
        		t_order.getLineitems().get(0).setNlc(vendorItemPricing.getNlc());
175
			} catch (InventoryServiceException e) {
177
			} catch (InventoryServiceException e) {
-
 
178
				logger.error("Error connecting inventory service for suborderid  " + order.getSuborderId());
176
            	continue;
179
            	continue;
177
			} catch (TTransportException e) {
180
			} catch (TTransportException e) {
178
				// TODO Auto-generated catch block
181
				// TODO Auto-generated catch block
179
				e.printStackTrace();
182
				e.printStackTrace();
180
			} catch (TException e) {
183
			} catch (TException e) {