rewrote js for revenue report in an object oriented manner