The entries for both of these are explained in my free lectures. The lectures are a complete free course for Paper FA and cover everything needed to be able to pass the exam well.
(Incidentally, we no longer refer to bad debts – they are irrecoverable debts. Also we no longer refer to ‘provision for bad debts’ – it is called ‘allowance for receivables’.