The receipt was owned by the restaurant and had confidential information identifying the customer. The restaurant may indeed be liable for this. The customer has made a claim that he never even wrote it, yet he was slandered using this receipt. Sounds like a good legal case to me. Let it move forward.
In my opinion the person who wrote it is the only one to be held responsible. As far as releasing confidential information on the receipt that identified the customer, I don’t think the restaurant said this proved that he wrote the slur. If they contended it did, they should be held liable.But releasing the information also gave the customer the opportunity to deny, with supporting evidence (the handwriting analysis), that he was not responsible for the slur.