Calculation improvements for custom fields

@lubos Thank you for your constant support.

We have been using to convert text with abs and adds the value in total as late fee for payment after the due date. Above changes does not resolve our problem yet, we would appreciate if you can update for text to number conversion and adding a value in it.