@masimo,
This is all too funny for words.
I thought I'd post a youtube video on double entry but after several hours of exhaustive research I couldn't find a suitable video and , whilst not exactly none-the -wiser , can't post a link.
The best accounting treatment is to throw the note from the charity away and let the auditor discover the discrepancy during the next stocktake.
Alternatively, I found out that accounting involves posting to what they call a general ledger which affects something called the balance sheet.
The $23 gift of product reduces assets by $23 and the right hand side of the balance sheet called liabilities and owner's equity by $23 , who'd have thought.
Apparently expenditure is recorded on the left of the general ledger as a debit so I'd debit $23 to donations/ advertising. This is where the double entry comes in (surprisingly) and $23 is credited (yes I'm confused too) to purchases (but then you didn't ask about the taxation treatment of charitable donations, the GAAP or mention whether the mysterious donor received some quid pro quo.
I hope this helps you, it certainly helped me.
WARNING: No accountants were present during the posting of this advice.