This looks over-complicated to me. Why not just do it all with php? Then you wouldn't need ajax.
You can convert a string to a number by:
1) removing any currency symbols
2) removing commas and using dot syntax for decimals
3) using parseFloat() on the resulting string