Subversion Repositories SmartDukaan

Rev

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

Rev 12133 Rev 14780
Line 137... Line 137...
137
    private String productName;
137
    private String productName;
138
    private String startDate;
138
    private String startDate;
139
    private String endDate;
139
    private String endDate;
140
    private String courierCostMarketplace;
140
    private String courierCostMarketplace;
141
    private String packagingCost;
141
    private String packagingCost;
-
 
142
    private String sdVoiItemCode;
-
 
143
    private String voiSellingPrice;
-
 
144
    private String isSuppressVoiPriceFeed;
-
 
145
    private String isVoiListedOnSnapdeal;
-
 
146
    private String minPosSpVoi;
-
 
147
    private String minPosTpVoi;
142
 
-
 
-
 
148
    private String transferPriceVOI;
-
 
149
    private String serviceTaxVOI;
-
 
150
    private String courierCostVoi;
-
 
151
    private String commissionVoi; 
143
 
152
    
144
    public String courierCostMarketplace() {
153
    public String courierCostMarketplace() {
145
        return courierCostMarketplace;
154
        return courierCostMarketplace;
146
    }
155
    }
147
 
156
 
148
    public void setCourierCostMarketplace(String courierCostMarketplace) {
157
    public void setCourierCostMarketplace(String courierCostMarketplace) {
Line 368... Line 377...
368
        Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
377
        Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
369
        SnapdealItemDetails sdItemDetails = CatalogClient.getSnapdealItemDetails(Long.valueOf(id));
378
        SnapdealItemDetails sdItemDetails = CatalogClient.getSnapdealItemDetails(Long.valueOf(id));
370
        lastUpdatedInventoryTimeStampForItem(sdItemDetails.getLastUpdatedInventoryTimestamp());
379
        lastUpdatedInventoryTimeStampForItem(sdItemDetails.getLastUpdatedInventoryTimestamp());
371
        return sdItemDetails;
380
        return sdItemDetails;
372
    }
381
    }
-
 
382
    
-
 
383
    public SnapdealItem fetchSdItem() throws NumberFormatException, TException {
-
 
384
        Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
-
 
385
        SnapdealItem sdItemDetails = CatalogClient.getSnapdealItem(Long.valueOf(id));
-
 
386
        return sdItemDetails;
-
 
387
    }
373
 
388
 
