Why are you using the discount field for the reason? There is something made for things like this.
This:
PHP Code:
uttstore_add_history($action['actionid'], $action['cost'], $reason, $action['tax'], $totalcost, $_REQUEST['userid'], $_FIELDS['points']);
Can become this:
PHP Code:
uttstore_add_history($action['actionid'], $action['cost'], $userdiscount, $action['tax'], $totalcost, $_REQUEST['userid'], $_FIELDS['points'], $reason);