Subversion Repositories SmartDukaan

Rev

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

Rev 8696 Rev 8697
Line 155... Line 155...
155
				t_order.setExpected_shipping_time(shipDate.getTime());
155
				t_order.setExpected_shipping_time(shipDate.getTime());
156
				time.add(Calendar.DAY_OF_MONTH, 3);
156
				time.add(Calendar.DAY_OF_MONTH, 3);
157
				t_order.setPromised_delivery_time(time.getTimeInMillis());
157
				t_order.setPromised_delivery_time(time.getTimeInMillis());
158
				t_order.setExpected_delivery_time(time.getTimeInMillis());
158
				t_order.setExpected_delivery_time(time.getTimeInMillis());
159
				System.out.println("Dates set in transaction");
159
				System.out.println("Dates set in transaction");
160
			} catch(Exception e) {
160
			} catch(Exception e) {	
161
				logger.error("Error in updating Shipping or Delivery Time for suborderid  " + order.getSuborderId());
161
				logger.error("Error in updating Shipping or Delivery Time for suborderid  " + order.getSuborderId());
162
				continue;
162
				continue;
163
			}
163
			}
164
			InventoryService.Client inventoryClient = null;
164
			InventoryService.Client inventoryClient = null;
165
            Warehouse fulfillmentWarehouse= null; 
165
            Warehouse fulfillmentWarehouse= null; 
Line 168... Line 168...
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
            	logger.info("Fulfillment warehouse id for suborderid  " + order.getSuborderId() + " is " + fulfillmentWarehouse.getId());
171
            	t_order.setFulfilmentWarehouseId(fulfillmentWarehouse.getId());
171
            	t_order.setFulfilmentWarehouseId(fulfillmentWarehouse.getId());
172
            	logger.info("Billing warehouse id for suborderid  " + order.getSuborderId() + " is " + fulfillmentWarehouse.getBillingWarehouseId());
172
            	logger.info("Billing warehouse id for suborderid  " + order.getSuborderId() + " is " + fulfillmentWarehouse.getBillingWarehouseId());
173
            	t_order.setFulfilmentWarehouseId(fulfillmentWarehouse.getId());
-
 
174
        		t_order.setWarehouse_id(fulfillmentWarehouse.getBillingWarehouseId());
173
        		t_order.setWarehouse_id(fulfillmentWarehouse.getBillingWarehouseId());
175
        		VendorItemPricing vendorItemPricing = inventoryClient.getItemPricing(lineItem.getItem_id(), fulfillmentWarehouse.getVendor().getId());
174
        		VendorItemPricing vendorItemPricing = inventoryClient.getItemPricing(lineItem.getItem_id(), fulfillmentWarehouse.getVendor().getId());
176
        		t_order.getLineitems().get(0).setTransfer_price(vendorItemPricing.getTransferPrice());
175
        		t_order.getLineitems().get(0).setTransfer_price(vendorItemPricing.getTransferPrice());
177
        		t_order.getLineitems().get(0).setNlc(vendorItemPricing.getNlc());
176
        		t_order.getLineitems().get(0).setNlc(vendorItemPricing.getNlc());
178
			} catch (InventoryServiceException e) {
177
			} catch (InventoryServiceException e) {