}
if(hasErrors()){
return INPUT;
}
TaxGroup taxGroup;
if(getTaxGroup().getId() == null || "".equalsIgnoreCase(getTaxGroup().getId())){
taxGroup = new TaxGroup();
logInfo = new LogInformation();
logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
} else {
taxGroup = (TaxGroup) manager.getById(TaxGroup.class, getTaxGroup().getId());
logInfo = taxGroup.getLogInformation();
}
logInfo.setActiveFlag(getActive());
logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
taxGroup.setLogInformation(logInfo);
taxGroup.setName(getTaxGroup().getName());
taxGroup.setDescription(getTaxGroup().getDescription());
taxGroup.setComment(getTaxGroup().getComment());
taxGroup.setSearchKey(getTaxGroup().getSearchKey());
manager.save(taxGroup);
setTaxGroup(taxGroup);
return SUCCESS;
}