开发者

in freemarker while reading the data from the controller it is not displaying the exact value it is doing rounging why?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