> ## Documentation Index
> Fetch the complete documentation index at: https://docs.divorce.law/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing & Time Tracking

> Complete billing system with AI-powered time entry, expense tracking, invoicing, and client portal payment integration

## Overview

Victoria's **Billing System** brings Clio-level billing capabilities to divorce law firms with AI-powered automation. Track time effortlessly, manage expenses, generate professional invoices, and get paid faster with integrated client portal payments.

<Note>
  Every time entry, expense, and invoice is protected by Row Level Security (RLS). Only authorized firm members can access billing data.
</Note>

***

## Time Entry System

### AI-Powered Time Logging

Victoria automatically suggests time entries after completing billable work, eliminating the end-of-day scramble to remember what you did.

**How It Works:**

1. **Victoria completes a task** (document review, research, drafting)
2. **Prompt appears immediately** with suggested time entry
3. **Review and edit** hours, description, or rate if needed
4. **One-click logging** to billing system

**Smart Detection:**

* Automatically triggered for Victoria conversations over 800 tokens
* Calculates reasonable time based on task complexity
* Generates professional descriptions suitable for client bills
* Pre-fills hourly rate from your firm settings

<AccordionGroup>
  <Accordion title="Activity Types" icon="list-check">
    Victoria categorizes time entries into standard legal billing activities:

    * **Legal Research** - Case law, statutes, legal analysis
    * **Document Drafting** - Pleadings, motions, agreements
    * **Document Review** - Discovery, financial docs, evidence
    * **Case Analysis** - Strategy, case evaluation
    * **Discovery Review** - Interrogatories, RFPs, depositions
    * **Client Communication** - Emails, calls, meetings
    * **Court Appearance** - Hearings, trials, conferences
    * **Case Planning** - Task generation, deadline management
    * **Other** - Administrative, research calls, etc.
  </Accordion>

  <Accordion title="Time Entry Details" icon="clock">
    Each time entry captures:

    * **Date** - Defaults to today, adjustable
    * **Hours** - Decimal format (e.g., 0.25 = 15 min, 0.5 = 30 min)
    * **Billable Hours** - Usually matches total hours unless marked non-billable
    * **Hourly Rate** - From firm settings or attorney-specific rate
    * **Description** - AI-generated professional billing narrative
    * **Activity Type** - Categorization for reporting
    * **Billable Flag** - Mark as non-billable for internal work
    * **Billing Status** - Unbilled, billed (invoiced), paid
  </Accordion>

  <Accordion title="Manual Time Entry" icon="pen">
    Add time entries manually for work outside Victoria:

    * Client phone calls
    * Court appearances
    * In-person meetings
    * Email correspondence
    * Administrative tasks
    * Travel time

    **Access:** Case Workspace → Billing Tab → "Add Time Entry"

    Manual entries support the same fields as AI-generated ones, with full control over description and categorization.
  </Accordion>

  <Accordion title="Editing & Deleting" icon="edit">
    **Before Invoicing:**

    * Edit any field (hours, description, rate, activity type)
    * Delete entries added by mistake
    * Mark as non-billable if work was internal

    **After Invoicing:**

    * Cannot edit or delete (maintains audit trail)
    * To adjust: create credit memo or modify invoice
    * View which invoice billed the time entry
  </Accordion>
</AccordionGroup>

***

## Expense Tracking

### Billable Expenses

Track case-related expenses and pass costs through to clients with automatic billability tracking.

**Common Expense Categories:**

<CardGroup cols={2}>
  <Card title="Filing Fees" icon="landmark">
    Court filing fees, service of process, certified copies
  </Card>

  <Card title="Expert Witnesses" icon="user-tie">
    Expert witness fees, consultant costs, evaluations
  </Card>

  <Card title="Document Production" icon="print">
    Copying, printing, scanning, document preparation
  </Card>

  <Card title="Travel" icon="plane">
    Mileage, parking, tolls, airfare, hotels
  </Card>

  <Card title="Investigation" icon="search">
    Private investigator fees, background checks
  </Card>

  <Card title="Technology" icon="laptop">
    Legal research (Westlaw, Lexis), specialized software
  </Card>

  <Card title="Communication" icon="phone">
    Long distance calls, courier services, postage
  </Card>

  <Card title="Other" icon="receipt">
    Notary fees, transcription, translation services
  </Card>
</CardGroup>

### Expense Entry Features

