It's nice to have you here in the Community, @Magy.
I can share some insights about correcting the average cost and zeroing out the credit memo in QuickBooks Desktop.
To correct or adjust the average cost, you can switch to FIFO (First In, First Out). Through this, QuickBooks computes inventory values based on the assumption that the first inventory items received are the first sold and will also automatically correct the Inventory Valuation reports.
Here are the steps in fixing the average cost:
Click the Edit menu and choose Preferences.
Go to Items & Inventory.
Choose the Company Preferences tab.
Click the Advanced Inventory Settings button.
Choose the FIFO tab.
Put a check mark on the Use FiFO box and enter the starting date. QuickBooks will automatically recalculate the values according to the date you've entered.
Click OK to save the changes.
For additional reference, you can check these articles:
On the other hand, you will have to apply the credit memo to an invoice or issue a refund (cash, check or credit card) to zero out the credit memo. For the detailed instruction, you can refer to this article: Record a credit memo or refund in QuickBooks Desktop.
That should get you on the right directions, @Magy.
Please know that I'm here anytime you have additional questions or concerns with QuickBooks. You can reach out by posting a response below.
I'd be glad to help share ways to cancel a credit memo in QuickBooks Desktop (QBDT).
To cancel the credit memo that was made by mistake, you can either void or delete the transaction. Voiding the transaction changes its amount to zero but keeps a record in QuickBooks. On the other hand, deleting the transaction removes entirely in QuickBooks.
To void/delete the credit memo:
Open the transaction created.
On the transaction's page, click on the drop-down arrow under the Delete icon.
Select either Delete or Void.
Click on Save and Close.
You can see attached screenshots for additional reference.