When accounting firms and other professional services firms submit their monthly bills, there’s often some sticker shock experienced by clients. Billable hours can add up fast, and unfortunately in some cases there is overbilling of clients either due to procedural error or malfeasance.

The penalties for overbilling are severe. For example, Barclays recently settled with the Securities and Exchange Commission on its claims that the bank billed clients for services it never performed. The company was required to pay back the fees received and incurred a $30 million penalty. In some situations, including a fraud and overbilling case involving a Los Angeles-based investment firm, there are also criminal charges levied against the company. What’s less known, however, are the number of over-billings that occur simply because the professional services firm or agency does not follow sound billing and project management practices.

Upper management at accounting, architecture, law and other professional services firms should take note of the penalties for overbilling, which can result in not only monetary loss but also destruction of the brand identity. To avoid such problems, here are five cardinal rules for ethical billing that can help companies to avoid lawsuits and million-dollar settlements:

1. Move past Excel. Many professional services firms still use Excel spreadsheets to record billable time. Each staff member enters time onto the master sheet (or even worse, submits their own version), which is then manually added to the invoicing system. Generating final invoices can take an entire day, and the process is inherently unreliable. Firms should implement time tracking and project management solutions that automate time with invoicing and provide a unified format for staff and administrators.

2. Tie project management to time tracking. It sounds rudimentary, but many firms do not have systems that link together what needs to be done with time billing. Accountants and management might not be on the same page regarding which projects are a current priority, so they engage in manual task delegation. With a technology solution that allows managers to allocate resources to tasks, staff is no longer wondering what they should be working on. The system keeps them informed as to what work needs to be done and when it should be completed. Dynamic control can prevent intentional or unintentional over-billing because the hours are marked directly to tasks. Managers are then empowered to track real-time costs against the budget and confirm they align with the work performed.

3. Set expectations early. Professional services firms that want to avoid conflict—including overbilling—should detail fee agreements early in the professional relationship. Otherwise, there might be situations where a professional works several hours for a client without pre-approval on those hours. Since those hours were denied, the professional might decide to act unscrupulously by overbilling for those “lost” hours by putting them under a different project or a different billing cycle.

Clients like to know about charges beforehand, so they can manage internal budgets and will already have buy-in to the charges. Transparency and communication are essential for developing a trusting professional-client relationship.

4. Add notes to detailed time keeping. Firms that do not provide details on their invoices risk disputes with their clients about overbilling. Use billing software that allows time to be broken down into increments with detailed notes attached. Such tools are also useful for managing internal notes that aren’t meant for the client.

Staff should also record their time frequently so they do not miss important tasks and then feel the need to “pad” their hours in order to meet their weekly or monthly requirements. A cloud-based solution is essential so staff can record hours even when they are not in the office. And the solution should feature automated reminders to keep everyone on track.

5. Do not double bill. There’s a classic example that’s worth remembering in which a lawyer is flying four hours on the behest of Client X, but during the flight works solely on a case for Client Y. The lawyer should not bill a total of eight hours during this time, as they’re literally one person, not two. Train staff to avoid such double billing scenarios by using solutions that are tied directly to project management, which can also improve focus and prevent unproductive multitasking.

The stakes are exceedingly high for professional services firms to follow ethical billing practices. Consider what happened with Barclays, a massive and sophisticated firm that had gaps in its processes which resulted in considerable fines.

Accurate and ethical billing is not only the morally correct choice, but it also preserves the integrity of the company and helps avoid million-dollar payouts. The solution is simple if you use a platform that streamlines and automates the process of tracking time and can dynamically tie time to projects.