addParameter("documentIdNumber",
FenixStringTools.multipleLineRightPad(documentIdNumber, LINE_LENGTH - fithParagraphLength, END_CHAR));
}
final private void setAmounts(final Person person, final Integer civilYear) {
Money gratuityPayedAmount = person.getMaxDeductableAmountForLegalTaxes(EventType.GRATUITY, civilYear);
Money othersPayedAmount = calculateOthersPayedAmount(person, civilYear);
final StringBuilder eventTypes = new StringBuilder();
final StringBuilder payedAmounts = new StringBuilder();
if (!gratuityPayedAmount.isZero()) {
eventTypes.append("- ")
.append(BundleUtil.getString(Bundle.ENUMERATION, getLocale(), EventType.GRATUITY.getQualifiedName()))
.append(LINE_BREAK);
payedAmounts.append("*").append(gratuityPayedAmount.toPlainString()).append("Eur").append(LINE_BREAK);
}
if (!othersPayedAmount.isZero()) {
eventTypes.append(
BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.academicDocument.irs.declaration.eighthParagraph"))
.append(LINE_BREAK);
payedAmounts.append("*").append(othersPayedAmount.toPlainString()).append("Eur").append(LINE_BREAK);
}
addParameter("eventTypes", eventTypes.toString());
addParameter("payedAmounts", payedAmounts.toString());
Money totalPayedAmount = othersPayedAmount.add(gratuityPayedAmount);
addParameter("totalPayedAmount", "*" + totalPayedAmount.toString() + "Eur");
addParameter("total", BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.academicDocument.irs.declaration.total"));
}