Take into account when the registration was completed when calculating discount
Merge branch 'fix-early-reg-discount' into dev