You have 2 transactions. One is purely legal fees defending you, the other is a refund of gross income. If roof was, for example $20k enter a customer credit memo for $10k and then select tools to refund the c.m. by check.
And separately your $10k fees to attorney for professional fees:legal expenses.
If you were slapped with any fines (and possibly the non recoverable court costs) these are NOT deductible