this is my code:-fixed ,variable salary are store in data base like:14.40 and 300.70 while displaying these value in ui it display like fixed ,variable salary 14,301 it is doing round method. how to get exact value pzl any one.(em开发者_如何学GoployeeInfoForm)this is my obj contain all fields.
<tr>
<th >Fixed salary:</th>
<td>${(employeeInfoForm.fixedSalary)!'--'}</td>
<th >Variable Salary:</th>
<td>${(employeeInfoForm.variableSalary)!'--'}</td>
</tr>
Two things needed to keep in mind -
i) what are the types for employeeForm.fixedSalary
and employeeForm.variableSalary
? In other words, need to ensure that rounding does not happen before the value is fed in for replacement in template;
ii) check and see if number format is set in template, for e.g., <#setting number_format="0.##">
rounds to two decimal places
精彩评论