Deciding who pays the bill can be tricky and it can vary depending on the situation, but there are some general rules you can follow to make it easier. If you're the boss and you've invited your subordinates for lunch, you should pay. Those in a senior position should always offer to pay at a formal lunch. If you're with a colleague and they paid the last time, you should pay. You should also offer to pay if you can't remember who paid the last time. Treating someone is also a nice gesture to thank them for a favour.
However, if someone wants to celebrate a promotion or other occasion or to treat you as a gesture of thanks, graciously let them pay. If you're with a colleague and you paid the last time, let them pay. If you're with anyone who's of a more senior level than you, you should also be comfortable letting them pay if they offer.
Often a client will offer to pay if they've invited you to a lunch to discuss their business. While it's fine to let them, offering to pay can make a good impression on them. If there's any disagreement over the bill, whoever you're with, simply splitting it can be a good compromise. When you intend to pay, let your companions know ahead of time so that there's no confusion at the end of the meal. And when you're the recipient of a treat, remember to thank your host. If it's a client or a boss and the meal is quite formal, consider sending a thank-you note.
There are a few things you should never do when discussing paying the check. If you're picking it up, don't complain about how expensive everything is. Don't insist too strongly on paying when someone else has clearly indicated they want to do it. This will be seen as overbearing and trying to dominate. Remember to be gracious whether you're paying or not.
When you should pay
When you should let someone else pay
Making a good impression
Faux pas to avoid