<AccordionGroup>
  <Accordion title="Receipt Management" icon="file-image">
    **Upload Receipts:**

    * Drag-and-drop receipt images or PDFs
    * Stored securely in LexVault with RLS protection
    * Accessible when creating invoices
    * Audit trail for bar ethics compliance

    **Supported Formats:** JPG, PNG, PDF, HEIC
    **Max File Size:** 10 MB per receipt
  </Accordion>

  <Accordion title="Reimbursement Tracking" icon="dollar-sign">
    Track which expenses have been reimbursed by clients:

    * **Unreimbursed** - Expense paid by firm, awaiting client payment
    * **Billed** - Included on client invoice, payment pending
    * **Reimbursed** - Client paid, expense recovered

    View reimbursement status in expense list and reports.
  </Accordion>

  <Accordion title="Billable vs. Non-Billable" icon="toggle-on">
    Mark expenses as:

    * **Billable** - Pass through to client (default)
    * **Non-Billable** - Firm absorbs cost (e.g., office supplies)

    Non-billable expenses still tracked for internal accounting but excluded from client invoices.
  </Accordion>
</AccordionGroup>

***

## Invoice Generation

### Creating Invoices

Generate professional invoices in seconds with automatic line item population from unbilled time and expenses.

**Invoice Creation Flow:**

1. **Select Client & Case**
   * Choose from active cases
   * Client info auto-populated from case

2. **Add Line Items**
   * **Automatic:** Pull unbilled time entries and expenses
   * **Manual:** Add flat fees, retainers, or custom charges
   * **AI Services:** Auto-calculated if Victoria was used on case

3. **Set Terms**
   * Invoice date (defaults to today)
   * Due date (defaults to Net 30)
   * Payment terms and notes

4. **Client Portal Options**
   * Enable client portal access (recommended)
   * Send email notification immediately
   * Allow online payment via Stripe (LawPay coming soon)

5. **Generate & Send**
   * Creates invoice with unique number
   * Generates secure client portal link
   * Sends email with payment link (optional)

### Invoice Statuses

<AccordionGroup>
  <Accordion title="Draft" icon="file-pen" defaultOpen={false}>
    **Meaning:** Invoice created but not sent to client

    **What You Can Do:**

    * Edit line items, amounts, dates
    * Add or remove charges
    * Delete invoice entirely
    * Generate preview PDF

    **Client Cannot:** View or pay (not accessible in portal yet)
  </Accordion>

  <Accordion title="Sent" icon="paper-plane" defaultOpen={false}>
    **Meaning:** Invoice sent to client via email or portal

    **Tracking:**

    * Sent timestamp recorded
    * Payment due date active
    * Overdue notifications begin after due date

    **Client Can:** View invoice, leave comments, make payment

    **You Can:** View who opened it, when, track payment status
  </Accordion>

  <Accordion title="Viewed" icon="eye" defaultOpen={false}>
    **Meaning:** Client opened invoice in portal

    **Visibility:**

    * Viewed timestamp recorded
    * Know client is aware of invoice
    * Useful for follow-up timing

    **Next Steps:** Wait for payment or send gentle reminder
  </Accordion>

  <Accordion title="Partial Payment" icon="coin" defaultOpen={false}>
    **Meaning:** Client made partial payment, balance remains

    **Details:**

    * Shows amount paid and remaining balance
    * Payment history visible in invoice detail
    * Can send reminder for remaining balance

    **Status Updates:** Changes to "Paid" when full amount received
  </Accordion>

  <Accordion title="Paid" icon="check-circle" defaultOpen={false}>
    **Meaning:** Invoice paid in full

    **Finalization:**

    * Paid timestamp recorded
    * Payment method captured
    * Receipt generated for client
    * All line items marked as "billed" and "paid"

    **Accounting:** Automatically updates accounts receivable
  </Accordion>

  <Accordion title="Overdue" icon="alert-triangle" defaultOpen={false}>
    **Meaning:** Past due date, payment not received

    **Automatic Detection:**

    * System checks daily after due date
    * Status changes from "Sent" to "Overdue"
    * Shows days overdue count

    **Actions Available:**

    * Send automated reminder email
    * Update due date if extension granted
    * Apply late fees (if firm policy)
    * Suspend services per engagement letter
  </Accordion>

  <Accordion title="Cancelled / Void" icon="x-circle" defaultOpen={false}>
    **Meaning:** Invoice cancelled before or after sending

    **Use Cases:**

    * Billing error discovered
    * Case settled before payment
    * Client disputed charges
    * Need to recreate invoice

    **Effect:** Unbills all time entries and expenses, making them available for new invoice
  </Accordion>
