Let’s do rounding without any lookup table/MDF – Useful for EC Time Off
Background: In EC Time Off one of the very common requirements is to round off the final result to nearest 0.5. Sample example given below
|Final Result||Rounded Result|
Solution: There is different ways to achieve the above result. One of the ways without any other lookup table/MDF is just multiply the Final Result with 2 & then round it up (Precision 0 & Threshold 0.01) & after that divide it by 2.
Sample Rule is below:
Explanation of the rule:
|Final Result (accrualRuleVariables.Amount)||Multiply by 2||Round()||Divide by 2 (Rounded Result/Amount Posted)|
So, it’s one the very useful but effective solution. I remember someone posted similar type of idea in the community portal long time back. Here I am adding the business rule snap shot with the explanation.
Be the first to leave a comment
You must be Logged on to comment or reply to a post.