I had a comment previously that looks like got hidden in some diff, saying that it this calculation of the effective discount is not very obvious. I think it might be a good idea to extract it into a DiscountCalculator class or something like that that does this logic over a series of schedule rules, and possibly even pulls in `ScheduleRule#percent_overlap`