</AccordionGroup>

### Line Item Types

<AccordionGroup>
  <Accordion title="Time Entries" icon="clock" defaultOpen={false}>
    **Source:** Time entries logged by attorneys and staff

    **Display Format:**

    ```
    11/09/2024 - Legal Research (2.5 hrs @ $350/hr)
    Review case law on child support modification standards in California.
    Analyzed In re Marriage of Smith (2023) and prepared memo for file.
    ```

    **Calculation:** Hours × Hourly Rate = Line Item Amount

    **Grouping Options:**

    * One line per time entry (detailed)
    * Group by date (moderate detail)
    * Group by activity type (summary)
  </Accordion>

  <Accordion title="Expenses" icon="receipt" defaultOpen={false}>
    **Source:** Expense entries with receipts

    **Display Format:**

    ```
    11/05/2024 - Filing Fee
    Superior Court filing fee for Response to Petition
    $435.00
    ```

    **Markup Options:**

    * Pass through at cost (default)
    * Add percentage markup (if permitted by bar)
    * Administrative fee for processing

    **Receipt Attachment:** Viewable in client portal
  </Accordion>

  <Accordion title="AI Services" icon="brain" defaultOpen={false}>
    **Source:** Victoria AI usage logs (automatic)

    **What It Tracks:**

    * Document analysis operations
    * Legal research queries
    * Form generation
    * Financial calculations
    * Discovery assistance

    **Ethical Billing:**

    * Per ABA Opinion 93-379 (AI cost recovery)
    * Transparent breakdown by AI agent
    * Shows operation count and cost
    * Client can see which Victoria features were used

    **Example:**

    ```
    AI Services - 47 operations

    • Co-Counsel Agent: 12 operations ($8.40)
    • Discovery Manager: 8 operations ($12.60)
    • Financial Analyst: 15 operations ($24.30)
    • Document Analysis: 12 operations ($15.20)

    Note: Per-case AI usage tracking enables ethical
    cost recovery per ABA Opinion 93-379
    ```

    **Auto-Billing:** When creating invoice, system finds unbilled AI usage for that case and adds as line item automatically
  </Accordion>

  <Accordion title="Flat Fees" icon="dollar-sign" defaultOpen={false}>
    **Use Cases:**

    * Uncontested divorce package
    * Document review flat rate
    * Consultation fees
    * Monthly retainer

    **Entry Fields:**

    * Description (e.g., "Uncontested Divorce - Full Service")
    * Amount (fixed price)
    * Quantity (usually 1, or number of months for retainers)
  </Accordion>

  <Accordion title="Retainers" icon="piggy-bank" defaultOpen={false}>
    **Types Supported:**

    **Advance Fee Retainer:**

    * Flat fee for services
    * Earned upon receipt
    * Deposited in operating account

    **Security Retainer:**

    * Held in trust account
    * Applied against future invoices
    * Refundable if unused

    **Description Example:**

    ```
    Initial Retainer - Family Law Services
    Covers initial case analysis, pleading preparation,
    and court appearance for Case No. FL-2024-1234
    ```
  </Accordion>
</AccordionGroup>

***

## Client Portal Integration

### How Clients View Invoices

When you enable client portal for an invoice, Victoria generates a secure, tokenized link that clients can access without logging in.

**Client Portal Features:**

<CardGroup cols={2}>
  <Card title="Secure Access" icon="lock">
    * Unique token per invoice
    * No password required
    * Expires in 90 days
    * View-only access
  </Card>

  <Card title="Invoice Details" icon="file-invoice">
    * Full invoice with line items
    * Professional PDF generation
    * Breakdown by date/activity
    * Receipt attachment viewing
  </Card>

  <Card title="Comments" icon="message">
    * Ask questions about charges
    * Request clarification
    * Visible to entire legal team
    * Real-time notifications
  </Card>

  <Card title="Online Payment" icon="credit-card">
    * Pay via credit/debit card
    * ACH bank transfer
    * Stripe integration (LawPay coming soon)
    * Instant payment confirmation
  </Card>
</CardGroup>

### Payment Processing

**Integrated Payment Providers:**

