There is a field in which the amount is entered, various calculations are applied to Germans (for example, take a percentage of the amount and divide by 2) to calculate the commission Calculations in javascript, the formula is described in the DB field
How to make something universal?
For example, enter 100 - the value (100/10) * 4 + 810 =?, For another, for example, simply - / 2 or something else. To get the division fields, percentages, additions and everything to handle is too rough. The field has its own problems. There are more intervals, entered 100 - at output 10, entered from 101 to 1000 - 20. Here, okay, you can describe
How to deal with formulas I can not find the best option. That it was possible to submit and calculate javascript? Maybe there is something like regular expressions, but in terms of formulas, not data validation