discount logic update