<Tabs>
  <Tab title="Stripe (Available Now)">
    **Modern Payment Processing - Currently Available**

    * **Best For:** All payment types - flat fees, retainers, invoices, and firm-earned fees
    * **Fees:** 2.9% + 30¢ per transaction (credit/debit), 0.8% capped at \$5 (ACH)
    * **Payouts:** 2-day transfer to business bank account
    * **Features:** Credit cards, ACH, Apple Pay, Google Pay

    **Setup:**

    1. Create Stripe account at stripe.com
    2. Complete business verification
    3. Add Stripe API keys to Victoria Settings → Integrations
    4. Enable ACH for lower-cost bank payments

    **Security:**

    * PCI-DSS Level 1 compliant
    * No card data touches your servers
    * 3D Secure fraud protection
    * Automatic receipt generation

    **Client Experience:**

    * Seamless in-portal payment
    * Multiple payment methods
    * Instant confirmation
    * Download receipt PDF
  </Tab>

  <Tab title="LawPay (Coming Soon)">
    **IOLTA-Compliant Payment Processing - Coming Soon**

    <Note>
      🚧 **LawPay integration is currently in development.** We're working with LawPay to bring you the most trusted payment processor for law firms. In the meantime, Stripe provides secure payment processing for all invoice types.
    </Note>

    **Why We're Adding LawPay:**

    * **Bar Approved:** Only payment processor approved by all 50 state bars for attorney trust accounting
    * **Trust vs. Operating:** Automatically routes payments to correct account based on transaction type
    * **Retainers:** Deposits directly to trust with full compliance tracking
    * **Fees Earned:** Goes to operating account immediately

    **What to Expect:**

    * Seamless trust accounting integration
    * Automatic IOLTA compliance
    * Three-way reconciliation support
    * Client ledger synchronization

    **Sign Up for Updates:**
    Email [billing-updates@divorce.law](mailto:billing-updates@divorce.law) to be notified when LawPay integration launches.
  </Tab>
</Tabs>

### Email Notifications

**Automated Email Flow:**

1. **Invoice Created**
   * If "Send Email" enabled
   * Sent to client email on file
   * Contains portal link
   * Professional PDF attachment option

2. **Email Content:**
   ```
   Subject: Invoice #INV-2024-0147 from [Your Firm Name]

   Dear [Client Name],

   You have a new invoice for $[Amount] due on [Due Date].

   View and pay your invoice securely:
   [Portal Link Button]

   This link will expire in 90 days for security.

   If you have questions about this invoice, you can leave
   a comment in the portal and we'll respond promptly.

   Thank you,
   [Your Firm Name]
   ```

3. **Payment Reminders**
   * Automatic: 7 days before due date
   * Automatic: 3 days after due date
   * Manual: Send reminder anytime

4. **Payment Confirmation**
   * Sent immediately upon payment
   * Includes receipt and invoice PDF
   * Payment method and amount

***

## Financial Dashboard

### Real-Time Billing Metrics

The Billing Tab in each case workspace shows:

**Summary Cards:**

<CardGroup cols={3}>
  <Card title="Unbilled Time" icon="clock">
    \*\*$3,450.00**
            12.5 hours @ avg $276/hr
    *Ready to invoice*
  </Card>

  <Card title="Outstanding" icon="file-invoice">
    **\$8,200.00**
    3 unpaid invoices
    *1 overdue by 5 days*
  </Card>

  <Card title="Collected" icon="check-circle">
    **\$15,750.00**
    6 paid invoices
    *Avg 12 days to payment*
  </Card>
</CardGroup>

**Detailed Views:**

<Tabs>
  <Tab title="Time Entries">
    **Unbilled Time Tracking:**

    * Filter by attorney, date range, activity type
    * Sort by date, hours, amount
    * Bulk select for invoicing
    * Export to CSV
    * Edit before billing

    **Billed Time History:**

    * Which invoice billed each entry
    * Payment status
    * Date billed and date paid
    * Realization rate (billed ÷ standard rate)
  </Tab>

  <Tab title="Expenses">
    **Unbilled Expenses:**

    * View receipt thumbnails
    * Filter by category, date, user
    * Mark as billable/non-billable
    * Add to draft invoice

    **Expense Reports:**

    * Total by category
    * Reimbursement status
    * Attorney-specific expenses
    * Tax year summaries
  </Tab>

  <Tab title="Invoices">
    **All Invoices:**

    * Status breakdown
    * Aging report (0-30, 31-60, 61-90, 90+ days)
    * Search by invoice number or case
    * Quick actions: email, view, void

    **Payment History:**

    * All payments received
    * Payment method breakdown
    * Deposits by trust vs. operating account
    * Reconciliation reports
  </Tab>
