I really need some help trying to sort out some legacy code. We've got a MySQL server and an old VBScript front end doing some simple calculations. Briefly when calculation fees based on a commission percentage, if a certain percentage and fee is reached, then the fee is capped. Everything works until I get to fees in excess of £10000.00 and it goes wrong. I've got the following code. It all works except for the last line. Anything with a Commission of 15 returns 10000.00 and I can't figure this out.
dbLongWinAmount = FormatNumber(dbLongPPIWinAmount,2,,,0)
dbLongNetFee = (dbLongWinAmount * dbLongCommission)/100
dbLongNetFee = FormatNumber(dbLongNetFee,2,,,0)
If dbLongCommission = "30" AND dbLongNetFee >= "420.00" Then dbLongNetFee = "420.00"
If dbLongCommission = "28" AND dbLongNetFee >= "2500.00" Then dbLongNetFee = "2500.00"
If dbLongCommission = "25" AND dbLongNetFee >= "5000.00" Then dbLongNetFee = "5000.00"
If dbLongCommission = "20" AND dbLongNetFee >= "7500.00" Then dbLongNetFee = "7500.00"
If dbLongCommission = "15" AND dbLongNetFee >= "10000.00" Then dbLongNetFee = "10000.00"
Thanks for any help