374
    public MarketplaceItems fetchMarketplaceDetail() throws NumberFormatException, TException {
389
    public MarketplaceItems fetchMarketplaceDetail() throws NumberFormatException, TException {
375
        Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
390
        Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
376
        MarketplaceItems mpItemDetails = CatalogClient.getMarketplacedetailsForItem(Long.valueOf(id), 7);
391
        MarketplaceItems mpItemDetails = CatalogClient.getMarketplacedetailsForItem(Long.valueOf(id), 7);
377
        lastCheckedTimeStampForItem(mpItemDetails.getLastCheckedTimestamp());
392
        lastCheckedTimeStampForItem(mpItemDetails.getLastCheckedTimestamp());
Line 403... Line 418...
403
        Client catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
418
        Client catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
404
        //Client catalogClientProd = new CatalogClient().getClient();
419
        //Client catalogClientProd = new CatalogClient().getClient();
405
        Long timestamp = System.currentTimeMillis();
420
        Long timestamp = System.currentTimeMillis();
406
        SnapdealItem snapdealItem = catalogClient.getSnapdealItem(Long.valueOf(itemId));
421
        SnapdealItem snapdealItem = catalogClient.getSnapdealItem(Long.valueOf(itemId));
407
        boolean toUpdate = false;
422
        boolean toUpdate = false;
-
 
423
        if (snapdealItem.getSellingPrice()!=Double.valueOf(sellingPrice) 
-
 
424
        		|| snapdealItem.isIsListedOnSnapdeal()!=Boolean.valueOf(isListedOnSnapdeal) 
408
        if (snapdealItem.getSellingPrice()!=Double.valueOf(sellingPrice) || snapdealItem.isIsListedOnSnapdeal()!=Boolean.valueOf(isListedOnSnapdeal) || snapdealItem.isSuppressPriceFeed()!=Boolean.valueOf(isSuppressPriceFeed)){
425
        		|| snapdealItem.isSuppressPriceFeed()!=Boolean.valueOf(isSuppressPriceFeed)){
409
            toUpdate=true;
426
            toUpdate=true;
410
        }
427
        }
-
 
428
        if(sdVoiItemCode!=null && sdVoiItemCode.trim().length()>0){
-
 
429
        	if(snapdealItem.isIsVoiListed()!=Boolean.valueOf(isVoiListedOnSnapdeal)
-
 
430
            		|| snapdealItem.isSuppressVoiPriceFeed()!=Boolean.valueOf(isSuppressVoiPriceFeed)
-
 
431
            		|| snapdealItem.getVoiSellingPrice()!=Double.valueOf(voiSellingPrice)){
-
 
432
        		toUpdate=true;
-
 
433
        	}
-
 
434
        }
411
        Item item = catalogClient.getItem(Long.valueOf(itemId));
435
        Item item = catalogClient.getItem(Long.valueOf(itemId));
412
        MarketplacePercentage mpCosting = catalogClient.getCostingForMarketplace(7, Long.valueOf(itemId));
436
        MarketplacePercentage mpCosting = catalogClient.getCostingForMarketplace(7, Long.valueOf(itemId));
413
        if (mpCosting.getSource()==0){
437
        if (mpCosting.getSource()==0){
414
            throw new CatalogServiceException();
438
            throw new CatalogServiceException();
415
        }
439
        }
Line 438... Line 462...
438
        snapdealItem.setServiceTax(Double.valueOf(serviceTax));
462
        snapdealItem.setServiceTax(Double.valueOf(serviceTax));
439
        snapdealItem.setMaxNlc(Double.valueOf(maxNlc));
463
        snapdealItem.setMaxNlc(Double.valueOf(maxNlc));
440
        snapdealItem.setSkuAtSnapdeal(sdItemCode);
464
        snapdealItem.setSkuAtSnapdeal(sdItemCode);
441
        snapdealItem.setSupc(supc);
465
        snapdealItem.setSupc(supc);
442
        snapdealItem.setCourierCostMarketplace(Double.valueOf(courierCostMarketplace));
466
        snapdealItem.setCourierCostMarketplace(Double.valueOf(courierCostMarketplace));
-
 
467
        if(sdVoiItemCode!=null && sdVoiItemCode.trim().length()>0){
-
 
468
        	snapdealItem.setVoiSkuAtSnapdeal(sdVoiItemCode.trim());
-
 
469
        	snapdealItem.setIsVoiListed(Boolean.valueOf(isVoiListedOnSnapdeal));
-
 
470
            snapdealItem.setVoiSellingPrice(Double.parseDouble(voiSellingPrice));
-
 
471
            snapdealItem.setSuppressVoiPriceFeed(Boolean.valueOf(isSuppressVoiPriceFeed));
-
 
472
            snapdealItem.setMinimumPossibleSpVoi(Double.parseDouble(minPosSpVoi));
-
 
473
        	snapdealItem.setMinimumPossibleTpVoi(Double.parseDouble(minPosTpVoi));
-
 
474
        	snapdealItem.setCourierCostVoi(Double.parseDouble(courierCostVoi));
-
 
475
        	snapdealItem.setCommissionVoi(Double.parseDouble(commissionVoi));
-
 
476
        	snapdealItem.setServiceTaxVoi(Double.parseDouble(serviceTaxVOI));
-
 
477
        	snapdealItem.setTransferPriceVoi(Double.parseDouble(transferPriceVOI));
-
 
478
        }
443
        MarketplaceItems t_mpItem = updateMarketplaceItemDetails(mpItem);
479
        MarketplaceItems t_mpItem = updateMarketplaceItemDetails(mpItem);
444
        //double vat = catalogClientProd.getVatPercentageForItem(Long.valueOf(itemId), warehouse.getStateId(), Double.valueOf(sellingPrice));
480
        //double vat = catalogClientProd.getVatPercentageForItem(Long.valueOf(itemId), warehouse.getStateId(), Double.valueOf(sellingPrice));
445
        //t_mpItem.setVat(vat);
481
        //t_mpItem.setVat(vat);
446
        t_mpItem.setCourierCostMarketplace(Double.valueOf(courierCostMarketplace));
482
        t_mpItem.setCourierCostMarketplace(Double.valueOf(courierCostMarketplace));
447
        snapdealItem.setUpdatedBy(getUserName());
483
        snapdealItem.setUpdatedBy(getUserName());
Line 463... Line 499...
463
            sendAlert(t_mpItem.getItemId(),t_mpItem.getCurrentSp(),t_mpItem.getMinimumPossibleSp());
499
            sendAlert(t_mpItem.getItemId(),t_mpItem.getCurrentSp(),t_mpItem.getMinimumPossibleSp());
464
        }
500
        }
