gain from discounting note receivable