Invoices

An invoice represents the revenue and accounts receivable at the contract level. At a high level, these are calculated by aggregating line items within the same period (start and end date) and invoice delivery window. Invoices are typically stored in the destination for record keeping and business administration requirements (billing, accounting, etc).

Diagram

../_images/invoices_erd.svg

Table description

Column name

Data type

Description

id

VARCHAR

An identifier for looking up or referencing this specific object.

org_id

INTEGER

An identifier referencing the organization related to this object.

env_id

INTEGER

An identifier referencing the environment related to this object.

branch_id

INTEGER

An identifier referencing the branch related to this object.

created_at

TIMESTAMP

A timestamp for when this row was first created.

contract_id

VARCHAR

An identifier referencing a contract. Refers to contracts.durable_id.

invoice_delivery

VARCHAR

A string that represents if the invoice will be delivered at the beginning of the month, “ADVANCED”, or at the end of the month, “ARREARS”

started_at

TIMESTAMP

A timestamp that represents the beginning of the objects billing period. This timestamp is inclusive.

ended_at

TIMESTAMP

A timestamp that represents the completion of the objects billing period. This timestamp is exclusive.

status

VARCHAR

A string that represents the current state of the rated document ("FINALIZED", "DRAFT", "VOID").

total

DECIMAL(18,3)

A decimal that is the aggregate of all related line items related the invoice.