Incorrect invoice already declared to public treasury

Incorrect invoice already declared to public treasury

Hi,
I have a problem and I am not sure how to fix it. 

In the Q1 I have an invoice 00006 sended and not payed by my client, because this invoice is incorrect due to exists another invoice in Q2 related with the works and this has been payed. furthermore the invoice 00006 has been already declared to public treasury, so I need to make rectifying invoce in Q3 with negative value of 00006 because I need to recover the payed taxes. So, I know exists Credit Notes with this objective but I am not sure if it's the correct way, beacuse the clients owes me nothing, but I need a rectifying value to declare this negative import to public treasury and recover taxes.

Can you help me?