</Tabs>

***

## Trust Accounting

### IOLTA Compliance

Victoria tracks trust account transactions with built-in safeguards for bar compliance.

**Trust Account Features:**

<AccordionGroup>
  <Accordion title="Client Ledgers" icon="book">
    **Individual Client Tracking:**

    * Separate ledger per client
    * All deposits and withdrawals
    * Current balance by client
    * Transaction history with descriptions

    **Three-Way Reconciliation:**

    * Bank balance
    * Trust ledger total
    * Sum of client ledgers
    * Must match to the penny
  </Accordion>

  <Accordion title="Retainer Deposits" icon="landmark">
    **Security Retainers:**

    * Deposited to trust upon receipt
    * Held until fees earned
    * Applied against invoices automatically
    * Refund balance if unused

    **Application Process:**

    1. Client pays retainer via portal
    2. Routed to trust account (Stripe now, LawPay automatic routing coming soon)
    3. Added to client's trust ledger
    4. When invoice generated, prompt to apply trust funds
    5. Transfer from trust to operating (earned)
    6. Client ledger reduced by amount applied
  </Accordion>

  <Accordion title="Earning Fees from Trust" icon="scale-balanced">
    **ABA Model Rule 1.15 Compliance:**

    **When Fees Become Earned:**

    * Invoice sent to client
    * Reasonable notice period (usually 30 days)
    * No client objection
    * Transfer to operating account

    **Victoria's Workflow:**

    1. Generate invoice
    2. Check client trust balance
    3. Prompt: "Apply \$\[amount] from trust?"
    4. If yes: create trust transfer record
    5. Move funds from trust to operating
    6. Update client ledger
    7. Mark invoice as paid from trust
    8. Send confirmation to client
  </Accordion>

  <Accordion title="Audit Trail" icon="list-check">
    **Every Transaction Logged:**

    * Date and time
    * User who initiated
    * Amount and direction (deposit/withdrawal)
    * Source (client payment, earned fee, refund)
    * Invoice or case reference
    * Bank transaction ID

    **Bar Audit Reports:**

    * Monthly reconciliation statements
    * Client ledger detail by date range
    * Trust transaction journal
    * Overdrawn client warnings
    * Stale trust balance reports (>3 years)
  </Accordion>
</AccordionGroup>

***

## Row Level Security (RLS)

### Data Access Controls

**Time Entries:**

* ✅ Attorneys can see all firm time entries
* ✅ Staff can see only their own time entries
* ❌ Clients cannot see time entries (only invoiced totals)

**Expenses:**

* ✅ Attorneys can see all firm expenses
* ✅ Staff can see only their own expenses
* ❌ Clients cannot see expense detail (only invoiced totals)

**Invoices:**

* ✅ Attorneys can see all firm invoices
* ✅ Staff can see invoices for their assigned cases
* ✅ Clients can see only their own invoices (via portal token)

**Payments:**

* ✅ Attorneys and firm admins can see all payments
* ✅ Bookkeepers can see payment details for reconciliation
* ✅ Clients can see payment history for their invoices

***

## Ethical Billing

### ABA Guidelines

Victoria's billing system is designed around ABA Model Rules and ethics opinions:

