Gosh, where to start.
How do you fund the materials? Through your books? - then you need to account for that, or Cash? - then you might get away with it. Of course you may loose the trade discount.
How do cost/fund/show you expenses?
Do the people offering cash want receipts - then of course you are unable to discount.
When do they offer cash - start or end of Job?
How do you record your time? I certainly kept/keep a work dairy, if only to show where and what I've been doing and how many days on each job. The accountant likes to see it as well (they had a trader who was caught out taking 'too many' cash only jobs) if only for all parties protection.
Don't forget it could be a trap, especially if you don't know the people you are doing the job for.
I'd never refuse cash but then I'd not give a discount to a new customer and it would always go through my books. Old customers with lots of repeat work may get a 'rounding down' discount to the nearest £25 or £50 depending on how big the final bill is, but then they know I'd be responsive when they had issues that needed a quick fix (less than half a day inc. travel) - which usually that, I regard, is the discount.