465
        logger.info("\nUpdate Method Item Id "+itemId+"\nSelling Price "+sellingPrice+"\nWarehouse Id "+warehouseId+"\nMax Nlc "+maxNlc+"\nUpdated By: "+session.getAttribute(ReportsUtils.USER_NAME).toString());
501
        logger.info("\nUpdate Method Item Id "+itemId+"\nSelling Price "+sellingPrice+"\nWarehouse Id "+warehouseId+"\nMax Nlc "+maxNlc+"\nUpdated By: "+session.getAttribute(ReportsUtils.USER_NAME).toString());
466
        if(toUpdate && Boolean.valueOf(live) && (!snapdealItem.isSuppressPriceFeed()) && snapdealItem.isIsListedOnSnapdeal()){
502
        if(toUpdate && Boolean.valueOf(live) && (!snapdealItem.isSuppressPriceFeed()) && snapdealItem.isIsListedOnSnapdeal()){
467
            logger.info("Calling Method to update price at snapdeal");
503
            logger.info("Calling Method to update price at snapdeal");
468
            UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,timestamp);
504
            UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,timestamp,false);
-
 
505
            logger.info("Calling Thread to update price at snapdeal");
-
 
506
            updatePriceOnSnapdeal.start();	
-
 
507
        }
-
 
508
        if(toUpdate && Boolean.valueOf(live) && (!snapdealItem.isSuppressVoiPriceFeed()) && snapdealItem.isIsVoiListed()){
-
 
509
            logger.info("Calling Method to update price at snapdeal");
-
 
510
            UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(voiSellingPrice),supc,item,timestamp,true);
469
            logger.info("Calling Thread to update price at snapdeal");
511
            logger.info("Calling Thread to update price at snapdeal");
470
            updatePriceOnSnapdeal.start();	
512
            updatePriceOnSnapdeal.start();	
471
        }
513
        }
472
        return "snapdeal-update-result";
514
        return "snapdeal-update-result";
473
    }
515
    }
Line 475... Line 517...
475
 
517
 
476
    public void updateForAutoPricing() throws NumberFormatException, CatalogServiceException, TException{
518
    public void updateForAutoPricing() throws NumberFormatException, CatalogServiceException, TException{
477
        logger.info("Calling Method to update price at snapdeal for auto pricing");
519
        logger.info("Calling Method to update price at snapdeal for auto pricing");
478
        Client catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
520
        Client catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
479
        Item item = catalogClient.getItem(Long.valueOf(itemId));
521
        Item item = catalogClient.getItem(Long.valueOf(itemId));
480
        UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,System.currentTimeMillis());
522
        UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,System.currentTimeMillis(),false);
481
        logger.info("Calling Thread to update price at snapdeal for auto pricing");
523
        logger.info("Calling Thread to update price at snapdeal for auto pricing");
482
        updatePriceOnSnapdeal.start();	
524
        updatePriceOnSnapdeal.start();	
483
    }
525
    }
484
 
526
 
485
 
527
 
Line 549... Line 591...
549
            compare_result=false;
591
            compare_result=false;
550
        }
592
        }
551
        return compare_result;
593
        return compare_result;
552
 
594
 
553
    }
595
    }
-
 
596
    
-
 
