A bar and its owner have been fined £25,000 for serving a glass of caustic soda instead of beer to a customer.
David Caminal had to have his oesophagus removed after swallowing the drink at The New Conservatory in Leeds.
Leeds Magistrates Court heard the liquid served by a staff member looked like a pale ale but was in fact beer line cleaner.
Director Nick Bird admitted failing to protect the health and safety of customers and was sentenced earlier.
Prosecutors for Leeds City Council said Mr Caminal became ill after drinking at the Albion Place bar on 19 July 2014.
He suffered "exquisite pain" immediately after swallowing the liquid and was taken to hospital with severe internal injuries.
Mr Caminal, a TV producer from Spain, was placed in an induced coma and eventually had to have surgery to remove his gullet.
Peter Smith, mitigating, said Mr Bird, who owns TNC Cafe Bars and Music Ltd, was "devastated" by what happened.
The court heard Mr Caminal asked to taste a pale ale called "Sunbeam" and on swallowing it, began gasping and vomiting.
The bartender who served it did not know the line was being cleaned at the time, as the liquid which came out of the pump was a similar colour to the beer.
An investigation revealed a new member of staff had inadvertently turned the beer badge on the pump to face customers prior to the drink being served, not realising turning it the other way indicated it was unavailable.
Passing sentence, District Judge David Kitson said the line cleaning system at the bar was flawed.
"A system that relies on a beer badge not being inadvertently turned around the other way and staff being aware potentially exposes people to risk.
"This is not a case of saying, 'Oh well, if only we knew then what we know now', because the coming together of these events were, to an extent, waiting to happen."
The company and Mr Bird, 31, of Back York Street, Leeds, were also ordered to pay costs of almost £18,000.
Mr Smith said "serious lessons" had been learned from the incident.
Councillor Mark Dobson, executive member for environmental protection and community safety said: "What started out as a day off sightseeing in Leeds ended in tragedy for Mr Caminal.
"When taken on their own, the events that led to this incident seem minor but the knock-on effects had a catastrophic outcome."