If I can drink in the office, I don't see any reason why this guy shouldn't be able to code in a bar.
But then ... maybe you work at a bar? You didn't describe your office.
Where I live you don't go to a bar to drink although you usually drink something when you're in a bar.
What do you go to a bar to do?