Explanation:
The journal entry is as follows
On November 17
Cash A/c Dr $7,840
Sales Discount A/c Dr $160
To Accounts receivable $8,000
(Being cash received recorded)
The discount would be
= Accounts receivable × percentage given
= $8,000 × 2%
= $160
The remaining amount would be credited to the cash account.