edit discount function
edit discount function