package ru.VirtaMarketAnalyzer.data;

import com.google.gson.annotations.SerializedName;

/**
 * Created by cobr123 on 06.07.2016.
 */
public final class ServiceSpecRetail {
    @SerializedName("lpr")
    final private double localPrice;
    @SerializedName("lq")
    final private double localQuality;
    @SerializedName("spr")
    final private double shopPrice;
    @SerializedName("sq")
    final private double shopQuality;

    public ServiceSpecRetail(final double localPrice, final double localQuality, final double shopPrice, final double shopQuality) {
        this.localPrice = localPrice;
        this.localQuality = localQuality;
        this.shopPrice = shopPrice;
        this.shopQuality = shopQuality;
    }

    public double getLocalPrice() {
        return localPrice;
    }

    public double getLocalQuality() {
        return localQuality;
    }

    public double getShopPrice() {
        return shopPrice;
    }

    public double getShopQuality() {
        return shopQuality;
    }
}

@@ -569,36 +569,105 @@
     
-this.localPrice = localPrice
+//round up to two decimal points%0A        this.localPrice = Math.round(localPrice * 100.0) / 100.0
 ;%0A  
@@ -692,16 +692,27 @@
 ality = 
+Math.round(
 localQua
@@ -711,24 +711,41 @@
 localQuality
+ * 100.0) / 100.0
 ;%0A        th
@@ -763,57 +763,113 @@
 e = 
-shopPrice;%0A        this.shopQuality = shopQuality
+Math.round(shopPrice * 100.0) / 100.0;%0A        this.shopQuality = Math.round(shopQuality * 100.0) / 100.0
 ;%0A  

round up to two decimal points