Hi there 33622mz,
Using QuickBooks Online for your business is an awesome way to save time and effort with your bookkeeping. I know how important it is to be able to adjust data-entry as needed. I'll help explain a few next steps for you.
In terms of whether or not you should credit the accounts receivable and record this as a donation, that's something you'll have to ask your accountant. Your accountant is the best equipped person to help you make these types of accounting decisions in order for your books to reflect the appropriate information. If you're not yet connected with an accountant, you can find one in your area here: Find a ProAdvisor.
If your accountant has advised that you to record this as a donation, keep in mind that QBO isn't designed for non-profit accounting. Your accountant should be able to provide another solution for how this should be recorded, whether by voiding or deleting the invoice entirely, or perhaps via a journal entry.
If you decide to void/delete the invoice, that can be done by clicking the small triangle drop-down menu next to the invoice in the invoice list, then select Void/Delete.
If you're still in need of assistance after consulting an accountant, our tech support team is here to help.
Have a great day.