To write off a bad debt, edit the invoice you want to write off and click More Options > Copy to Credit Note. The window will switch to a 'New Credit Note' type:
Enter the same details as for a credit note, with two exceptions:
In addition, if your business is registered for the Flat Rate Scheme for VAT, click More Options > VAT Treatment > VAT Treatment Details and remove the tick next to 'Flat Rate Scheme applies to this transaction'.
Click OK to save the credit note.
Now you need to allocate the credit to the outstanding invoices. Navigate to the Invoices list (menu Window > Invoices) and select the credit note you just created. Then click File > New > Allocate Selected Credit:
Tick the invoices you want to write off and click OK.
If you're registered for the Flat Rate Scheme for VAT and use the 'cash' method to calculate turnover:
The above process will affect both Box 1 and Box 4 of your VAT return. You should manually reduce both of these boxes by the 'flat rate' VAT amount. This adjustment will not affect the VAT amount due to HMRC (Box 5).