Subversion Repositories SmartDukaan

Rev

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

Rev 10259 Rev 10278
Line 411... Line 411...
411
			logger.info("Calling Thread to update price at snapdeal");
411
			logger.info("Calling Thread to update price at snapdeal");
412
			updatePriceOnSnapdeal.start();	
412
			updatePriceOnSnapdeal.start();	
413
		}
413
		}
414
		return "snapdeal-update-result";
414
		return "snapdeal-update-result";
415
	}
415
	}
-
 
416
	
416
 
417
	
-
 
418
	public void updateForAutoPricing() throws NumberFormatException, CatalogServiceException, TException{
-
 
419
		logger.info("Calling Method to update price at snapdeal for auto pricing");
-
 
420
		Client catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
-
 
421
		Item item = catalogClient.getItem(Long.valueOf(itemId));
-
 
422
		UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,System.currentTimeMillis());
-
 
423
		logger.info("Calling Thread to update price at snapdeal for auto pricing");
-
 
424
		updatePriceOnSnapdeal.start();	
-
 
425
	}
417
 
426
 
418
	public boolean compareParameters(MarketplaceItems mpItem, SnapdealItem snapdealItem, Warehouse warehouse,double weight) throws TException, JSONException, CatalogServiceException{
427
	public boolean compareParameters(MarketplaceItems mpItem, SnapdealItem snapdealItem, Warehouse warehouse,double weight) throws TException, JSONException, CatalogServiceException{
419
		double nlc =getNlcForWarehouse(snapdealItem.getWarehouseId(),snapdealItem.getItem_id());
428
		double nlc =getNlcForWarehouse(snapdealItem.getWarehouseId(),snapdealItem.getItem_id());
420
		double vat = (snapdealItem.getSellingPrice()/(1+(mpItem.getVat()/100))-(nlc/(1+(mpItem.getVat()/100))))*(mpItem.getVat()/100);
429
		double vat = (snapdealItem.getSellingPrice()/(1+(mpItem.getVat()/100))-(nlc/(1+(mpItem.getVat()/100))))*(mpItem.getVat()/100);
421
		double inHouseCost = 15+vat+(mpItem.getReturnProvision()/100)*snapdealItem.getSellingPrice()+mpItem.getOtherCost();
430
		double inHouseCost = 15+vat+(mpItem.getReturnProvision()/100)*snapdealItem.getSellingPrice()+mpItem.getOtherCost();