Skip to content

Billing Items Data Model

1. Executive Summary

The billing items data model represents the expected payments from buyers against deals. Each billing item captures the gross amount owed by a buyer for a client's services under a specific deal, and splits that amount into two detail lines: one for UTA's commission (REV) and one for the client's payout share (PAY). This REV/PAY split is the foundational concept that drives the entire downstream cash processing workflow -- from worksheet applications through settlement and outbound payment.

Billing items also track deductions (tax withholding, bank charges, discounts, etc.) that reduce the collectible amount, carry write-off status for receivables deemed uncollectable, and link to documents (invoices, credit memos, client letters) through a bridge table.

Scope

Tables covered in this document:

TablePurpose
billing_itemHeader record for a single expected payment from a buyer
billing_item_detailREV/PAY split amounts; exactly two rows per billing item
billing_item_deductionDeductions applied against a billing item detail
billing_item_documentBridge table linking billing items to documents (invoices, credit memos, client letters)
revenue_itemsAggregated revenue expectation from a deal; parent of billing items
revenue_item_schedulesPeriodic revenue recognition schedule entries

Not covered in this document:

  • cash_receipt_application -- downstream cash application against billing item details (see Cash Receipts data model)
  • cash_receipt_application_deduction -- deduction amounts applied at cash application time
  • write_off_packet / packet_receivable -- write-off approval workflow (see Write-Offs data model)
  • participant_settlement -- settlement of PAY amounts among a client's party
  • payment_term -- deal engine payment term source data

Position in the Financial Flow