<AccordionGroup>
  <Accordion title="Rule 1.5 - Fees" icon="scale-balanced">
    **Reasonable Fees:**

    * Time tracking shows actual work performed
    * Activity descriptions provide transparency
    * AI cost recovery limited to actual cost (per Opinion 93-379)

    **Fee Communication:**

    * Client portal shows detailed breakdown
    * Comments allow client questions
    * Professional descriptions (no legalese)

    **Factors Considered:**

    * Time and labor required (tracked automatically)
    * Novelty and difficulty (activity type)
    * Skill required (attorney vs. staff rates)
    * Results obtained (case outcome notes)
  </Accordion>

  <Accordion title="Opinion 93-379 - AI Cost Recovery" icon="brain">
    **ABA Formal Opinion 93-379 (Updated 2023):**

    "Lawyers may bill clients for expenses related to generative AI services, provided:"

    1. **Actual Cost** - Bill only what you're charged, no markup
    2. **Transparency** - Disclose AI use and costs to clients
    3. **Reasonable** - AI cost should benefit client (efficiency, accuracy)
    4. **Per-Case Tracking** - Allocate AI costs to specific matters

    **Victoria's Compliance:**

    * ✅ Tracks AI cost per case
    * ✅ Provides transparent breakdown by agent
    * ✅ Bills at cost (no markup)
    * ✅ Shows operation count and description
    * ✅ Client can see which AI features used
  </Accordion>

  <Accordion title="Rule 1.15 - Trust Accounting" icon="landmark">
    **Safekeeping Property:**

    * Complete trust accounting records
    * Separate trust and operating accounts
    * Prompt notice of receipt
    * Prompt delivery when earned/due

    **Victoria's Controls:**

    * Separate ledgers for each client
    * Three-way reconciliation
    * Audit trail for every transaction
    * Client-accessible trust balance
    * Automatic overdrawn warnings
  </Accordion>

  <Accordion title="Hourly Billing Best Practices" icon="clock">
    **Minimum Increments:**

    * Industry standard: 0.1 hours (6 minutes)
    * Victoria supports decimal precision
    * Common: 0.1, 0.25, 0.5, 0.75, 1.0

    **Activity Descriptions:**

    * What was done (not how long it took)
    * Specific enough to justify charge
    * Professional language
    * Avoid excessive detail (security risk)

    **Non-Billable Time:**

    * Clerical/administrative work
    * Learning new software
    * Billing/collections
    * Correcting own errors
  </Accordion>
</AccordionGroup>

***

## Billing Automation

### Time-Saving Features

<CardGroup cols={2}>
  <Card title="Auto Time Entry Prompts" icon="robot">
    Victoria suggests time entries after completing work. No end-of-day scramble to remember what you did.
  </Card>

  <Card title="AI Usage Auto-Billing" icon="brain">
    Automatically calculates unbilled AI costs and adds line item to invoices. Ethical AI cost recovery.
  </Card>

  <Card title="Invoice Templates" icon="file-invoice">
    Pre-configured invoice layouts with firm branding. One-click PDF generation.
  </Card>

  <Card title="Payment Reminders" icon="bell">
    Automatic email reminders before and after due dates. Reduces collection time.
  </Card>

  <Card title="Bulk Actions" icon="check-double">
    Select multiple time entries or expenses to invoice at once. Fast month-end billing.
  </Card>

  <Card title="Recurring Invoices" icon="arrows-rotate">
    Set up monthly retainer invoices that generate automatically. No manual entry needed.
  </Card>
</CardGroup>

***

## Reports & Analytics

### Financial Insights

**Available Reports:**

<Tabs>
  <Tab title="Collections">
    **Accounts Receivable Aging:**

    * Current (0-30 days)
    * 31-60 days
    * 61-90 days
    * 90+ days overdue

    **Collection Metrics:**

    * Average days to payment
    * Collection rate by client
    * Write-off tracking
    * Bad debt reserves
  </Tab>

  <Tab title="Productivity">
    **Attorney Performance:**

    * Billable hours by attorney
    * Hourly rate realization
    * Utilization rate (billable ÷ total hours)
    * Revenue per attorney

    **Activity Breakdown:**

    * Time by activity type
    * Most profitable activities
    * Administrative time (non-billable)
    * Client communication time
  </Tab>

  <Tab title="Revenue">
    **Firm-Wide Metrics:**

    * Total revenue by month/quarter/year
    * Revenue by practice area
    * Revenue by case type
    * Revenue by lead attorney

    **Trend Analysis:**

    * Month-over-month growth
    * Seasonal patterns
    * Case pipeline value
    * Forecasted revenue
  </Tab>

  <Tab title="Expenses">
    **Expense Analysis:**

    * Total expenses by category
    * Reimbursement rate
    * Non-billable expenses (overhead)
    * Profitability per case (revenue - expenses)

    **Tax Reports:**

    * Year-end expense summary
    * Category breakdown for tax prep
    * Receipt export for audits
  </Tab>
</Tabs>

***

## Best Practices

### Law Firm Billing Tips

