function to determine discount status.