597
    public boolean compareParametersVOI(MarketplaceItems mpItem,SnapdealItem snapdealItem, Warehouse warehouse,double weight, Long categoryId) throws TException, JSONException, CatalogServiceException{
-
 
598
    	double nlc =getNlcForWarehouse(snapdealItem.getWarehouseId(),snapdealItem.getItem_id());
-
 
599
    	double courierCostMp = getCourierCostVOI(weight);
-
 
600
        double vat = (snapdealItem.getVoiSellingPrice()/(1+(mpItem.getVat()/100))-(nlc/(1+(mpItem.getVat()/100))))*(mpItem.getVat()/100);
-
 
601
        double inHouseCost = mpItem.getPackagingCost()+vat+(mpItem.getReturnProvision()/100)*snapdealItem.getVoiSellingPrice()+mpItem.getOtherCost();
-
 
602
        double lowest_possible_tp = nlc+inHouseCost;
-
 
603
        double our_tp =  snapdealItem.getVoiSellingPrice()- snapdealItem.getVoiSellingPrice()*((mpItem.getCommission()/100)+mpItem.getEmiFee()/100)*(1+(mpItem.getServiceTax()/100))-(courierCostMp+mpItem.getClosingFee())*(1+(Double.parseDouble(serviceTaxVOI)/100))-(Math.max(20,(mpItem.getPgFee()/100)*snapdealItem.getVoiSellingPrice())*(1+(Double.parseDouble(serviceTaxVOI)/100)));
-
 
604
        double commission=0.0;
-
 
605
        if ((mpItem.getPgFee()/100)*snapdealItem.getVoiSellingPrice()>=20){
-
 
606
            commission =  (((mpItem.getCommission()/100)+mpItem.getPgFee()/100)*snapdealItem.getVoiSellingPrice());
-
 
607
        }
-
 
608
        else{
-
 
609
            commission =  ((mpItem.getCommission()/100)*snapdealItem.getVoiSellingPrice()+20);
-
 
610
        }
-
 
611
        double service_tax = (Double.parseDouble(serviceTaxVOI)/100)*(snapdealItem.getCommission()+courierCostMp);
-
 
612
        double lowest_possible_sp = 0.0;
-
 
613
        if ((mpItem.getPgFee()/100)*snapdealItem.getVoiSellingPrice()>=20){
-
 
614
            lowest_possible_sp = (nlc+(courierCostMp+mpItem.getClosingFee())*(1+(Double.parseDouble(serviceTaxVOI)/100))*(1+(mpItem.getVat()/100))+(mpItem.getPackagingCost()+mpItem.getOtherCost())*(1+(mpItem.getVat())/100))/(1-((mpItem.getCommission()/100)+mpItem.getEmiFee()/100+mpItem.getPgFee()/100)*(1+(Double.parseDouble(serviceTaxVOI)/100))*(1+(mpItem.getVat())/100)-(mpItem.getReturnProvision()/100)*(1+(mpItem.getVat())/100));
-
 
615
        }
-
 
616
        else{
-
 
617
            lowest_possible_sp = (nlc+(courierCostMp+mpItem.getClosingFee()+20)*(1+(Double.parseDouble(serviceTaxVOI)/100))*(1+(mpItem.getVat()/100))+(mpItem.getPackagingCost()+mpItem.getOtherCost())*(1+(mpItem.getVat())/100))/(1-((mpItem.getCommission()/100)+mpItem.getEmiFee()/100)*(1+(Double.parseDouble(serviceTaxVOI)/100))*(1+(mpItem.getVat())/100)-(mpItem.getReturnProvision()/100)*(1+(mpItem.getVat())/100));
-
 
618
        }
-
 
619
        double vat_rate_prod = getVatRateForItem(warehouse,snapdealItem.getVoiSellingPrice(),snapdealItem.getItem_id());
-
 
620
        JSONObject x = new JSONObject();
-
 
621
        x.put("NLC", nlc);
-
 
622
        x.put("VAT", vat);
-
 
623
        x.put("COURIER COST",getCourierCost(weight));
-
 
624
        x.put("LOWEST POS TP", lowest_possible_tp);
-
 
625
        x.put("TP", our_tp);
-
 
626
        x.put("COMMISSION", commission);
-
 
627
        x.put("SERVICE TAX", service_tax);
-
 
628
        x.put("LOWEST POS SP", lowest_possible_sp);
-
 
629
        x.put("VAT RATE",vat_rate_prod);
-
 
630
        logger.info("Snapdeal VOI Backend validation "+x.toString());
-
 
631
        boolean compare_result=true;
-
 
632
 
-
 
633
        if(!(mpItem.getPackagingCost()==computePackagingCost(categoryId))){
-
 
634
            compare_result=false;
-
 
635
        }
-
 
636
 
-
 
637
        if(!(vat_rate_prod==mpItem.getVat())){
-
 
638
            compare_result=false;
-
 
639
        }
-
 
640
 
-
 
641
        if(!(nlc==snapdealItem.getMaxNlc())){
-
 
642
            compare_result=false;
-
 
643
        }
-
 
644
        if(!(lowest_possible_tp-Double.parseDouble(minPosTpVoi)>-1 && lowest_possible_tp-Double.parseDouble(minPosTpVoi)<1)){
-
 
645
            compare_result=false;
-
 
646
        }
-
 
647
        if(!(our_tp-snapdealItem.getTransferPriceVoi()>-1 && our_tp-snapdealItem.getTransferPriceVoi()<1)){
-
 
648
            compare_result=false;
-
 
649
        }
-
 
650
        if(!(commission-snapdealItem.getCommission()>-1 && commission-snapdealItem.getCommission()<1)){
-
 
651
            compare_result=false;
-
 
652
        }
-
 
653
        if(!(service_tax-snapdealItem.getServiceTax()>-1 && service_tax-snapdealItem.getServiceTax()<1)){
-
 
654
            compare_result=false;
-
 
655
        }
-
 
656
        if(!(lowest_possible_sp-Double.parseDouble(minPosSpVoi)>-1 && lowest_possible_sp-Double.parseDouble(minPosSpVoi)<1)){
-
 
657
            compare_result=false;
-
 
658
        }
-
 
659
        return compare_result;
-
 
660
    }