<Steps>
  <Step title="Log Time Daily">
    Don't wait until end of month. Victoria's AI prompts make it easy to log time immediately after completing work. Accuracy increases, revenue capture improves.
  </Step>

  <Step title="Detailed Descriptions">
    Generic descriptions like "Legal research" lose money. Be specific: "Reviewed CA case law on child support modification standards for income changes." Clients understand value, less likely to dispute.
  </Step>

  <Step title="Invoice Promptly">
    Send invoices within 7 days of month-end. Faster invoicing = faster payment. Victoria makes it easy with one-click invoice generation from unbilled time.
  </Step>

  <Step title="Enable Client Portal">
    Clients who can view invoices online pay 40% faster on average. Comments reduce disputes. Online payment removes friction. Always enable portal unless client specifically requests paper.
  </Step>

  <Step title="Follow Up on Overdue">
    Send gentle reminder at 7 days overdue. Firm but professional at 30 days. Consider payment plans for large bills. Victoria tracks all communication in case timeline.
  </Step>

  <Step title="Review Realization Rates">
    If you're writing down billable hours before sending invoices, you're leaving money on the table. Target 90%+ realization. Victoria's AI descriptions help justify full rates.
  </Step>

  <Step title="Reconcile Trust Monthly">
    Don't wait for bar audit. Monthly three-way reconciliation catches errors early. Victoria's trust reports make this a 10-minute task.
  </Step>

  <Step title="Use Activity Types">
    Categorizing time entries enables powerful reporting. Discover which activities are most profitable, where you spend the most time, and where staff can take over.
  </Step>
</Steps>

***

## Client Portal Experience

### What Clients See

When clients click their secure invoice link:

1. **Invoice Header**
   * Your firm name and logo
   * Invoice number and date
   * Due date (with countdown if close)
   * Total amount due

2. **Case Information**
   * Case name and number
   * Client name
   * Case type and jurisdiction

3. **Line Item Detail**
   * Date of each activity
   * Professional description
   * Attorney/staff name
   * Hours and rate (if time entry)
   * Amount for each line

4. **Subtotal and Totals**
   * Subtotal
   * Expenses subtotal
   * Tax (if applicable)
   * **Total Amount Due**

5. **Action Buttons**
   * 💬 Leave a Comment (ask questions)
   * 💳 Pay Now (credit card, ACH)
   * 📄 Download PDF (professional invoice)
   * 📧 Email Copy (send to spouse/accountant)

6. **Payment Options**
   * Credit/Debit Card
   * Bank Account (ACH)
   * Trust Account Credit (if on file)
   * Payment plan request

***

## Getting Started

### Setup Checklist

<Steps>
  <Step title="Configure Firm Settings">
    **Settings → Billing**

    * Default hourly rates by role
    * Invoice numbering format
    * Payment terms (Net 30, etc.)
    * Trust account bank info
    * Tax rate (if applicable)
  </Step>

  <Step title="Connect Payment Provider">
    **Settings → Integrations → Payments**

    * Add Stripe API keys (available now)
    * Enable ACH for lower-cost payments (0.8%, max \$5)
    * Test with \$1 transaction
    * LawPay integration coming soon for automatic trust/operating routing
  </Step>

  <Step title="Customize Invoice Template">
    **Settings → Billing → Invoice Template**

    * Upload firm logo
    * Add firm address and contact
    * Customize color scheme
    * Add payment instructions
    * Set email signature
  </Step>

  <Step title="Import Existing Clients">
    **Clients → Import**

    * CSV upload with client list
    * Maps to: First Name, Last Name, Email, Phone
    * Bulk import saves setup time
  </Step>

  <Step title="Train Your Team">
    **Team Meeting:**

    * Show time entry prompt workflow
    * Explain activity types
    * Demo expense entry with receipts
    * Practice invoice generation
    * Review client portal features
  </Step>

  <Step title="Start Logging Time">
    **First Week:**

    * Let Victoria prompt time entries
    * Manually add non-Victoria work
    * Review descriptions for professionalism
    * Check unbilled time in Billing tab
  </Step>

  <Step title="Generate First Invoice">
    **Month-End:**

    * Select case with unbilled time
    * Create invoice
    * Review line items
    * Enable client portal
    * Send to client
    * Monitor payment status
  </Step>
</Steps>

***

## FAQs

