Additional Details and Edge Cases
Multi-Matter Invoices
A single invoice can cover work for multiple matters (e.g., one bill to a client spanning two cases). When this happens, financial metrics need to be split across the matters.
How amounts are allocated: The system examines the invoice composition (the specific line items — time entries, expenses, fixed fees — comprising the invoice) and calculates each matter's proportional share of the total.
Example: Invoice for $10,000. Matter A has $7,000 of line items, Matter B has $3,000.
Matter A gets 70% of collections and write-offs
Matter B gets 30%
Unassigned amounts (invoice-level items not tied to a specific matter, such as client-level credits) are distributed proportionally across all matters on the invoice based on their share of the total.
Corner case — Multiple responsible attorneys: Each invoice is associated with a single matter, and each matter has one responsible attorney. When an invoice covers multiple matters (a multi-matter invoice), amounts are allocated proportionally to each matter based on line-item composition, and then attributed to each matter's responsible attorney.
Multiple Payments on One Invoice
When an invoice is paid in installments:
Collection amount — Each payment is recorded individually. The total collected is the sum of the cash portions of all payments.
Days to Collect — Two calculation approaches are used depending on the view:
Maximum days (DaysToCollect in CollectedByMatter): Uses the latest payment date. This answers "how long until we received the last dollar."
Weighted average (DSO): Weights each payment's days-to-pay by the payment amount. This answers "what's the effective average collection time, accounting for how much was paid when."
Example: $10,000 invoice dated Jan 1. | Payment | Date | Amount | Days | |---------|------|--------|------| | 1 | Jan 15 | $8,000 | 15 | | 2 | Mar 1 | $2,000 | 60 |
Max days: 60
Weighted DSO: (15 × 8,000 + 60 × 2,000) / 10,000 = 24.0 days
Write-offs and Credits
Adjustment can be made to invoices to account for both discounts made to clients and to reflect bad debt.
Invoice-level adjustment: The invoice amount is reduced before or after sending. The original amount minus the adjusted amount is the write-off.
Example: Invoice created for $5,000, adjusted down to $4,500. Write-off = $500.
Payment-level credit: When recording a payment, a credit (write-off) can be applied alongside the cash amount.
Example: Accepting $4,000 cash with $500 write-off against a $4,500 invoice.
Both types are combined in collection metrics and the Bad Debt Ratio.
How credits are allocated to matters on multi-matter invoices: Write-offs (both invoice-level and payment-level) are distributed proportionally using the same matter-share percentages used for collections.
Attributing Collections to Originating Attorneys
LeanLaw has complex features for calculating origination fees for attorneys that are provided in the Compensation Reports (and settings). This section covers the "By Originating" reports that splits revenue in simpler ways.
When a matter has multiple originating attorneys, collection credit is split equally among them.
Example: Matter originated by Attorney A and Attorney B. Invoice for $10,000 is collected:
Attorney A receives credit for $5,000 collected
Attorney B receives credit for $5,000 collected
This equal-split approach applies to all financial metrics in the origination view: billed amounts, collected amounts, and write-offs.
Note: Originating attorney credit is separate from responsible attorney attribution. One attorney can be both the originator and the responsible attorney, or they can be different people. The Collections dashboard groups by responsible attorney; origination credit is available through the underlying data model for compensation planning.
Invoices with Both Cash Payments and Write-offs
When a payment combines a cash amount and a credit (write-off), the system separates them:
Collected Amount = Cash portion of the payment only
Credit Amount = Write-off portion of the payment only
The formula used to split a combined payment:
Cash portion: PaymentAmount × (InvoicePayment.Amount / TotalPayment)
Credit portion: PaymentCredit × (InvoicePayment.Amount / TotalPayment)
This ensures that when a payment is applied across multiple invoices, each invoice gets the correct proportion of cash and credit.
Time Period Filtering
All dashboards support a time period filter (defaulting to "Previous quarter").
How the filter applies:
Billables: Filters by the date the work was performed.
Invoices / Billing metrics: Filters by invoice date.
Collections / Payments: Filters by payment date for trend charts; by invoice date for collection rate calculations. This means "collection rate for Q4" shows how well Q4's invoices have been collected, not how much cash came in during Q4.
A/R Aging: Always shows the current snapshot regardless of the time period filter.
