51 DocumentAmounts da =
new DocumentAmounts(document);
52 Iterator<AmountTaxable> iat = da.getTaxables().iterator();
53 Iterator<AmountRetained> iar = da.getRetentions().iterator();
54 boolean keepOn =
true, totalDone =
false;
55 boolean hasReq = da.hasReq();
56 String pattern = DecimalFormats.getStringFormat(da.getCurrency().getDefaultFractionDigits()),
60 AmountTaxable at = iat.next();
63 DecimalFormats.format(at.getTax(), patternPC) +
"% (" +
64 DecimalFormats.format(at.getReq(), patternPC) +
"%)"
67 addBoldValue(DecimalFormats.format(at.getTax(), patternPC) +
"%");
69 addValue(DecimalFormats.format(at.getAmount(), pattern));
70 addValue(DecimalFormats.format(at.getDiscount(), pattern));
71 addBoldValue(DecimalFormats.format(at.getTaxable(), pattern));
74 DecimalFormats.format(at.getTaxRealAmount(), pattern) +
"(" +
75 DecimalFormats.format(at.getReqAmount(), pattern) +
")"
78 addBoldValue(DecimalFormats.format(at.getTaxRealAmount(), pattern));
88 AmountRetained ar = iar.next();
89 addBoldValue(DecimalFormats.format(ar.getRetention(), patternPC) +
"%");
90 addValue(DecimalFormats.format(ar.getTaxable(), pattern));
91 addBoldValue(DecimalFormats.format(ar.getRetained(), pattern));
98 addBoldValue(DecimalFormats.format(da.getTotal(), pattern));
102 keepOn = iat.hasNext() || iar.hasNext();
GridLayout addValue(String value)
GridLayout addBoldValue(String value)