Subversion Repositories SmartDukaan

Rev

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

Rev 13089 Rev 16490
Line 461... Line 461...
461
					}
461
					}
462
				}		
462
				}		
463
 
463
 
464
				WarehouseClient warehouseClient = new WarehouseClient();
464
				WarehouseClient warehouseClient = new WarehouseClient();
465
				Client client = warehouseClient.getClient();
465
				Client client = warehouseClient.getClient();
-
 
466
				InventoryService.Client inventoryClient = new InventoryClient().getClient();
466
				boolean checkDirectScanWarehouse = false;
467
				boolean checkDirectScanWarehouse = false;
467
	            
468
	            
468
	            if(thirdPartyWarehouse.getVendor().getId()==DUMMY_VENDOR_ID && thirdPartyWarehouse.getInventoryType()==InventoryType.GOOD && thirdPartyWarehouse.getWarehouseType()==WarehouseType.OURS_THIRDPARTY){
469
	            if(thirdPartyWarehouse.getVendor().getId()==DUMMY_VENDOR_ID && thirdPartyWarehouse.getInventoryType()==InventoryType.GOOD && thirdPartyWarehouse.getWarehouseType()==WarehouseType.OURS_THIRDPARTY){
469
	            	checkDirectScanWarehouse = true;
470
	            	checkDirectScanWarehouse = true;
470
	            }
471
	            }
-
 
472
	            
-
 
473
	            long currentWarehouseId = 0;
-
 
474
	            if(!checkDirectScanWarehouse){
-
 
475
	            	Warehouse fulfilmentWarehouse = inventoryClient.getWarehouses(WarehouseType.OURS, InventoryType.GOOD, po.getSupplierId(), po.getWarehouseId(), 0).get(0);
-
 
476
	            	currentWarehouseId = fulfilmentWarehouse.getId();
-
 
477
	            }
471
				
478
				
472
				for (LineItem lineItem : lineItems) {
479
				for (LineItem lineItem : lineItems) {
473
 
480
 
474
					InventoryItem inventoryItem = new InventoryItem();
481
					InventoryItem inventoryItem = new InventoryItem();
475
					inventoryItem.setItemId(lineItem.getItem_id());
482
					inventoryItem.setItemId(lineItem.getItem_id());
Line 481... Line 488...
481
	                if(checkDirectScanWarehouse){
488
	                if(checkDirectScanWarehouse){
482
	                	inventoryItem.setPhysicalWarehouseId(po.getWarehouseId());
489
	                	inventoryItem.setPhysicalWarehouseId(po.getWarehouseId());
483
	                	inventoryItem.setCurrentWarehouseId(po.getWarehouseId());
490
	                	inventoryItem.setCurrentWarehouseId(po.getWarehouseId());
484
	                }else{
491
	                }else{
485
	                	inventoryItem.setPhysicalWarehouseId(po.getWarehouseId());
492
	                	inventoryItem.setPhysicalWarehouseId(po.getWarehouseId());
-
 
493
	                	inventoryItem.setCurrentWarehouseId(currentWarehouseId);
486
	                }
494
	                }
487
					if(!client.isAlive()){
495
					if(!client.isAlive()){
488
						client = warehouseClient.getClient();
496
						client = warehouseClient.getClient();
489
					}
497
					}
490
					try{
498
					try{