type: object
description: |
    A DHL invoice — created (or upserted) when a MyBill CSV is uploaded via
    `POST /admin/dhl/invoices/upload-csv`. Carries the totals across all
    `DHLCharge` rows that share its `invoiceNumber`.
required: [id, invoiceNumber]
properties:
    id: { type: string }
    createdAt: { type: string, format: date-time }
    invoiceNumber:
        type: string
        description: DHL invoice number (used as the upsert key).
    invoiceDate:
        type: string
        format: date
        description: Date on the invoice itself, not the upload time.
    status:
        type: string
        description: "Operator-set status (e.g. `Pending`, `Reviewed`, `Closed`)."
    totalAmount:
        type: number
        description: Sum of all `DHLCharge.totalCharge` values for this invoice.
    chargeCount:
        type: integer
        description: COUNT(*) of charge rows linked to this invoice.
    uploadedBy:
        type: string
        description: Account that uploaded the CSV.
    creatorBigscreenAccountId:
        type: string
        description: Account that initially created the invoice row.
example:
    id: "01HZ12345ABC678DEF90GHJKMN"
    createdAt: "2026-04-22T10:14:00.000Z"
    invoiceNumber: "MYBILL-2026-04-USA-001"
    invoiceDate: "2026-04-15"
    status: "Pending"
    totalAmount: 18234.56
    chargeCount: 142
    uploadedBy: "acct_01HXJ4Q12345"
    creatorBigscreenAccountId: "acct_01HXJ4Q12345"
