I have a modified oscommerce store with the points and rewards system included.
Currently, when the customer gets to the checkout_payment page, they may select to use the complete balance of the points to pay for their order. I have installed some old code that permits the customer to pay for the order using all their points or as an alternative to enter the amount of points that they may use. I need this code to be changed so that if the customers selects to enter the number of points to be used, they cannot select a number of points greater than the balance of points that they have available.
Currently the code has an error as the customer can enter an amount of points that is greater than what they have available.