/**
* @throws Exception
*
*/
public TaxViewBean buildViewBeanTax(final RequestData requestData, final Tax tax) throws Exception {
final TaxViewBean taxViewBean = new TaxViewBean();
taxViewBean.setId(tax.getId());
taxViewBean.setVersion(tax.getVersion());
taxViewBean.setCode(tax.getCode());
taxViewBean.setName(tax.getName());
taxViewBean.setDescription(tax.getDescription());
taxViewBean.setPercent("" + tax.getPercent());
DateFormat dateFormat = requestUtil.getFormatDate(requestData, DateFormat.MEDIUM, DateFormat.MEDIUM);
if (tax.getDateCreate() != null) {
taxViewBean.setDateCreate(dateFormat.format(tax.getDateCreate()));
}
if (tax.getDateUpdate() != null) {
taxViewBean.setDateUpdate(dateFormat.format(tax.getDateUpdate()));
}
return taxViewBean;
}