public void updateCurDebt(Double amount, Date d) { curdebt = curdebt == null ? amount : curdebt - amount; if (RoundUtils.compare(curdebt, 0.0) > 0) { if (curdate == null) { // new date curdate = d; } } else if (RoundUtils.compare(curdebt, 0.0) == 0) { curdebt = 0.0; curdate = null; } else { // < 0 curdate = null; } }
private int roundFiscal(double value) { return (int) Math.floor(RoundUtils.round(value) * 10000.0 + 0.5); }
public String printMaxDebt() { return Formats.CURRENCY.formatValue(RoundUtils.getValue(getMaxdebt())); }