<AccordionGroup>
  <Accordion title="Can clients see my time entries before I invoice them?" icon="eye">
    **No.** Time entries are internal only until you add them to an invoice. Clients only see aggregated line items on invoices, never your raw time logs.

    This lets you edit descriptions, adjust hours, or delete entries before sending to clients.
  </Accordion>

  <Accordion title="What happens if I delete a billed time entry?" icon="trash">
    **You can't.** Once a time entry is billed (added to an invoice), it cannot be edited or deleted. This preserves audit trail and prevents accounting errors.

    **To correct:** Create a credit memo, void the invoice and recreate it, or add an adjustment line item.
  </Accordion>

  <Accordion title="How does Victoria calculate AI costs to bill?" icon="brain">
    Victoria tracks every AI operation (document analysis, legal research, form generation) and calculates the actual API cost based on:

    * Tokens used (GPT-4, Claude, etc.)
    * Model pricing from OpenAI/Anthropic
    * Victoria's cost per operation

    When creating an invoice, it sums unbilled AI usage for that case and adds a transparent line item showing operation count, breakdown by agent, and total cost.

    **Ethical Note:** Victoria bills AI at cost per ABA Opinion 93-379. No markup, full transparency.
  </Accordion>

  <Accordion title="Can I give clients a discount without showing the original amount?" icon="percent">
    **Yes, two ways:**

    1. **Adjust before invoicing** - Edit time entries to reduce hours or rates, then invoice. Client never sees original amount.

    2. **Discount line item** - Invoice at full amount, then add negative line item: "Professional courtesy discount - 10%". Shows transparency.

    **Best practice:** Adjust time entries before invoicing if it's a write-down. Use discount line if it's a promotional/courtesy reduction.
  </Accordion>

  <Accordion title="How do I handle clients who pay by check?" icon="money-check">
    **Option 1: Manual Payment Entry**

    1. Receive check
    2. Deposit to bank
    3. Go to invoice → "Record Payment"
    4. Enter amount, date, payment method: "Check"
    5. Add check number in notes

    **Option 2: Trust Account Application**

    * If client has trust balance
    * Apply trust funds to invoice
    * Victoria automatically updates trust ledger

    **Receipt:** Client receives payment confirmation via email with PDF receipt.
  </Accordion>

  <Accordion title="Can I see which invoices are about to become overdue?" icon="calendar">
    **Yes!** Dashboard → Aging Report shows:

    * Invoices due in next 7 days
    * Overdue by 1-30 days
    * Overdue by 31-60 days
    * Seriously overdue (60+ days)

    You can send automated reminders to all "due in 7 days" with one click.
  </Accordion>

  <Accordion title="What if a client disputes a charge?" icon="message">
    **Built-in Dispute Resolution:**

    1. Client leaves comment on invoice in portal
    2. You receive notification immediately
    3. Respond in comment thread (visible to client)
    4. If agreed to adjust: void invoice, recreate with changes
    5. If disagreement: document in case notes, escalate if needed

    **Best Practice:** Respond within 24 hours. Most disputes are misunderstandings about descriptions. Clear communication resolves 90% of issues.
  </Accordion>

  <Accordion title="Can I bill in increments smaller than 6 minutes (0.1 hours)?" icon="clock">
    **Technically yes, Victoria supports 0.01 hour increments.**

    **But you shouldn't.** Industry standard is 0.1 hours (6 minutes). Billing in 1-minute increments looks petty and invites scrutiny.

    **Best Practice:**

    * 0-3 minutes: No charge (de minimis)
    * 4-9 minutes: 0.1 hours
    * 10-15 minutes: 0.25 hours
    * Round up for client benefit
  </Accordion>

  <Accordion title="How do I export billing data for QuickBooks/Xero?" icon="file-export">
    **CSV Export:**

    * Billing Tab → Export
    * Select date range
    * Choose: Time Entries, Expenses, Invoices, or Payments
    * Download CSV
    * Import to accounting software

    **Direct Integration (Coming Soon):**

    * QuickBooks Online
    * Xero
    * FreshBooks
    * Two-way sync
  </Accordion>
</AccordionGroup>

***

## Support

Need help with billing? We're here:

* **Email:** [billing-support@divorce.law](mailto:billing-support@divorce.law)
* **Live Chat:** Click support icon in bottom right
* **Office Hours:** Monday-Friday, 9am-5pm PT
* **Response Time:** Less than 2 hours during business hours

**Common Requests:**

* Payment provider setup assistance
* Trust accounting reconciliation help
* Invoice template customization
* Bulk import of historical data
* Bar audit report generation