554
 
661
 
555
    private double computePackagingCost(Long categoryId) {
662
    private double computePackagingCost(Long categoryId) {
556
        double pc = 15.0;
663
        double pc = 15.0;
557
        if (categoryId==10006 || categoryId==10010){
664
        if (categoryId==10006 || categoryId==10010){
558
            pc =pc + 43.0;
665
            pc =pc + 43.0;
Line 577... Line 684...
577
        for(int i=0;i<slabs;i++){
684
        for(int i=0;i<slabs;i++){
578
            cCost = cCost + 35;
685
            cCost = cCost + 35;
579
        }
686
        }
580
        return cCost;
687
        return cCost;
581
    }
688
    }
-
 
689
    
-
 
690
    public double getCourierCostVOI(double weight){
-
 
691
        double cCost = 40.0;
-
 
692
        int slabs = (int) ((weight+.05 - .001)/(.5));
-
 
693
        for(int i=0;i<slabs;i++){
-
 
694
            cCost = cCost + 30;
-
 
695
        }
-
 
696
        return cCost;
-
 
697
    }
582
 
698
 
583
    public void getLastNDaySaleForItem(String itemId,String days) {
699
    public void getLastNDaySaleForItem(String itemId,String days) {
584
        try{
700
        try{
585
            InventoryClient inventoryServiceClient = new InventoryClient();
701
            InventoryClient inventoryServiceClient = new InventoryClient();
586
            in.shop2020.model.v1.inventory.InventoryService.Client inventoryClient = inventoryServiceClient.getClient();
702
            in.shop2020.model.v1.inventory.InventoryService.Client inventoryClient = inventoryServiceClient.getClient();
Line 688... Line 804...
688
        snapdealItem.setMaxNlc(Double.valueOf(maxNlc));
804
        snapdealItem.setMaxNlc(Double.valueOf(maxNlc));
689
        snapdealItem.setSkuAtSnapdeal(sdItemCode);
805
        snapdealItem.setSkuAtSnapdeal(sdItemCode);
690
        snapdealItem.setSupc(supc);
806
        snapdealItem.setSupc(supc);
691
        snapdealItem.setUpdatedBy(getUserName());
807
        snapdealItem.setUpdatedBy(getUserName());
692
        snapdealItem.setCourierCostMarketplace(Double.valueOf(courierCostMarketplace));
808
        snapdealItem.setCourierCostMarketplace(Double.valueOf(courierCostMarketplace));
-
 
809
        if(sdVoiItemCode!=null && sdVoiItemCode.trim().length()>0){
-
 
810
        	snapdealItem.setIsVoiListed(Boolean.parseBoolean(isVoiListedOnSnapdeal));
-
 
811
        	snapdealItem.setSuppressVoiPriceFeed(Boolean.valueOf(isSuppressVoiPriceFeed));
-
 
812
        	snapdealItem.setVoiSkuAtSnapdeal(sdVoiItemCode.trim());
-
 
813
        	snapdealItem.setVoiSellingPrice(Double.parseDouble(voiSellingPrice));
-
 
814
        	snapdealItem.setMinimumPossibleSpVoi(Double.parseDouble(minPosSpVoi));
-
 
815
        	snapdealItem.setMinimumPossibleTpVoi(Double.parseDouble(minPosTpVoi));
-
 
816
        	snapdealItem.setCourierCostVoi(Double.parseDouble(courierCostVoi));
-
 
817
        	snapdealItem.setCommissionVoi(Double.parseDouble(commissionVoi));
-
 
818
        	snapdealItem.setServiceTaxVoi(Double.parseDouble(serviceTaxVOI));
-
 
819
        	snapdealItem.setTransferPriceVoi(Double.parseDouble(transferPriceVOI));
-
 
820
        }
693
 
821
 
694
        MarketplaceItems mpItem = new MarketplaceItems();
822
        MarketplaceItems mpItem = new MarketplaceItems();
695
        MarketplaceItems t_mpItem = updateMarketplaceItemDetails(mpItem);
823
        MarketplaceItems t_mpItem = updateMarketplaceItemDetails(mpItem);
696
        /*double vat = catalogClientProd.getVatPercentageForItem(Long.valueOf(itemId), warehouse.getStateId(), Double.valueOf(sellingPrice));
824
        /*double vat = catalogClientProd.getVatPercentageForItem(Long.valueOf(itemId), warehouse.getStateId(), Double.valueOf(sellingPrice));
697
		t_mpItem.setVat(vat);*/
825
		t_mpItem.setVat(vat);*/
Line 717... Line 845...
717
            throw new CatalogServiceException();
845
            throw new CatalogServiceException();
718
        }
846
        }
719
        if (t_mpItem.getCurrentSp()< t_mpItem.getMinimumPossibleSp()){
847
        if (t_mpItem.getCurrentSp()< t_mpItem.getMinimumPossibleSp()){
720
            sendAlert(t_mpItem.getItemId(),t_mpItem.getCurrentSp(),t_mpItem.getMinimumPossibleSp());
848
            sendAlert(t_mpItem.getItemId(),t_mpItem.getCurrentSp(),t_mpItem.getMinimumPossibleSp());
721
        }
849
        }
-
 
850
        
722
        if (Boolean.valueOf(live) && (!snapdealItem.isSuppressPriceFeed()) && snapdealItem.isIsListedOnSnapdeal()){
851
        if (Boolean.valueOf(live) && (!snapdealItem.isSuppressPriceFeed()) && snapdealItem.isIsListedOnSnapdeal()){
723
            logger.info("Calling Method to update new item price at snapdeal");
852
            logger.info("Calling Method to update new item price at snapdeal");
724
            UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,timestamp);
853
            UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,timestamp,false);
725
            logger.info("Calling Thread to update new item price at snapdeal");
854
            logger.info("Calling Thread to update new item price at snapdeal");
726
            updatePriceOnSnapdeal.start();
855
            updatePriceOnSnapdeal.start();
727
        }
856
        }
-
 
857
        
-
 
858
        if(Boolean.valueOf(live) && (!snapdealItem.isSuppressVoiPriceFeed()) && snapdealItem.isIsVoiListed()){
-
 
859
            logger.info("Calling Method to update price at snapdeal");
-
 
860
            UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(voiSellingPrice),supc,item,timestamp,true);
-
 
861
            logger.info("Calling Thread to update price at snapdeal");
-
 
862
            updatePriceOnSnapdeal.start();	
-
 
863
        }
-
 
864
        
728
        return "snapdeal-update-result";
865
        return "snapdeal-update-result";
729
    }
