hello , you have to specify an account to which the discount is to be posted on the General Posting Setup page, under the business posting category that is used in the document ("Gen. Bus. Posting Group"):


Don't forget to help the community by Verifying the answer and Like it if your question has been answered. It will let others know that the topic has verified answer.
Thanks & Regards,
Gian