I have a class ComRec which stores certain commission values. In the calculator I input some values and perform some operations then store it under particular user in firebase. Then I create a pdf table with the values from ComRec object. But my problem is the member "koil" shows the value null even if it is present in the ComRec object.
public class ComRec {
private Double freeRation;
private Double npnsRice;
private Double npsRice;
private Double phhRice;
private Double aayRice;
private Double npnsWheat;
private Double phhWheat;
private Double aayWheat;
private Double atta;
private Double total;
private Double koil;
private Double sugar;
private Double totalCommission;
public ComRec(){
}
public ComRec(Double freeRation, Double npnsRice, Double npsRice, Double phhRice, Double aayRice, Double npnsWheat, Double phhWheat, Double aayWheat, Double atta, Double total, Double koil, Double sugar , Double totalCommission) {
this.freeRation = freeRation;
this.npnsRice = npnsRice;
this.npsRice = npsRice;
this.phhRice = phhRice;
this.aayRice = aayRice;
this.npnsWheat = npnsWheat;
this.phhWheat = phhWheat;
this.aayWheat = aayWheat;
this.atta = atta;
this.total = total;
this.koil = koil;
this.sugar = sugar;
this.totalCommission = totalCommission;
}
User class
public class User {
private String UID;
private String ardNo;
private String email;
private String serialKey;
private String taluk;
private ComRec C;
public User(){
}
public User(String UID, String ardNo, String email, String serialKey,String taluk) {
this.UID = UID;
this.ardNo = ardNo;
this.email = email;
this.serialKey = serialKey;
this.taluk = taluk;
this.C = null;
}
public User(String UID, String ardNo, String email, String serialKey,String taluk,ComRec C) {
this.UID = UID;
this.ardNo = ardNo;
this.email = email;
this.serialKey = serialKey;
this.taluk = taluk;
this.C = C;
}
public String getUID() {
return UID;
}
public void setUID(String UID) {
this.UID = UID;
}
public String getArdNo() {
return ardNo;
}
public void setArdNo(String ardNo) {
this.ardNo = ardNo;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getSerialKey() {
return serialKey;
}
public void setSerialKey(String serialKey) {
this.serialKey = serialKey;
}
public String getTaluk() {
return taluk;
}
public void setTaluk(String taluk) {
this.taluk = taluk;
}
public ComRec getComRec() {
return C;
}
public void setComRec(ComRec c) {
C = c;
}
}
This is my firebase data, You can see koil = 172.5:
All the other members gives correct value but koil
This is how initialise ComRec object by taking it from User class