@@ -44,6 +44,9 @@ public interface ISettlement {
pay = new BigDecimal("0.0");
total = new BigDecimal("1");
}
+ if (BigDecimal.ZERO.compareTo(total) == 0) {
+ return "0.00%";
+ }
return df().format(pay.divide(total, 6, RoundingMode.HALF_UP).multiply(new BigDecimal("100.0"))) + "%";