@Override public String getListLabel() { double feeAmount = 0; DecimalFormat df = new DecimalFormat("#.##"); double feePaid = 0; double total = 0; for (int i = 0; i < feesActionDetails.size(); i++) { feeAmount += feesActionDetails.get(i).getFeeAmount(); feePaid += feesActionDetails.get(i).getFeeAmountPaid(); } if (paymentStatus == 1) { total = feePaid + miscFeePaid + principalPaid + interestPaid; } else total = (feeAmount - feePaid) + (miscFee - miscFeePaid) + (principal - principalPaid) + (interest - interestPaid); int daysLate = getDaysLate(); if (paymentDate != null && paymentStatus == 1) { return DateUtils.format(dueDate) + " " + DateUtils.format(paymentDate) + " " + daysLate + " " + Double.valueOf(df.format(round(total))); } else if (paymentDate != null && paymentStatus != 1) { return DateUtils.format(dueDate) + " Partially paid " + daysLate + " " + Double.valueOf(df.format(round(total))); } else return DateUtils.format(dueDate) + " Not paid yet " + daysLate + " " + Double.valueOf(df.format(round(total))); }
public String getDueDateFormated() { return DateUtils.format(dueDate); }