Subversion Repositories SmartDukaan

Rev

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

Rev 14862 Rev 14942
Line 613... Line 613...
613
    	double nlc =getNlcForWarehouse(snapdealItem.getWarehouseId(),snapdealItem.getItem_id());
613
    	double nlc =getNlcForWarehouse(snapdealItem.getWarehouseId(),snapdealItem.getItem_id());
614
    	double courierCostMp = snapdealItem.getCourierCostMarketplaceVoi();
614
    	double courierCostMp = snapdealItem.getCourierCostMarketplaceVoi();
615
        double vat = (snapdealItem.getVoiSellingPrice()/(1+(mpItem.getVat()/100))-(nlc/(1+(mpItem.getVat()/100))))*(mpItem.getVat()/100);
615
        double vat = (snapdealItem.getVoiSellingPrice()/(1+(mpItem.getVat()/100))-(nlc/(1+(mpItem.getVat()/100))))*(mpItem.getVat()/100);
616
        double inHouseCost = mpItem.getPackagingCost()+vat+(mpItem.getReturnProvision()/100)*snapdealItem.getVoiSellingPrice()+mpItem.getOtherCost();
616
        double inHouseCost = mpItem.getPackagingCost()+vat+(mpItem.getReturnProvision()/100)*snapdealItem.getVoiSellingPrice()+mpItem.getOtherCost();
617
        double lowest_possible_tp = nlc+inHouseCost;
617
        double lowest_possible_tp = nlc+inHouseCost;
618
        double our_tp =  snapdealItem.getVoiSellingPrice()- snapdealItem.getVoiSellingPrice()*((mpItem.getCommission()/100)+mpItem.getEmiFee()/100)*(1+(mpItem.getServiceTax()/100))-(courierCostMp+mpItem.getClosingFee())*(1+(mpItem.getServiceTax()/100))-(Math.max(20,(mpItem.getPgFee()/100)*snapdealItem.getVoiSellingPrice())*(1+(mpItem.getServiceTax()/100)));
618
        double our_tp =  snapdealItem.getVoiSellingPrice()- snapdealItem.getVoiSellingPrice()*((snapdealItem.getCommissionPercentageVoi()/100)+mpItem.getEmiFee()/100)*(1+(mpItem.getServiceTax()/100))-(courierCostMp+mpItem.getClosingFee())*(1+(mpItem.getServiceTax()/100))-(Math.max(20,(mpItem.getPgFee()/100)*snapdealItem.getVoiSellingPrice())*(1+(mpItem.getServiceTax()/100)));
619
        double commission=0.0;
619
        double commission=0.0;
620
        if ((mpItem.getPgFee()/100)*snapdealItem.getVoiSellingPrice()>=20){
620
        if ((mpItem.getPgFee()/100)*snapdealItem.getVoiSellingPrice()>=20){
621
            commission =  (((snapdealItem.getCommissionPercentageVoi()/100)+mpItem.getPgFee()/100)*snapdealItem.getVoiSellingPrice());
621
            commission =  (((snapdealItem.getCommissionPercentageVoi()/100)+mpItem.getPgFee()/100)*snapdealItem.getVoiSellingPrice());
622
        }
622
        }
623
        else{
623
        else{
Line 643... Line 643...
643
        x.put("LOWEST POS SP", lowest_possible_sp);
643
        x.put("LOWEST POS SP", lowest_possible_sp);
644
        x.put("VAT RATE",vat_rate_prod);
644
        x.put("VAT RATE",vat_rate_prod);
645
        logger.info("Snapdeal VOI Backend validation "+x.toString());
645
        logger.info("Snapdeal VOI Backend validation "+x.toString());
646
        boolean compare_result=true;
646
        boolean compare_result=true;
647
 
647
 
648
        if(!(mpItem.getPackagingCost()==computePackagingCost(categoryId))){
-
 
649
            compare_result=false;
-
 
650
        }
-
 
651
 
-
 
652
        if(!(vat_rate_prod==mpItem.getVat())){
648
        if(!(vat_rate_prod==mpItem.getVat())){
653
            compare_result=false;
649
            compare_result=false;
654
        }
650
        }
655
 
651
 
656
        if(!(nlc==snapdealItem.getMaxNlc())){
652
        if(!(nlc==snapdealItem.getMaxNlc())){