Invoices
Below are the schemas and relationships for the Invoices.
| Column | Description | Type |
|---|---|---|
| Id | Internal identifier | String |
| TenantId | Customer identifier | String |
| InvoiceId | Primary key for the Invoices schema | String |
| SupplierId | Supplier identifier | String |
| Status | Invoice status. Example: Created, Integrated, Under Review, Accepted, Rejected. | String |
| CategoryCode | Invoice category code | String |
| InvoiceNumber | Invoice number | String |
| Total | Total amount of the invoice | Double |
| DocumentNumber | Company's document number (e.g., National Registration of Legal Entities in the country). Example: CNPJ, IE, EIN, etc. | String |
| Discounts | Discount offered | Double |
| Freight | Freight costs (shipping fee) | Double |
| Note | Additional notes | String |
| SupplierName | Supplier's name | String |
| SupplierAddress | Supplier's address | String |
| SupplierNumber | Supplier's number | String |
| SupplierComplement | Supplier's complement | String |
| SupplierDistrict | Supplier's district | String |
| SupplierZipCode | Supplier's postal code | String |
| SupplierCity | Supplier's city | String |
| SupplierState | Supplier's state | String |
| SupplierCountry | Supplier's country | String |
| IssuedBy | Name of the invoice issuer | String |
| CreatedDate | Invoice creation date | Datetime |
| UpdatedAt | Date of the last update of the record | Datetime |
| SnapshotAt | Transaction reference date. | Datetime |
| Timekey | Temporal incremental value | String |
| PaymentDate | Invoice payment date | Datetime |
| DueDate | Invoice due date | Datetime |
Invoices Schema Joins
The Invoices schema has relationships with the following schemas:
| Schema | Relationship Column | Description |
|---|---|---|
| InvoiceItems | InvoiceId | Relates the Invoices rows with the InvoiceItems rows |
| InvoiceItemOrders | InvoiceId | Relates the Invoices rows with the InvoiceItemOrders rows |
| TrackingTransactions | InvoiceId | Relates the Invoices rows with the TrackingTransactions rows |
InvoiceItems
| Column | Description | Type |
|---|---|---|
| Id | Internal identifier | String |
| TenantId | Customer identifier | String |
| Quantity | Quantity of items on the invoice | Double |
| InvoiceId | Primary key for the Invoices schema | String |
| InvoiceItemId | Item number on the invoice | String |
| ProductCode | Product code for the item on the invoice | String |
| ProductClientCode | Product code for the item on the invoice in the client's system | String |
| Description | Description of the item on the invoice | String |
| Measure | Unit of measure for the product | String |
| UnitPrice | Unit price of the item on the invoice | Double |
| UpdatedAt | Date of the last update of the record | Datetime |
| SnapshotAt | Reference date of the transaction. | Datetime |
InvoiceItems Schema Joins
The InvoiceItems schema has relationships with the following schemas:
| Schema | Relationship Column | Description |
|---|---|---|
| Invoices | InvoiceId | Relates the InvoiceItems rows with the Invoices rows |
| InvoiceItemOrders | InvoiceId, InvoiceItemId | Relates the InvoiceItems rows with the InvoiceItemOrders rows |
| TrackingTransactions | InvoiceId, InvoiceItemId | Relates the InvoiceItems rows with the TrackingTransactions rows |
InvoiceItemOrders
| Column | Description | Type |
|---|---|---|
| Id | Internal identifier | String |
| TenantId | Customer identifier | String |
| InvoiceId | Primary key for the Invoices schema | String |
| InvoiceItemId | Item number on the invoice | String |
| OrderId | Primary key for the Orders schema | String |
| OrderItemId | Item number on the order | String |
| UpdatedAt | Date of the last update of the record | Datetime |
| SnapshotAt | Reference date of the transaction. | Datetime |
InvoiceItemOrders Schema Joins
The InvoiceItemOrders schema has relationships with the following schemas:
| Schema | Relationship Column | Description |
|---|---|---|
| Invoices | InvoiceId | Relates the InvoiceItemOrders rows with the Invoices rows |
| InvoiceItems | InvoiceId, InvoiceItemId | Relates the InvoiceItemOrders rows with the InvoiceItems rows |
| TrackingTransactions | InvoiceId, InvoiceItemId | Relates the InvoiceItemOrders rows with the TrackingTransactions rows |
| Orders | OrderId | Relates the InvoiceItemOrders rows with the Orders rows |
| OrderItems | OrderId, OrderItemId | Relates the InvoiceItemOrders rows with the OrderItems rows |
| OrderBorgs | OrderId | Relates the InvoiceItemOrders rows with the OrderBorgs rows |
| OrderItemBOrgs | OrderId, OrderItemId | Relates the InvoiceItemOrders rows with the OrderItemBOrgs rows |
| OrderItemRequests | OrderId, OrderItemId | Relates the InvoiceItemOrders rows with the OrderItemRequests rows |
| OrderItemDeliveries | OrderId, OrderItemId | Relates the InvoiceItemOrders rows with the OrderItemDeliveries rows |
| OrderAddresses | OrderId | Relates the InvoiceItemOrders rows with the OrderAddresses rows |
| OrderItemDates | OrderId, OrderItemId | Relates the InvoiceItemOrders rows with the OrderItemDates rows |
InvoiceApprovals
| Column | Description | Type |
|---|---|---|
| Id | Internal identifier | String |
| TenantId | Customer identifier | String |
| UpdatedAt | Date of the last update of the record | Datetime |
| SnapshotAt | Reference date of the transaction. | Datetime |
| InvoiceId | Primary key for the Invoices schema | String |
| InvoiceNumber | Invoice number | String |
| State | Boolean column indicating whether the invoice approval is Open or Closed | String |
| StatusCode | Status code of the Workflow | Integer |
| StatusName | Name of the Workflow status | String |
| ApproverId | Identifier of the invoice approver | String |
| ApproverName | Name of the invoice approver | String |
| AssignedUserId | Identifier of the user who issued the invoice | String |
| AssignedUserName | Name of the user who issued the invoice | String |
| AssignedRoleId | Identifier of the role/function of the person who issued the invoice | String |
| AssignedRoleName | Name of the role/function of the person who issued the invoice | String |
| CreatedDate | Invoice creation date | Datetime |
| ClosedDate | Date when the invoice was closed | Datetime |
InvoiceApprovals Schema Joins
The InvoiceApprovals schema has relationships with the following schemas:
| Schema | Relationship Column | Description |
|---|---|---|
| Invoices | InvoiceId | Relates the InvoiceApprovals rows with the Invoices rows |
| Users | ApproveId | Relates the InvoiceApprovals rows with the Users rows |
| Users | AssignedUserId | Relates the InvoiceApprovals rows with the Users rows |
InvoiceAttributes
| Column | Description | Type |
|---|---|---|
| Id | Internal identifier | String |
| TenantId | Customer identifier | String |
| UpdatedAt | Date of the last update of the record | Datetime |
| SnapshotAt | Reference date of the transaction. | Datetime |
| InvoiceId | Primary key for the Invoices schema | String |
| Name | Attribute name | String |
| Description | Attribute description | String |
| Value | Attribute value | String |
| AttributeId | Indicates the ID of the attribute filled for a given invoice | String |
InvoiceAttributes Schema Joins
The InvoiceAttributes schema has relationships with the following schemas:
| Schema | Relationship Column | Description |
|---|---|---|
| Invoices | InvoiceId | Relates the InvoiceAttributes rows with the Invoices rows |
| InvoiceItems | InvoiceId | Relates the InvoiceAttributes rows with the InvoiceItems rows |
| InvoiceItemOrders | InvoiceId | Relates the InvoiceAttributes rows with the InvoiceItemOrders rows |
InvoiceItemAttributes
| Column | Description | Type |
|---|---|---|
| Id | Internal identifier | String |
| TenantId | Customer identifier | String |
| UpdatedAt | Date of the last update of the record | Datetime |
| SnapshotAt | Reference date of the transaction. | Datetime |
| InvoiceId | Primary key for the Invoices schema | String |
| InvoiceItemId | Item on the Invoice | String |
| Name | Attribute name | String |
| Description | Attribute description | String |
| Value | Attribute value | String |
| AttributeId | Indicates the ID of the item attribute filled for a given invoice | String |
InvoiceItemAttributes Schema Joins
The InvoiceItemAttributes schema has relationships with the following schemas:
| Schema | Relationship Column | Description |
|---|---|---|
| Invoices | InvoiceId | Relates the InvoiceItemAttributes rows with the Invoices rows |
| InvoiceItems | InvoiceId | Relates the InvoiceItemAttributes rows with the InvoiceItems rows |
| InvoiceItemOrders | InvoiceId | Relates the InvoiceItemAttributes rows with the InvoiceItemOrders rows |
InvoiceAttachments
| Column | Description | Type |
|---|---|---|
| Id | Internal identifier | String |
| TenantId | Customer identifier | String |
| UpdatedAt | Date of the last update of the record | Datetime |
| SnapshotAt | Reference date of the transaction. | Datetime |
| AttachmentId | Attachment identifier | Integer |
| AttachmentDocumentId | Document identifier for the attachment | String |
| Type | Type of attachment | String |
| Name | Name of the attachment (file name) | String |
| InvoiceId | Primary key for the Invoices schema | String |
InvoiceAttachments Schema Joins
The InvoiceAttachments schema has relationships with the following schemas:
| Schema | Relationship Column | Description |
|---|---|---|
| Invoices | InvoiceId | Relates the InvoiceAttachments rows with the Invoices rows |