fix error in calculating gross total due
Merge branch 'fix-early-reg-discount' into dev