866
    }
730
 
867
 
731
 
868
 
732
    public String getAddNewItemForm(){
869
    public String getAddNewItemForm(){
Line 1610... Line 1747...
1610
 
1747
 
1611
    public void setPackagingCost(String packagingCost) {
1748
    public void setPackagingCost(String packagingCost) {
1612
        this.packagingCost = packagingCost;
1749
        this.packagingCost = packagingCost;
1613
    }
1750
    }
1614
 
1751
 
-
 
1752
	public String getSdVoiItemCode() {
-
 
1753
		return sdVoiItemCode;
-
 
1754
	}
-
 
1755
 
-
 
1756
	public void setSdVoiItemCode(String sdVoiItemCode) {
-
 
1757
		this.sdVoiItemCode = sdVoiItemCode;
-
 
1758
	}
-
 
1759
 
-
 
1760
	public String getVoiSellingPrice() {
-
 
1761
		return voiSellingPrice;
-
 
1762
	}
-
 
1763
 
-
 
1764
	public void setVoiSellingPrice(String voiSellingPrice) {
-
 
1765
		this.voiSellingPrice = voiSellingPrice;
-
 
1766
	}
-
 
1767
 
-
 
1768
	public String getIsSuppressVoiPriceFeed() {
-
 
1769
		return isSuppressVoiPriceFeed;
-
 
1770
	}
-
 
1771
 
-
 
1772
	public void setIsSuppressVoiPriceFeed(String isSuppressVoiPriceFeed) {
-
 
1773
		this.isSuppressVoiPriceFeed = isSuppressVoiPriceFeed;
-
 
1774
	}
-
 
1775
 
-
 
1776
	public String getIsVoiListedOnSnapdeal() {
-
 
1777
		return isVoiListedOnSnapdeal;
-
 
1778
	}
-
 
1779
 
-
 
1780
	public void setIsVoiListedOnSnapdeal(String isVoiListedOnSnapdeal) {
-
 
1781
		this.isVoiListedOnSnapdeal = isVoiListedOnSnapdeal;
-
 
1782
	}
-
 
1783
 
-
 
1784
	public String getMinPosSpVoi() {
-
 
1785
		return minPosSpVoi;
-
 
1786
	}
-
 
1787
 
-
 
1788
	public void setMinPosSpVoi(String minPosSpVoi) {
-
 
1789
		this.minPosSpVoi = minPosSpVoi;
-
 
1790
	}
-
 
1791
 
-
 
1792
	public String getMinPosTpVoi() {
-
 
1793
		return minPosTpVoi;
-
 
1794
	}
-
 
1795
 
-
 
1796
	public void setMinPosTpVoi(String minPosTpVoi) {
-
 
1797
		this.minPosTpVoi = minPosTpVoi;
-
 
1798
	}
-
 
1799
 
-
 
1800
	public String getTransferPriceVOI() {
-
 
1801
		return transferPriceVOI;
-
 
1802
	}
-
 
1803
 
-
 
1804
	public void setTransferPriceVOI(String transferPriceVOI) {
-
 
1805
		this.transferPriceVOI = transferPriceVOI;
-
 
1806
	}
-
 
1807
 
-
 
1808
	public String getServiceTaxVOI() {
-
 
1809
		return serviceTaxVOI;
-
 
1810
	}
-
 
1811
 
-
 
1812
	public void setServiceTaxVOI(String serviceTaxVOI) {
-
 
1813
		this.serviceTaxVOI = serviceTaxVOI;
-
 
1814
	}
-
 
1815
 
-
 
1816
	public String getCourierCostVoi() {
-
 
1817
		return courierCostVoi;
-
 
1818
	}
-
 
1819
 
-
 
1820
	public void setCourierCostVoi(String courierCostVoi) {
-
 
1821
		this.courierCostVoi = courierCostVoi;
-
 
1822
	}
-
 
1823
 
-
 
1824
	public String getCommissionVoi() {
-
 
1825
		return commissionVoi;
-
 
1826
	}
-
 
1827
 
-
 
1828
	public void setCommissionVoi(String commissionVoi) {
-
 
1829
		this.commissionVoi = commissionVoi;
-
 
1830
	}
-
 
1831
 
1615
}
1832
}