Deal (agreed gross revenue)
  |-- Revenue Item (aggregated revenue expectation)
       |-- Billing Item (specific payment expected from buyer)    <-- THIS DOCUMENT
            |-- Billing Item Detail: REV (UTA's commission)
            |-- Billing Item Detail: PAY (client's share)
            |-- Billing Item Deductions (tax, withholding, etc.)
            |-- Billing Item Documents (invoices, credit memos, etc.)
                 |
                 v
            Cash Receipt Worksheet (applies cash to REV and PAY details)
                 |-- Settlement (divides PAY among client's party)
                      |-- Outbound Payment (sent to bank)

IMPORTANT

Billing items are the receivables against which cash is applied. They are the bridge between the deal/revenue world (upstream) and the cash processing world (downstream). Every cash receipt application points to a billing_item_detail row.


2. Data Model

Entity Relationship Diagram

mermaid
erDiagram
    DEAL ||--o{ REVENUE_ITEMS : "has"
    REVENUE_ITEMS ||--o{ BILLING_ITEM : "generates"
    REVENUE_ITEMS ||--o{ REVENUE_ITEM_SCHEDULES : "scheduled as"

    BILLING_ITEM ||--|| BILLING_ITEM_DETAIL_REV : "has exactly one"
    BILLING_ITEM ||--|| BILLING_ITEM_DETAIL_PAY : "has exactly one"
    BILLING_ITEM ||--o{ BILLING_ITEM_DOCUMENT : "may have"
    BILLING_ITEM_DETAIL_REV ||--o{ BILLING_ITEM_DEDUCTION : "may have"
    BILLING_ITEM_DETAIL_PAY ||--o{ BILLING_ITEM_DEDUCTION : "may have"

    BILLING_ITEM_DETAIL_REV ||--o{ CASH_RECEIPT_APPLICATION : "applied against"
    BILLING_ITEM_DETAIL_PAY ||--o{ CASH_RECEIPT_APPLICATION : "applied against"

    BILLING_ITEM_DETAIL_REV ||--o| WRITE_OFF_PACKET : "may be linked to"

    BILLING_ITEM }o--|| PARTY_CLIENT : "for client"
    BILLING_ITEM }o--|| PARTY_BUYER : "billed to"
    BILLING_ITEM }o--|| PARTY_CONTRACTED : "contracted with"
    BILLING_ITEM }o--|| PARTY_COLLECTION : "collected from"
    BILLING_ITEM }o--|| UTA_ENTITY : "billed by"
    BILLING_ITEM }o--|| DEPARTMENT : "belongs to"

    REVENUE_ITEMS }o--|| DEAL : "derived from"
    REVENUE_ITEMS }o--|| PARTY_CLIENT : "for client"
    REVENUE_ITEMS }o--|| PARTY_BUYER : "from buyer"
    REVENUE_ITEMS }o--|| UTA_ENTITY : "owned by"

    BILLING_ITEM {
        serial billing_item_id PK
        varchar billing_item_status_cd
        integer revenue_item_id FK
        varchar payment_term_ref
        integer deal_id FK
        integer uta_entity_id FK
        integer department_id FK
        integer client_id FK
        integer contracted_party_id FK
        integer buyer_id FK
        integer collection_party_id FK
        varchar collection_style_cd
        boolean collection_style_override_ind
        varchar currency_cd
        varchar service_country_cd
        date billing_item_due_dt
        date billing_item_aging_dt
        boolean current_item_ind
        boolean open_item_ind
    }

    BILLING_ITEM_DETAIL_REV {
        serial billing_item_detail_id PK
        integer billing_item_id FK
        varchar billing_item_detail_type_cd "REV"
        decimal billing_item_detail_gross_amt
        decimal billing_item_detail_percent
        decimal billing_item_detail_amt
        decimal billing_item_detail_tax_amt
        decimal billing_item_detail_total_amt
        varchar posting_status_cd
        varchar write_off_status_cd
    }

    BILLING_ITEM_DETAIL_PAY {
        serial billing_item_detail_id PK
        integer billing_item_id FK
        varchar billing_item_detail_type_cd "PAY"
        decimal billing_item_detail_gross_amt
        decimal billing_item_detail_percent
        decimal billing_item_detail_amt
        decimal billing_item_detail_tax_amt
        decimal billing_item_detail_total_amt
        varchar posting_status_cd
    }

    BILLING_ITEM_DEDUCTION {
        serial billing_item_deduction_id PK
        integer billing_item_detail_id FK
        varchar billing_item_deduction_type_cd
        boolean billing_item_deduction_update_net_ind
        decimal billing_item_deduction_amt
        varchar comment
    }

    BILLING_ITEM_DOCUMENT {
        serial billing_item_document_id PK
        integer billing_item_id FK
        varchar document_type_cd
        integer document_id
        varchar payment_term_ref
    }

    REVENUE_ITEMS {
        serial revenue_item_id PK
        integer uta_entity_id FK
        varchar sales_item_ref
        varchar revenue_item_status_cd
        integer deal_id FK
        integer client_id FK
        integer buyer_id FK
        decimal revenue_item_gross_amt
        decimal revenue_item_commission_perc
        decimal revenue_item_commission_amt
        varchar revenue_item_rec_style_cd
        boolean current_item_ind
    }

    REVENUE_ITEM_SCHEDULES {
        serial revenue_item_schedule_id PK
        integer revenue_item_id FK
        decimal revenue_amt
        date revenue_dt
        varchar revenue_item_posting_status_cd
    }

NOTE

The ER diagram shows BILLING_ITEM_DETAIL_REV and BILLING_ITEM_DETAIL_PAY as separate entities for clarity. In the physical database, both are rows in the single billing_item_detail table differentiated by billing_item_detail_type_cd.


billing_item

The header record representing a single expected payment from a buyer. Each billing item is associated with a revenue item and a deal, and carries the context needed to determine collection responsibility, currency, tax jurisdiction, and aging.

FieldTypeRequiredDefaultDescription
billing_item_idserialYesAutoPrimary key.
billing_item_status_cdvarchar(50)No--Current lifecycle status. Values: U (Unbilled), B (Billed), X (Skipped), C (Cancelled). Code master type: BILLING_ITEM_STATUS_CD.
revenue_item_idintegerNo--FK to revenue_items. Links this billing item to its parent revenue expectation.
payment_term_refvarchar(100)No--Reference identifier from the deal engine's payment term. Used to correlate billing items with their source payment term during sync operations.
deal_idintegerNo--FK to deal. The deal under which this billing item was generated.
uta_entity_idintegerNo--FK to uta_entity. The UTA legal entity responsible for billing. Determines billing entity for tax jurisdiction mapping (e.g., UK Agency, US entity).
department_idintegerNo--FK to department. The UTA department associated with this billing item.
client_idintegerNo--FK to party (Client type). The talent/artist whose services generated this receivable.
contracted_party_idintegerNo--FK to party (Contracted type). The party contractually bound in the deal. May differ from client_id for loan-out corporations or legal entities.
buyer_idintegerNo--FK to party (Buyer type). The entity expected to pay (studio, brand, network, etc.).
agent_group_idintegerNo--Identifier for the agent group associated with this billing item.
collection_party_idintegerNo--FK to party. The party from whom payment will be collected. Determined by collection_style_cd unless overridden.
collection_style_cdvarchar(50)No--How payment is collected. C = Client (UTA collects from client), B = Buyer (UTA collects from buyer). Code master type: COLLECTION_STYLE_CD.
collection_style_override_indbooleanNo--When true, the collection style was manually overridden by a user and should not be recalculated during sync.
billing_item_namevarchar(500)No--Descriptive name for the billing item, typically inherited from the payment term.
currency_cdvarchar(50)No--Currency of the billing item amounts. Code master type: CURRENCY_CD.
service_country_cdvarchar(2)No--ISO 3166-1 alpha-2 country code where the service was performed. Used for tax jurisdiction determination.
service_state_cdvarchar(10)No--State or province code for sub-national tax jurisdiction.
vat_pass_through_ratedecimal(7,4)No--VAT rate applied as pass-through (Artist Fee VAT -- buyer pays on top of gross, passes through to artist).
vat_pass_through_amtdecimal(15,2)No--Calculated VAT pass-through amount.
expected_invoice_totaldecimal(15,2)No--Expected total invoice amount including VAT pass-through.
tax_calculated_dttimestampNo--Timestamp when tax was last calculated for this billing item.
tax_stale_indbooleanNofalseWhen true, indicates that underlying tax data has changed and the tax estimate should be recalculated.
billing_item_due_dtdateNo--Date when the payment is due from the buyer.
billing_item_due_dt_status_cdvarchar(50)No--Whether the due date is confirmed. U = Unconfirmed, C = Confirmed. Code master type: BILLING_ITEM_DATE_STATUS_CD.
billing_item_aging_dtdateNo--Date used for aging calculations. Defaults to billing_item_due_dt unless manually adjusted by a user.
current_item_indbooleanNo--When true, this is the active version of the billing item. Set to false when a billing item is superseded by a newer version (rebilling) or deactivated.
open_item_indbooleanNo--When true, the billing item has outstanding balance (not fully paid). Calculated as: false when both REV and PAY detail total amounts have been fully applied within tolerance (epsilon = 0.01).

IMPORTANT

The current_item_ind and open_item_ind flags work together to determine visibility in receivable searches. Only rows with current_item_ind = true represent active billing items. The open_item_ind flag is recalculated automatically whenever cash applications change.

NOTE

The collection_style_cd field directly impacts PAY amounts. When collection style is CLIENT (meaning UTA collects only commission from the client directly), PAY detail amounts are set to zero because UTA is not handling the client's payout -- the buyer pays the client directly.


billing_item_detail

Each billing item has exactly two detail records: one with billing_item_detail_type_cd = 'REV' (UTA's commission) and one with 'PAY' (the client's share). These are the rows against which cash is applied on worksheets.

FieldTypeRequiredDefaultDescription
billing_item_detail_idserialYesAutoPrimary key. Referenced by cash_receipt_application.billing_item_detail_id for cash applications.
billing_item_idintegerNo--FK to billing_item. Parent billing item header.
billing_item_detail_type_cdvarchar(50)No--REV (Commission/Revenue) or PAY (Payout). Code master type: BILLING_ITEM_DETAIL_TYPE_CD.
billing_item_detail_gross_amtdecimal(15,2)No--The gross amount to be collected for this detail line. For REV: equals the deal gross. For PAY: equals the deal gross (unless collection style is CLIENT, in which case it is zero).
billing_item_detail_percentdecimal(5,4)No--The percentage applied to gross to compute the detail amount. For REV: the commission rate. For PAY: 1 - commission rate (or 0 if collection style is CLIENT).
billing_item_detail_amtdecimal(15,2)No--Calculated: billing_item_detail_gross_amt * billing_item_detail_percent. This is the base receivable amount before tax.
billing_item_detail_tax_amtdecimal(15,2)No--Tax amount computed from billing_item_detail_amt. Initially zero; populated when tax calculations run.
billing_item_detail_total_amtdecimal(15,2)No--Total collectible amount: billing_item_detail_amt + billing_item_detail_tax_amt. This is the target amount for cash application.
posting_status_cdvarchar(50)No--GL posting status. U = Unposted, P = Posted, X = Skipped. Code master type: POSTING_STATUS_CD.
posting_dtdateNo--Date when the detail was posted to the general ledger.
write_off_packet_iduuidNo--FK to write_off_packet. Links to the write-off approval packet when this detail has been written off. Null if not written off.
write_off_status_cdvarchar(50)No'NOT_WRITTEN_OFF'Write-off lifecycle status. Values: NOT_WRITTEN_OFF, WRITTEN_OFF, RECOVERED.
write_off_dttimestampNo--Date when the detail was written off.
recovered_dttimestampNo--Date when a previously written-off detail was recovered.
exclude_from_cecl_indbooleanNofalseWhen true, excludes this detail from CECL (Current Expected Credit Losses) regulatory reporting. Set to true when written off.

IMPORTANT

The formula billing_item_detail_amt = billing_item_detail_gross_amt * billing_item_detail_percent is enforced at creation time. Deductions do NOT affect billing_item_detail_amt -- they are tracked separately in billing_item_deduction and applied at the cash application level.

WARNING

Only REV-type details can be written off. PAY details remain unchanged when a write-off occurs -- the company absorbs the loss. This is enforced at the application level, not by a database constraint.


billing_item_deduction

Deductions reduce the effective collectible amount for a billing item detail. Multiple deductions can be applied to a single detail. Deductions are tracked separately from the base amounts and are applied at the cash receipt application level.

FieldTypeRequiredDefaultDescription
billing_item_deduction_idserialYesAutoPrimary key.
billing_item_detail_idintegerNo--FK to billing_item_detail. The detail line this deduction applies to.
billing_item_deduction_type_cdvarchar(50)No--Deduction category. Code master type: BILLING_ITEM_DEDUCTION_TYPE_CD. See Code Master Values section for full list.
billing_item_deduction_update_net_indbooleanNotrueWhen true, this deduction affects the net collectible amount calculation. When false, the deduction is informational only.
billing_item_deduction_amtdecimal(15,2)No--The deduction amount. Positive values reduce the collectible amount.
commentvarchar(500)No--Free-text comment describing the deduction rationale.

NOTE

Deductions have a balance concept tracked at the DTO/presentation layer (not in the database). The deduction_applied_amt is the sum of cash_receipt_application_deduction.deduction_amt_applied records linked through applications, and deduction_balance = billing_item_deduction_amt - deduction_applied_amt. This allows partial application of deductions across multiple worksheets.


billing_item_document

Bridge table linking billing items to documents (invoices, credit memos, client letters, etc.). The document_type_cd discriminates which document table document_id references. Each billing item can have multiple documents of different types.

FieldTypeRequiredDefaultDescription
billing_item_document_idserialYesAutoPrimary key.
billing_item_idintegerYes--FK to billing_item. The parent billing item.
document_type_cdvarchar(50)Yes--Document type discriminator. Values: CI (Commission Invoice), BI (Buyer Invoice), CM (Credit Memo), CL (Client Letter). Code master type: DOCUMENT_TYPE_CD.
document_idintegerYes--Polymorphic FK to the document table implied by document_type_cd (e.g., invoice.invoice_id for CI/BI).
payment_term_refvarchar(100)No--Reference to the payment term from the deal engine. Used for correlation during document generation.

NOTE

The document_type_cd implies which billing_item_detail type is relevant: CI (Commission Invoice) corresponds to the REV detail, and BI (Buyer Invoice) corresponds to the PAY detail. The document_id is a polymorphic foreign key -- referential integrity is enforced at the application level, not by a database constraint.


revenue_items

The aggregated revenue expectation from a deal. A revenue item represents the total expected revenue from a specific sales engagement and serves as the parent container for one or more billing items.

FieldTypeRequiredDefaultDescription
revenue_item_idserialYesAutoPrimary key. Referenced by billing_item.revenue_item_id.
uta_entity_idintegerNo--FK to uta_entity. The UTA legal entity.
agent_group_idintegerNo--Identifier for the associated agent group.
sales_item_refvarchar(255)Yes--External reference to the sales item in the deal engine. Used for correlation during sync. Indexed for search performance.
revenue_item_namevarchar(500)No--Descriptive name for the revenue item.
revenue_item_status_cdvarchar(1)Yes--Lifecycle status. U = Unconfirmed, C = Confirmed, M = Missed. Code master type: REVENUE_ITEM_STATUS_CD.
revenue_item_date_status_cdvarchar(1)Yes--Whether dates are confirmed. U = Unconfirmed, C = Confirmed. Code master type: REVENUE_ITEM_DATE_STATUS_CD.
deal_idintegerNo--FK to deal. The parent deal.
client_idintegerNo--FK to party (Client type).
contracted_party_idintegerNo--FK to party (Contracted type).
buyer_idintegerNo--FK to party (Buyer type).
department_idintegerNo--FK to department.
currency_cdvarchar(3)No--Currency of the revenue amounts.
revenue_item_gross_amtdecimal(19,2)No--Total gross revenue expected from the deal.
revenue_item_commission_flat_indbooleanNo--When true, the commission is a flat dollar amount rather than a percentage of gross.
revenue_item_commission_percdecimal(5,4)No--Commission rate as a decimal (e.g., 0.1000 = 10%). Used when revenue_item_commission_flat_ind = false.
revenue_item_commission_amtdecimal(19,2)No--The commission amount (UTA's revenue). Either calculated from gross * perc or the flat amount.
revenue_item_start_dtdateNo--Start date of the revenue period.
revenue_item_end_dtdateNo--End date of the revenue period.
revenue_item_rec_style_cdvarchar(1)No--Revenue recognition style. I = Immediate, M = Monthly, C = Cash. Code master type: REVENUE_ITEM_REC_STYLE_CD.
current_item_indbooleanNotrueWhen true, this is the active version of the revenue item.

IMPORTANT

The integrity rule for REV details across billing items is: for all billing_item_detail records of type REV belonging to billing items under a given revenue item, the sum of billing_item_detail_gross_amt must equal revenue_item_gross_amt, and the sum of billing_item_detail_amt must equal revenue_item_commission_amt.

NOTE

Revenue items use higher decimal precision (decimal(19,2)) than billing items (decimal(15,2)) because revenue items represent aggregate deal-level amounts that may be larger.


revenue_item_schedules

Periodic entries that break a revenue item's total into scheduled recognition periods. Each schedule row represents a specific date and amount for revenue recognition posting.

FieldTypeRequiredDefaultDescription
revenue_item_schedule_idserialYesAutoPrimary key.
revenue_item_idintegerNo--FK to revenue_items. Parent revenue item.
revenue_amtdecimal(19,2)No--Revenue amount for this schedule period.
revenue_dtdateNo--Date of this revenue recognition period.
revenue_item_posting_status_cdvarchar(1)No--GL posting status. P = Posted, U = Unposted. Code master type: POSTING_STATUS_CD.
revenue_item_posting_dtdateNo--Date when this schedule entry was posted to the general ledger.

3. Status Lifecycle

billing_item.billing_item_status_cd

StatusCodeDescriptionAllowed Transitions
UnbilledUBilling item has been created but not yet billed to the buyer. Initial state for all new billing items.B, X, C
BilledBBilling item has been sent to the buyer for payment.C
SkippedXBilling item was intentionally skipped and will not be billed.-- (terminal)
CancelledCBilling item has been cancelled.-- (terminal)
mermaid
stateDiagram-v2
    [*] --> U : Billing item created
    U --> B : Billed to buyer
    U --> X : Skipped
    U --> C : Cancelled
    B --> C : Cancelled after billing

    state "U (Unbilled)" as U
    state "B (Billed)" as B
    state "X (Skipped)" as X
    state "C (Cancelled)" as C

Transition details:

FromToTriggerPreconditionsSide Effects
--UBilling item created from revenue item syncRevenue item exists with payment termsREV and PAY details created; current_item_ind = true; open_item_ind = true
UBManual status update or billing process----
UXSkipped during billing--Used as reversal status when original was U
UCCancellation----
BCCancellation after billing----

NOTE

During rebilling (when a revenue item is updated from the deal engine), the original billing item's status is flipped as part of the reversal: if the original was U, the reversal copy is set to X; if the original was anything else, the reversal copy is set to U. The original is then deactivated (current_item_ind = false).


billing_item_detail.write_off_status_cd

StatusCodeDescriptionAllowed Transitions
Not Written OffNOT_WRITTEN_OFFNormal state. Detail is active and collectible.WRITTEN_OFF
Written OffWRITTEN_OFFDetail has been deemed uncollectable. Excluded from CECL reporting.RECOVERED
RecoveredRECOVEREDA previously written-off detail has been recovered.-- (terminal)
mermaid
stateDiagram-v2
    [*] --> NOT_WRITTEN_OFF : Detail created
    NOT_WRITTEN_OFF --> WRITTEN_OFF : Write-off packet approved
    WRITTEN_OFF --> RECOVERED : Recovery processed

    state "NOT_WRITTEN_OFF" as NOT_WRITTEN_OFF
    state "WRITTEN_OFF" as WRITTEN_OFF
    state "RECOVERED" as RECOVERED

Transition details:

FromToTriggerPreconditionsSide Effects
--NOT_WRITTEN_OFFDetail created--Default state
NOT_WRITTEN_OFFWRITTEN_OFFWrite-off packet reaches final approvalDetail type must be REV; write-off packet fully approvedwrite_off_dt set; write_off_packet_id linked; exclude_from_cecl_ind = true
WRITTEN_OFFRECOVEREDRecovery processedDetail was previously written offrecovered_dt set; exclude_from_cecl_ind may be reset

WARNING

Only REV-type details can transition through write-off states. PAY details always remain NOT_WRITTEN_OFF. The company absorbs the loss on the commission side, and the client's payout obligation is unaffected by a write-off.


billing_item_detail.posting_status_cd

StatusCodeDescriptionAllowed Transitions
UnpostedUDetail has not been posted to the general ledger.P, X
PostedPDetail has been posted to the general ledger.-- (terminal)
SkippedXDetail was skipped for GL posting.-- (terminal)

revenue_items.revenue_item_status_cd

StatusCodeDescriptionAllowed Transitions
UnconfirmedURevenue item exists but amounts/dates are not yet confirmed.C, M
ConfirmedCRevenue item amounts and dates are confirmed.-- (terminal)
MissedMRevenue was expected but not realized.-- (terminal)
mermaid
stateDiagram-v2
    [*] --> U : Revenue item created
    U --> C : Confirmed
    U --> M : Marked as missed

    state "U (Unconfirmed)" as U
    state "C (Confirmed)" as C
    state "M (Missed)" as M

NOTE

The Final code attribute on REVENUE_ITEM_STATUS_CD indicates whether the status represents a terminal state. C (Confirmed) and M (Missed) are both final; U (Unconfirmed) is not.


revenue_item_schedules.revenue_item_posting_status_cd

StatusCodeDescriptionAllowed Transitions
UnpostedUSchedule entry has not been posted.P
PostedPSchedule entry has been posted to GL.-- (terminal)

4. Validation & Database Constraints

Unique Constraints

TableConstraintColumnsBusiness Rule
billing_item_documentuq_billing_item_document_item_type_docbilling_item_id, document_type_cd, document_idPrevents duplicate document links -- a specific document of a given type can only be linked to a billing item once.

Database Indexes

TableIndexColumnsPurpose
billing_item_detailbilling_item_detail_billing_item_idxbilling_item_idFast lookup of details by parent billing item.
billing_item_detailbilling_item_detail_type_idxbilling_item_detail_type_cdFilter by REV/PAY type.
billing_item_detailbilling_item_detail_item_type_idxbilling_item_id, billing_item_detail_type_cdComposite index for common query pattern (get REV/PAY details for a billing item).
billing_item_documentbilling_item_document_billing_item_idxbilling_item_idFast lookup of documents by parent billing item.
billing_item_documentbilling_item_document_doc_type_doc_id_idxdocument_type_cd, document_idFast lookup of billing items by document reference.
revenue_itemsrevenue_items_sales_item_ref_idxsales_item_refFast lookup by external reference during sync.
revenue_itemsrevenue_items_current_item_idxcurrent_item_indFilter for active revenue items.

Required Fields (Database-Level NOT NULL)

TableRequired Fields
revenue_itemssales_item_ref, revenue_item_status_cd, revenue_item_date_status_cd
billing_item_documentbilling_item_id, document_type_cd, document_id
All othersNo database-level NOT NULL constraints beyond auto-generated PKs. Application-level validation enforces required fields at creation time.

Structural Invariants

Exactly Two Details Per Billing Item. Every billing_item must have exactly two billing_item_detail rows: one with billing_item_detail_type_cd = 'REV' and one with 'PAY'. This is an application-level invariant enforced by the service layer during creation, not by a database constraint. All creation paths produce both details atomically within a transaction. Querying code should defensively handle the case where a detail is missing.

Revenue Item Integrity. For all current (current_item_ind = true) billing_item_detail rows of type REV belonging to billing items under a given revenue_item_id: the sum of billing_item_detail_gross_amt must equal revenue_items.revenue_item_gross_amt, and the sum of billing_item_detail_amt must equal revenue_items.revenue_item_commission_amt. This invariant is maintained during revenue sync operations (create, update, rebill).

Calculated Field Rules

FormulaDescription
billing_item_detail_amt = billing_item_detail_gross_amt * billing_item_detail_percentBase receivable amount.
billing_item_detail_total_amt = billing_item_detail_amt + billing_item_detail_tax_amtTotal collectible amount.
open_item_ind = NOT (REV fully applied AND PAY fully applied)Open item flag (tolerance: 0.01).

IMPORTANT

"Fully applied" means the absolute difference between cash applied and billing_item_detail_total_amt is less than 0.01 (epsilon). Cash applied is the sum of cash_receipt_application.cash_receipt_amt_applied for the given billing_item_detail_id.

Collection Style Impact on PAY

When collection_style_cd = 'C' (Client):

  • PAY detail: gross_amt = 0, percent = 0, amt = 0, tax_amt = 0, total_amt = 0

When collection_style_cd = 'B' (Buyer):

  • PAY detail: gross_amt = deal gross, percent = 1 - commission rate, amt = gross * (1 - commission rate)

IMPORTANT

The default collection style is derived from the payment term's payment party: if the payment party matches the buyer, style is BUYER; otherwise, style is CLIENT. This default can be manually overridden (collection_style_override_ind = true), in which case the override survives revenue sync operations.


5. Code Master Values

BILLING_ITEM_STATUS_CD

CodeDescriptionBehavior / When Used
UUnbilledDefault status for newly created billing items. Indicates the item has not been billed to the buyer.
BBilledItem has been sent to the buyer. Typically set after an invoice or billing run.
XSkippedItem intentionally not billed. Also used as the status for reversal copies when the original was U.
CCancelledItem cancelled. Terminal state.

No code attributes defined.


BILLING_ITEM_DETAIL_TYPE_CD

CodeDescriptionBehavior / When Used
REVCommissionUTA's revenue/commission portion. Always created with commission rate applied to gross. Subject to write-off. GL posts at worksheet Apply (D to P).
PAYPayoutClient's share for outbound payment. Created with 1 - commission rate applied to gross (or zero if collection style is CLIENT). Cannot be written off. GL posts only after bank confirms payment.

No code attributes defined.


BILLING_ITEM_DEDUCTION_TYPE_CD

CodeDescriptionBehavior / When Used
TTaxGeneral tax deduction.
WWithholdingGeneral withholding deduction.
BBank ChargeBank fees or charges deducted from the collectible amount.
DDiscountDiscount applied to the billing item.
RReimbursementReimbursement adjustment.
CClient RequestDeduction requested by the client.
DPDirect PaymentDirect payment deduction (e.g., buyer paid client directly for a portion).
WH_US_NRAUS NRA Withholding (30%)US non-resident alien withholding tax. Applied to PAY details when the contracted party is a non-resident alien without a Central Withholding Agreement (CWA).
WH_UK_FEUUK FEU Withholding (20%)UK Foreign Entertainers Unit withholding. Applied when UK tax year cumulative earnings (actual or expected) exceed the personal allowance threshold.
VAT_ARTISTVAT on Artist Fee (20%)UK VAT on the artist fee component. Applied when the billing entity is UK Agency, the show is in the UK, the client is UK-based, and is VAT registered.
VAT_COMMVAT on Commission (20%)UK VAT on the commission component. Applied when the billing entity is UK Agency and the client is UK-based.

No code attributes defined.

NOTE

International tax deduction types (WH_US_NRA, WH_UK_FEU, VAT_ARTIST, VAT_COMM) are auto-calculated by the tax engine at billing item creation time and stored as estimates. The worksheet recalculates authoritatively at load time, so billing-item-level tax deductions are informational until applied.


DOCUMENT_TYPE_CD

CodeDescriptionBehavior / When Used
CICommission InvoiceInvoice for UTA's commission (REV billing item detail). Generated during billing runs.
BIBuyer InvoiceInvoice sent to the buyer for the full amount (PAY billing item detail). Generated during billing runs.
CMCredit MemoCredit memo issued against a billing item. Used for adjustments or corrections.
CLClient LetterLetter sent to the client related to the billing item.

No code attributes defined.


COLLECTION_STYLE_CD

CodeDescriptionBehavior / When Used
CClientUTA collects only its commission from the client. PAY detail amounts are set to zero (buyer pays client directly).
BBuyerUTA collects the full amount from the buyer, then pays out the client's share. PAY detail amounts are calculated normally.

No code attributes defined.


BILLING_ITEM_DATE_STATUS_CD

CodeDescriptionBehavior / When Used
UUnconfirmedDue date is estimated or not yet confirmed. Default for new billing items.
CConfirmedDue date has been confirmed.

No code attributes defined.


POSTING_STATUS_CD

Used by billing_item_detail.posting_status_cd and revenue_item_schedules.revenue_item_posting_status_cd.

CodeDescriptionBehavior / When Used
UUnpostedEntry has not been posted to the general ledger.
PPostedEntry has been posted to the general ledger. posting_dt is set.
XSkippedEntry was intentionally skipped for GL posting.

No code attributes defined.


REVENUE_ITEM_STATUS_CD

CodeDescriptionBehavior / When Used
UUnconfirmedRevenue amounts and dates are not yet confirmed. Active, editable state. Code attribute: Final = F.
CConfirmedRevenue is confirmed. Terminal state. Code attribute: Final = T.
MMissedRevenue was expected but not realized. Terminal state. Code attribute: Final = T.

REVENUE_ITEM_DATE_STATUS_CD

CodeDescriptionBehavior / When Used
UUnconfirmedRevenue dates are estimated.
CConfirmedRevenue dates are confirmed.

No code attributes defined.


REVENUE_ITEM_REC_STYLE_CD

CodeDescriptionBehavior / When Used
IImmediateRevenue recognized immediately when earned.
MMonthlyRevenue recognized on a monthly schedule. Generates revenue_item_schedules entries.
CCashRevenue recognized when cash is received.

No code attributes defined.


6. Cross-References

DocumentRelationship
Cash Receiptscash_receipt_application.billing_item_detail_id references billing_item_detail. Cash applications are the downstream consumer of billing item detail receivables.
SettlementsSettlements divide PAY applications among deal parties. participant_settlement links back through cash_receipt_application to PAY billing item details.
SettlementsPayment items are created from settlement payouts. The payment lifecycle determines whether PAY applications and their billing item details can be reversed.
Write-Offsbilling_item_detail.write_off_packet_id references write_off_packet. Write-off packets contain packet_receivable rows that reference billing_item_detail_id.
Deals, Sales Items & Payment Termsbilling_item.deal_id, client_id, buyer_id, contracted_party_id, collection_party_id reference deal and party tables. revenue_items.deal_id links revenue to deals.

Key Integration Points

IntegrationDirectionDescription
Revenue SyncInboundRevenue items and billing items are created/updated when deal engine payment terms change. The sync process handles: new term creation, amount updates, rebilling with reversal/replacement, and deactivation of removed terms.
Cash WorksheetOutboundBilling item details are searched and added to cash receipt worksheets. The billing_item_detail_id is the FK on cash_receipt_application.
Tax CalculationBidirectionalTax deductions are estimated at billing item creation and recalculated authoritatively at worksheet load time. billing_item.tax_calculated_dt and tax_stale_ind track staleness.
AR AgingReadAR aging reports query billing items by billing_item_aging_dt, current_item_ind, and open_item_ind to produce aging buckets.
Write-OffOutboundREV billing item details are linked to write-off packets via write_off_packet_id. Write-off approval updates write_off_status_cd.
Document GenerationOutboundBilling items are linked to generated documents (invoices, credit memos, client letters) via the billing_item_document bridge table.

Confidential. For internal use only.