@Override
public String coerceToUi(Annotation annotation, Label label,
BindContext bindContext) {
if (annotation instanceof PropertyExpensesAnnotation) {
PropertyExpensesAnnotation expensesAnnotation = (PropertyExpensesAnnotation) annotation;
if (expensesAnnotation.getAppliesVAT()) {
return NumberFomatter.formatMoney(expensesAnnotation
.getBaseImponibleYearly())
+ " ("
+ NumberFomatter.formatPercentage(expensesAnnotation
.getVat()) + "% IVA )";
} else {
if (expensesAnnotation.getCommunity()) {
return NumberFomatter.formatMoney(expensesAnnotation
.getBaseImponibleYearly())+" ( Comunidad )";
} else {
return NumberFomatter.formatMoney(expensesAnnotation
.getBaseImponibleYearly());
}
}
} else if (annotation instanceof PropertyIncomeAnnotation) {
PropertyIncomeAnnotation incomeAnnotation = (PropertyIncomeAnnotation) annotation;