2024-05-15 19:20:59 +02:00
|
|
|
version: 2
|
|
|
|
|
|
|
|
|
|
models:
|
|
|
|
|
- name: xero__invoices
|
|
|
|
|
description: |
|
2024-05-16 15:47:12 +02:00
|
|
|
Invoices that we have raised within our accounting books.
|
2024-05-15 19:20:59 +02:00
|
|
|
|
2024-05-16 15:47:12 +02:00
|
|
|
This includes both our invoices towards customers and invoices provided by our suppliers.
|
|
|
|
|
|
|
|
|
|
You can read more here: https://developer.xero.com/documentation/api/accounting/invoices
|
2024-05-15 19:20:59 +02:00
|
|
|
|
|
|
|
|
columns:
|
|
|
|
|
- name: id_invoice
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: Xero's unique identifier for the invoice.
|
|
|
|
|
|
|
|
|
|
- name: id_contact
|
|
|
|
|
data_type: text
|
|
|
|
|
description: |
|
|
|
|
|
The ID of the contact related to this invoice.
|
|
|
|
|
|
|
|
|
|
The customer if it's an Accounts Receivables one, the supplier if it's an Accounts Payables one.
|
|
|
|
|
|
|
|
|
|
You can use this to join with the contacts table.
|
|
|
|
|
|
|
|
|
|
- name: reference
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: |
|
|
|
|
|
The Superhog-set reference for the invoices. Only relevant for
|
2024-05-16 15:47:12 +02:00
|
|
|
records of invoice type (ACCREC).
|
2024-05-15 19:20:59 +02:00
|
|
|
|
|
|
|
|
- name: invoice_number
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: invoice_issued_date_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: Date on which the invoice was issued.
|
|
|
|
|
|
|
|
|
|
- name: invoice_due_date_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: The date were the invoice should be paid the latest.
|
|
|
|
|
|
|
|
|
|
- name: was_fully_paid_on_date_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: |
|
|
|
|
|
The date on which the invoice was fully paid. If the invoice is still
|
|
|
|
|
not fully paid, it returns null.
|
|
|
|
|
|
|
|
|
|
- name: invoice_type
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: |
|
|
|
|
|
This field indicates whether the invoice is from Superhog towards a customer
|
|
|
|
|
(value is "ACCREC") or from a supplier towards Superhog (value is "ACCPAY").
|
|
|
|
|
|
|
|
|
|
- name: invoice_currency_iso_4217
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: The ISO 4217 code for the currency which this invoice uses as unit of account.
|
|
|
|
|
|
|
|
|
|
- name: exchange_rate_to_gbp
|
|
|
|
|
data_type: numeric
|
2024-05-16 15:47:12 +02:00
|
|
|
description: |
|
2024-05-15 19:20:59 +02:00
|
|
|
The implied exchange rate between the invoice currency and GBP.
|
2024-05-16 15:47:12 +02:00
|
|
|
|
2024-05-15 19:20:59 +02:00
|
|
|
This is the XXX to GBP rate. So the number represented in this field is the units of currency GBP
|
|
|
|
|
that 1 unit of XXX buys you.
|
|
|
|
|
|
|
|
|
|
For example, if the invoice is 135 ZAR, and this rate is 0.0167, the invoice value in GBP is 2.25
|
|
|
|
|
(135ZAR * 0.0167GBP/ZAR = 2.25GBP).
|
|
|
|
|
|
|
|
|
|
- name: total_amount_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total amount to be paid, in the currency the invoice is denominated in.
|
|
|
|
|
|
|
|
|
|
- name: total_amount_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total amount to be paid, converted to GBP.
|
|
|
|
|
|
|
|
|
|
- name: total_amount_wo_tax_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total amount to be paid minus taxes, in the currency the invoice is denominated in.
|
|
|
|
|
|
|
|
|
|
- name: total_amount_wo_tax_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total amount to be paid minus taxes, converted to GBP.
|
|
|
|
|
|
|
|
|
|
- name: total_tax_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total tax, in the currency the invoice is denominated in.
|
|
|
|
|
|
|
|
|
|
- name: total_tax_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total tax, converted to GBP.
|
|
|
|
|
|
|
|
|
|
- name: total_due_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total amount outstanding right now, in the currency the invoice is denominated in.
|
|
|
|
|
|
|
|
|
|
- name: total_due_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total amount outstanding right now, converted to GBP.
|
|
|
|
|
|
|
|
|
|
- name: total_paid_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total amount that has already been paid, in the currency the invoice is denominated in.
|
|
|
|
|
|
|
|
|
|
- name: total_paid_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total amount that has already been paid, in GBP.
|
|
|
|
|
|
|
|
|
|
- name: invoice_status
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: |
|
|
|
|
|
The status of the invoice.
|
|
|
|
|
|
|
|
|
|
Can be one of: PAID, VOIDED, DRAFT, DELETED, AUTHORISED, SUBMITTED.
|
|
|
|
|
|
|
|
|
|
You can read more here: https://developer.xero.com/documentation/api/accounting/types#invoices
|
|
|
|
|
|
|
|
|
|
- name: has_errors
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: is_discounted
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: date_string
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: due_date_string
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: has_been_sent_to_contact
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: total_discount
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: total_credited_local_curr
|
|
|
|
|
data_type: numeric
|
2024-05-16 15:47:12 +02:00
|
|
|
description:
|
|
|
|
|
Total amount credited by related credit notes, over-payments and
|
2024-05-15 19:20:59 +02:00
|
|
|
pre-payments.
|
|
|
|
|
|
|
|
|
|
- name: has_attachments
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: Flag indicating if the invoice has an attachment.
|
|
|
|
|
|
|
|
|
|
- name: updated_at_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: updated_date_utc
|
|
|
|
|
data_type: date
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: line_amount_tax_inclusiveness
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: |
|
|
|
|
|
Indicates whether the amounts included in line items are tax
|
|
|
|
|
inclusive (Inclusive), tax exclusive (Exclusive) or simply,
|
|
|
|
|
there are no taxes on the invoice (NoTax).
|
|
|
|
|
|
|
|
|
|
- name: payment_planned_date_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: payment_expected_date_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: dwh_extracted_at_utc
|
|
|
|
|
data_type: timestamp with time zone
|
2024-05-16 15:47:12 +02:00
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: xero__invoice_line_items
|
|
|
|
|
description: |
|
|
|
|
|
Invoice line items. Every record corresponds to a Line Item in Xero.
|
|
|
|
|
|
|
|
|
|
A Line Item is a combination of a specific service or item being sold,
|
|
|
|
|
together with its quantity, price, total amount and taxes.
|
|
|
|
|
|
|
|
|
|
You can read more here: https://developer.xero.com/documentation/api/accounting/invoices
|
|
|
|
|
|
|
|
|
|
columns:
|
|
|
|
|
- name: id_invoice
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: Xero's unique identifier for the invoice.
|
|
|
|
|
|
|
|
|
|
- name: id_line_item
|
|
|
|
|
data_type: text
|
|
|
|
|
description: Xero's unique identifier for the line item.
|
|
|
|
|
|
|
|
|
|
- name: id_item
|
|
|
|
|
data_type: text
|
|
|
|
|
description: Xero's unique identifier for the item of this line.
|
|
|
|
|
|
|
|
|
|
- name: item_code
|
|
|
|
|
data_type: text
|
|
|
|
|
description: A text based code that describes the Item.
|
|
|
|
|
|
|
|
|
|
- name: quantity
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: How much of the item is sold in its invoice.
|
|
|
|
|
|
|
|
|
|
- name: unit_amount
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The price of each unit of the item.
|
|
|
|
|
|
|
|
|
|
- name: line_amount_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
The total value to be charged for this line, in local currency.
|
|
|
|
|
|
|
|
|
|
- name: line_amount_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total value to be charged for this line, in GBP.
|
|
|
|
|
|
|
|
|
|
- name: line_amount_wo_taxes_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
The total value to be charged for this line, minus taxes, in local
|
|
|
|
|
currency.
|
|
|
|
|
|
|
|
|
|
In some cases, this will be the same value as the line amount. This
|
|
|
|
|
depends on whether there is any tax in the invoice, and whether the
|
|
|
|
|
invoice amounts are tax inclusive or tax exclusive. You can find this
|
|
|
|
|
out in the details of the invoice this line item belongs to.
|
|
|
|
|
|
|
|
|
|
- name: line_amount_wo_taxes_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
The total value to be charged for this line, minus taxes, in GBP.
|
|
|
|
|
|
|
|
|
|
In some cases, this will be the same value as the line amount. This
|
|
|
|
|
depends on whether there is any tax in the invoice, and whether the
|
|
|
|
|
invoice amounts are tax inclusive or tax exclusive. You can find this
|
|
|
|
|
out in the details of the invoice this line item belongs to.
|
|
|
|
|
|
|
|
|
|
- name: tax_amount_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total value of taxes for this line, in local currency.
|
|
|
|
|
|
|
|
|
|
- name: tax_amount_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total value of taxes for this line, in GBP.
|
|
|
|
|
|
|
|
|
|
- name: tax_type
|
|
|
|
|
data_type: text
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: invoice_currency_iso_4217
|
|
|
|
|
data_type: character varying
|
2024-05-16 16:02:23 +02:00
|
|
|
description: |
|
2024-05-16 15:47:12 +02:00
|
|
|
The currency in which this line item amounts are defined.
|
|
|
|
|
|
|
|
|
|
Line items don't really have a currency definition of its own, this
|
|
|
|
|
field is populated for your convenience when working with this data.
|
|
|
|
|
The invoice currency is defined at the invoice level, and the values
|
|
|
|
|
you see in this field should always be the same as the currency of
|
|
|
|
|
the invoice this line item belongs to.
|
|
|
|
|
|
|
|
|
|
- name: line_description
|
|
|
|
|
data_type: text
|
|
|
|
|
description: A text description of the line item.
|
2024-05-16 16:02:23 +02:00
|
|
|
- name: xero__contacts
|
|
|
|
|
description: |
|
|
|
|
|
Xero contacts identify other parties we transact with: customers, suppliers, employees, etc.
|
|
|
|
|
|
|
|
|
|
The most interesting contacts are our customers.
|
|
|
|
|
columns:
|
|
|
|
|
- name: id_contact
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: Xero's unique identifier for the contact.
|
|
|
|
|
|
|
|
|
|
- name: account_number
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: A Superhog set identifier. For customers, this is Hubspot's Deal Id.
|
|
|
|
|
|
|
|
|
|
- name: id_deal
|
|
|
|
|
data_type: text
|
2024-05-16 16:22:41 +02:00
|
|
|
description: |
|
2024-05-16 16:02:23 +02:00
|
|
|
For those account numbers that look like a Deal Id, we extract them
|
|
|
|
|
into this field. Other contacs will have a blank.
|
|
|
|
|
|
|
|
|
|
You can use this to find specific deal ids or even as a proxy bool to
|
|
|
|
|
keep or remove deal id customers.
|
|
|
|
|
|
|
|
|
|
- name: contact_name
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: The name for the customer.
|
|
|
|
|
|
|
|
|
|
- name: is_customer
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: Flag that shows if the contact is a Superhog customer.
|
|
|
|
|
|
|
|
|
|
- name: is_supplier
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: Flag that shows if the contact is a Superhog supplier.
|
|
|
|
|
|
|
|
|
|
- name: tax_number
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: Tax number for this contact.
|
|
|
|
|
|
|
|
|
|
- name: contact_first_name
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: contact_last_name
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: phones
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: website
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: balances
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: discount
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: addresses
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: attachments
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: email_addresses
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: payment_terms
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: batch_payments
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: branding_theme
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: contact_groups
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: contact_number
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: contact_status
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: skyper_user_name
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: contact_persons
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: has_attachments
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: updated_at_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: updated_date_utc
|
|
|
|
|
data_type: date
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: xero_network_key
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: default_currency_iso_4217
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: |
|
|
|
|
|
The default currency used to interact with this contact.
|
2024-05-16 16:22:41 +02:00
|
|
|
|
2024-05-16 16:02:23 +02:00
|
|
|
For customers, this is the currency we will usually use to invoice.
|
|
|
|
|
|
|
|
|
|
- name: validation_errors
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: bank_account_details
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: has_validation_errors
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: tracking_category_name
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: account_payable_tax_type
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: tracking_category_option
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: sales_default_account_code
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: sales_tracking_categories
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: account_receivable_tax_type
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: purchases_default_account_code
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: purchases_tracking_categories
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: dwh_extracted_at_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
2024-05-22 11:45:04 +02:00
|
|
|
- name: xero__credit_notes
|
|
|
|
|
description: |
|
|
|
|
|
Credit notes that we have raised within our accounting books.
|
|
|
|
|
|
|
|
|
|
A credit note is a document representing a refund or decrease in invoiced
|
|
|
|
|
amount to a customer. For clarity, if we make an invoice charging someone
|
|
|
|
|
100$, and we realise afterward that we should have charged him just 75$,
|
|
|
|
|
we will solve the situation by creating a credit note for them with 25$.
|
|
|
|
|
|
|
|
|
|
Credit notes can be associated to a specific invoice for a customer, or
|
|
|
|
|
can be standalone documents.
|
|
|
|
|
|
|
|
|
|
The data structure of credit notes it's pretty much identical to that of
|
|
|
|
|
invoices, with the way money is owed being the only difference.
|
|
|
|
|
|
|
|
|
|
You can read more here: https://developer.xero.com/documentation/api/accounting/creditnotes
|
|
|
|
|
|
|
|
|
|
columns:
|
|
|
|
|
- name: id_credit_note
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: Xero's unique identifier for the credit note.
|
|
|
|
|
|
|
|
|
|
- name: id_contact
|
|
|
|
|
data_type: text
|
|
|
|
|
description: |
|
|
|
|
|
The ID of the contact related to this credit note.
|
|
|
|
|
|
|
|
|
|
You can use this to join with the contacts table.
|
|
|
|
|
|
|
|
|
|
- name: reference
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: |
|
2024-06-25 16:42:40 +02:00
|
|
|
The Superhog-set reference for the credit note.
|
2024-05-22 11:45:04 +02:00
|
|
|
|
|
|
|
|
- name: credit_note_number
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: credit_note_issued_at_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: Date on which the credit note was issued.
|
|
|
|
|
|
|
|
|
|
- name: credit_note_issued_date_utc
|
|
|
|
|
data_type: date
|
|
|
|
|
description: The date were the invoice should be paid the latest.
|
|
|
|
|
|
|
|
|
|
- name: credit_note_type
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: |
|
|
|
|
|
Indicates whether the credit note is an Accounts Receivable Credit
|
|
|
|
|
Note (ACCRECCREDIT) or an Accounts Payable Credit Note
|
|
|
|
|
(ACCPAYCREDIT).
|
|
|
|
|
|
|
|
|
|
Most documents in our company will be ACCRECCREDIT, related to our
|
|
|
|
|
own customers.
|
|
|
|
|
|
|
|
|
|
- name: credit_note_currency_iso_4217
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: |
|
2024-06-25 16:42:40 +02:00
|
|
|
|
2024-05-22 11:45:04 +02:00
|
|
|
The ISO 4217 code for the currency which this credit note uses as
|
|
|
|
|
unit of account.
|
|
|
|
|
|
|
|
|
|
- name: exchange_rate_to_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
The implied exchange rate between the invoice currency and GBP.
|
|
|
|
|
|
|
|
|
|
This is the XXX to GBP rate. So the number represented in this field
|
|
|
|
|
is the units of currency GBP that 1 unit of XXX buys you.
|
|
|
|
|
|
|
|
|
|
For example, if the invoice is 135 ZAR, and this rate is 0.0167, the
|
|
|
|
|
invoice value in GBP is 2.25 (135ZAR * 0.0167GBP/ZAR = 2.25GBP).
|
|
|
|
|
|
|
|
|
|
- name: total_amount_local_curr
|
|
|
|
|
data_type: numeric
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
2024-05-22 11:45:04 +02:00
|
|
|
The total amount to be credited, in the currency the note is
|
|
|
|
|
denominated in.
|
|
|
|
|
|
|
|
|
|
- name: total_amount_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total amount to be credited, converted to GBP.
|
|
|
|
|
|
|
|
|
|
- name: subtotal_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
2024-06-25 16:42:40 +02:00
|
|
|
The total amount to be credited minus taxes, in the currency the
|
|
|
|
|
note is denominated in.
|
2024-05-22 11:45:04 +02:00
|
|
|
|
|
|
|
|
- name: subtotal_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total amount to be credited minus taxes, in GBP.
|
|
|
|
|
|
|
|
|
|
- name: total_tax_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
The total tax, in the currency the credit note is denominated in.
|
|
|
|
|
|
|
|
|
|
- name: total_tax_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total tax, in GBP.
|
|
|
|
|
|
|
|
|
|
- name: remaining_credit_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: remaining_credit_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: applied_amount
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: credit_note_status
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: |
|
|
|
|
|
The status of the credit note.
|
|
|
|
|
|
|
|
|
|
Can be one of: PAID, VOIDED, DRAFT, DELETED, AUTHORISED, SUBMITTED.
|
|
|
|
|
|
|
|
|
|
- name: credit_note_due_date
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: date_string
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: due_date_string
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: allocations
|
|
|
|
|
data_type: jsonb
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: has_been_sent_to_contact
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: has_attachments
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: updated_at_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: id_branding_theme
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: was_fully_paid_on_date_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: line_amount_tax_inclusiveness
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: |
|
|
|
|
|
Indicates whether the amounts included in line items are tax
|
|
|
|
|
inclusive (Inclusive), tax exclusive (Exclusive) or simply,
|
|
|
|
|
there are no taxes on the invoice (NoTax).
|
|
|
|
|
|
|
|
|
|
- name: updated_date_utc
|
|
|
|
|
data_type: date
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: dwh_extracted_at_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
- name: xero__credit_note_line_items
|
|
|
|
|
description: |
|
|
|
|
|
Credit note line items. Every record corresponds to a Line Item in Xero.
|
|
|
|
|
|
|
|
|
|
A Line Item is a combination of a specific service or item being credited,
|
|
|
|
|
together with its quantity, price, total amount and taxes.
|
|
|
|
|
|
|
|
|
|
You can read more here: https://developer.xero.com/documentation/api/accounting/invoices
|
|
|
|
|
|
|
|
|
|
columns:
|
|
|
|
|
- name: id_credit_note
|
|
|
|
|
data_type: character varying
|
2024-06-25 16:42:40 +02:00
|
|
|
description: Xero's unique identifier for the credit note.
|
2024-05-22 11:45:04 +02:00
|
|
|
|
|
|
|
|
- name: id_line_item
|
|
|
|
|
data_type: text
|
|
|
|
|
description: Xero's unique identifier for the line item.
|
|
|
|
|
|
|
|
|
|
- name: id_item
|
|
|
|
|
data_type: text
|
|
|
|
|
description: Xero's unique identifier for the item of this line.
|
|
|
|
|
|
|
|
|
|
- name: item_code
|
|
|
|
|
data_type: text
|
|
|
|
|
description: A text based code that describes the Item.
|
|
|
|
|
|
|
|
|
|
- name: quantity
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: How much of the item is credited in this credit note.
|
|
|
|
|
|
|
|
|
|
- name: unit_amount
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The price of each unit of the item.
|
|
|
|
|
|
|
|
|
|
- name: line_amount_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
The total value to be charged for this line, in local currency.
|
|
|
|
|
|
|
|
|
|
- name: line_amount_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total value to be charged for this line, in GBP.
|
|
|
|
|
|
|
|
|
|
- name: line_amount_wo_taxes_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
The total value to be charged for this line, minus taxes, in local
|
|
|
|
|
currency.
|
|
|
|
|
|
|
|
|
|
In some cases, this will be the same value as the line amount. This
|
|
|
|
|
depends on whether there is any tax in the credit note, and whether
|
|
|
|
|
the credit note amounts are tax inclusive or tax exclusive. You can
|
|
|
|
|
find this out in the details of the credit note this line item belongs
|
|
|
|
|
to.
|
|
|
|
|
|
|
|
|
|
- name: line_amount_wo_taxes_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
The total value to be charged for this line, minus taxes, in GBP.
|
|
|
|
|
|
|
|
|
|
In some cases, this will be the same value as the line amount. This
|
|
|
|
|
depends on whether there is any tax in the credit note, and whether
|
|
|
|
|
the credit note amounts are tax inclusive or tax exclusive. You can
|
|
|
|
|
find this out in the details of the credit note this line item belongs
|
|
|
|
|
to.
|
|
|
|
|
|
|
|
|
|
- name: tax_amount_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total value of taxes for this line, in local currency.
|
|
|
|
|
|
|
|
|
|
- name: tax_amount_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total value of taxes for this line, in GBP.
|
|
|
|
|
|
|
|
|
|
- name: tax_type
|
|
|
|
|
data_type: text
|
|
|
|
|
description: ""
|
|
|
|
|
|
2024-05-23 15:22:42 +02:00
|
|
|
- name: credit_note_currency_iso_4217
|
2024-05-22 11:45:04 +02:00
|
|
|
data_type: character varying
|
|
|
|
|
description: |
|
|
|
|
|
The currency in which this line item amounts are defined.
|
|
|
|
|
|
|
|
|
|
Line items don't really have a currency definition of its own, this
|
|
|
|
|
field is populated for your convenience when working with this data.
|
|
|
|
|
The credit note currency is defined at the credit note level, and the
|
|
|
|
|
values you see in this field should always be the same as the currency
|
|
|
|
|
of the credit note this line item belongs to.
|
|
|
|
|
|
|
|
|
|
- name: line_description
|
|
|
|
|
data_type: text
|
|
|
|
|
description: A text description of the line item.
|
2024-05-23 15:22:42 +02:00
|
|
|
- name: xero__net_fees
|
|
|
|
|
description: |
|
|
|
|
|
A summary aggregation table showing the total raw and net fees by month
|
|
|
|
|
and year.
|
|
|
|
|
|
|
|
|
|
Information comes from both Invoices and Credit notes.
|
|
|
|
|
|
|
|
|
|
Only documents in statuses ('PAID', 'AUTHORISED') are kept.
|
|
|
|
|
|
|
|
|
|
Net fees get computed by subtracting credited amounts from invoiced
|
|
|
|
|
amounts.
|
|
|
|
|
|
|
|
|
|
columns:
|
2024-05-30 10:37:41 +00:00
|
|
|
- name: issued_year_month
|
|
|
|
|
data_type: date
|
|
|
|
|
description: The issuing year and month of the aggregated documents.
|
2024-05-23 15:22:42 +02:00
|
|
|
|
|
|
|
|
- name: fee_category
|
|
|
|
|
data_type: text
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
2024-05-23 15:22:42 +02:00
|
|
|
A fee category, one of out of booking_fees, listing_fees,
|
2024-05-30 09:15:53 +02:00
|
|
|
verification_fees, waiver fees.
|
|
|
|
|
|
|
|
|
|
- name: fees_invoiced_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total sum of invoiced fees.
|
|
|
|
|
|
|
|
|
|
- name: fees_credited_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total sum of credited fees.
|
|
|
|
|
|
|
|
|
|
- name: net_fees_in_gbp
|
|
|
|
|
data_type: numeric
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
2024-05-30 09:15:53 +02:00
|
|
|
Net fees are calculated by subtracting credited fees from invoiced
|
|
|
|
|
fees. It might be the case that net fees are negative in some month,
|
|
|
|
|
if it happens to be that we have given back to customers more than we
|
|
|
|
|
have invoiced them.
|
|
|
|
|
|
|
|
|
|
- name: xero__net_fees_by_deal
|
|
|
|
|
description: |
|
|
|
|
|
A summary aggregation table showing the total raw and net fees by month
|
|
|
|
|
and year, dedicated for deal attribution.
|
|
|
|
|
|
|
|
|
|
Information comes from both Invoices and Credit notes.
|
|
|
|
|
|
|
|
|
|
Only documents in statuses ('PAID', 'AUTHORISED') are kept.
|
|
|
|
|
|
|
|
|
|
Net fees get computed by subtracting credited amounts from invoiced
|
|
|
|
|
amounts.
|
|
|
|
|
|
|
|
|
|
columns:
|
2024-05-30 10:37:41 +00:00
|
|
|
- name: issued_year_month
|
|
|
|
|
data_type: date
|
|
|
|
|
description: The issuing year and month of the aggregated documents.
|
2024-05-30 09:15:53 +02:00
|
|
|
|
2024-05-30 10:03:05 +02:00
|
|
|
- name: id_deal
|
2024-05-30 09:15:53 +02:00
|
|
|
data_type: text
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
2024-05-30 10:00:39 +02:00
|
|
|
A fee category per deal.
|
2024-05-23 15:22:42 +02:00
|
|
|
|
|
|
|
|
- name: fees_invoiced_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total sum of invoiced fees.
|
|
|
|
|
|
|
|
|
|
- name: fees_credited_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The total sum of credited fees.
|
|
|
|
|
|
|
|
|
|
- name: net_fees_in_gbp
|
|
|
|
|
data_type: numeric
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
2024-05-23 15:22:42 +02:00
|
|
|
Net fees are calculated by subtracting credited fees from invoiced
|
|
|
|
|
fees. It might be the case that net fees are negative in some month,
|
|
|
|
|
if it happens to be that we have given back to customers more than we
|
|
|
|
|
have invoiced them.
|
2024-06-25 16:16:28 +02:00
|
|
|
- name: xero__bank_transactions
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
Bank transactions that have happened in any of our bank accounts.
|
|
|
|
|
|
|
|
|
|
You can read more here: https://developer.xero.com/documentation/api/accounting/banktransactions
|
|
|
|
|
|
2024-06-25 16:16:28 +02:00
|
|
|
columns:
|
|
|
|
|
- name: id_bank_transaction
|
|
|
|
|
data_type: character varying
|
2024-06-25 16:42:40 +02:00
|
|
|
description: Xero's unique identifier for the transaction.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- unique
|
|
|
|
|
|
2024-06-25 16:16:28 +02:00
|
|
|
- name: id_prepayment
|
|
|
|
|
data_type: character varying
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
Xero generated identifier for a Prepayment (unique within
|
|
|
|
|
organisations). This will be returned on BankTransactions with a Type
|
|
|
|
|
of SPEND-PREPAYMENT or RECEIVE-PREPAYMENT.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: id_overpayment
|
|
|
|
|
data_type: character varying
|
2024-06-25 16:42:40 +02:00
|
|
|
description: Xero generated identifier for an Overpayment (unique within
|
|
|
|
|
organisations). This will be returned on BankTransactions with a Type
|
|
|
|
|
of SPEND-OVERPAYMENT or RECEIVE-OVERPAYMENT.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: id_contact
|
|
|
|
|
data_type: text
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
Xero's unique id for the contact related to this transaction.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: id_bank_account
|
|
|
|
|
data_type: text
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
Xero's unique id for the bank account related to this transaction.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: reference
|
|
|
|
|
data_type: character varying
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
Reference for the transaction. Only supported for SPEND and RECEIVE
|
|
|
|
|
transactions.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: transaction_type
|
|
|
|
|
data_type: character varying
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
What kind of transaction is this record.
|
|
|
|
|
|
2024-07-01 11:34:26 +02:00
|
|
|
Can be one of: RECEIVE, RECEIVE-OVERPAYMENT, RECEIVE-PREPAYMENT,
|
|
|
|
|
SPEND, SPEND-OVERPAYMENT, SPEND-PREPAYMENT, RECEIVE-TRANSFER,
|
|
|
|
|
SPEND-TRANSFER
|
|
|
|
|
|
|
|
|
|
The type will affect the sign of all amounts. Amounts we send are
|
|
|
|
|
negative, amounts we receive are positive.
|
2024-06-25 16:42:40 +02:00
|
|
|
|
|
|
|
|
You can read more here: https://developer.xero.com/documentation/api/accounting/types#bank-transactions
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- RECEIVE
|
|
|
|
|
- RECEIVE-OVERPAYMENT
|
|
|
|
|
- RECEIVE-PREPAYMENT
|
|
|
|
|
- SPEND
|
|
|
|
|
- SPEND-OVERPAYMENT
|
|
|
|
|
- SPEND-PREPAYMENT
|
|
|
|
|
- RECEIVE-TRANSFER
|
|
|
|
|
- SPEND-TRANSFER
|
|
|
|
|
|
2024-07-01 11:39:40 +02:00
|
|
|
- name: transaction_sign
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
The sign for the transactions. Spending transactions show as -1,
|
|
|
|
|
receiving transactions show as 1. This helps in converting the
|
|
|
|
|
transaction amounts in the right sign, since Xero brings all amounts
|
|
|
|
|
as positive by default.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- 1
|
|
|
|
|
- -1
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: transaction_status
|
|
|
|
|
data_type: character varying
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
The status of this transaction.
|
|
|
|
|
|
|
|
|
|
Can be one of: AUTHORISED, DELETED.
|
|
|
|
|
|
|
|
|
|
You can read more here: https://developer.xero.com/documentation/api/accounting/types#bank-transaction-status-codes
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- AUTHORISED
|
|
|
|
|
- DELETED
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: transaction_at_utc
|
|
|
|
|
data_type: timestamp with time zone
|
2024-06-25 17:09:02 +02:00
|
|
|
description: When did the transaction happen.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: transaction_date_utc
|
|
|
|
|
data_type: date
|
2024-06-25 17:09:02 +02:00
|
|
|
description: The date on which the transaction happened.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: date_string
|
|
|
|
|
data_type: timestamp with time zone
|
2024-06-25 16:42:40 +02:00
|
|
|
description: When did the transaction happened, as a string.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: total_amount_local_curr
|
|
|
|
|
data_type: numeric
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
Total of bank transaction tax inclusive, in the currency the
|
|
|
|
|
transaction is denominated in.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: total_amount_in_gbp
|
|
|
|
|
data_type: numeric
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
Total of bank transaction tax inclusive, presented in GBP.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: total_amount_wo_tax_local_curr
|
|
|
|
|
data_type: numeric
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
Total of bank transaction excluding taxes, in the currency the
|
|
|
|
|
transaction is denominated in.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: total_amount_wo_tax_in_gbp
|
|
|
|
|
data_type: numeric
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
Total of bank transaction excluding taxes, presented in GBP.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: total_tax_local_curr
|
|
|
|
|
data_type: numeric
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
Total tax on bank transaction, in the currency the transaction is
|
|
|
|
|
denominated in.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: total_tax_in_gbp
|
|
|
|
|
data_type: numeric
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
Total tax on bank transaction, presented in GBP.
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: transaction_currency_iso_4217
|
|
|
|
|
data_type: character varying
|
2024-06-25 16:42:40 +02:00
|
|
|
description: The ISO 4217 code for the currency of the transaction.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- length_between:
|
|
|
|
|
min_length: 3
|
|
|
|
|
max_length: 3
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: exchange_rate_to_gbp
|
|
|
|
|
data_type: numeric
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
|
|
|
|
|
ATTENTION! unlike in many other Xero entities, here this field is not
|
|
|
|
|
completed by Xero always. It has been complemented with the general
|
|
|
|
|
rates data used in the DWH. Xero's rates are preferent, so DWH rates
|
|
|
|
|
will only be used where Xero didn't provide a rate.
|
|
|
|
|
|
|
|
|
|
The implied exchange rate between the transaction currency and GBP.
|
|
|
|
|
|
|
|
|
|
This is the XXX to GBP rate. So the number represented in this field
|
|
|
|
|
is the units of currency GBP that 1 unit of XXX buys you.
|
|
|
|
|
|
|
|
|
|
For example, if the transaction is 135 ZAR, and this rate is 0.0167,
|
|
|
|
|
the transaction value in GBP is 2.25 (135ZAR * 0.0167GBP/ZAR =
|
|
|
|
|
2.25GBP).
|
|
|
|
|
tests:
|
|
|
|
|
- not_negative
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: line_amount_tax_inclusiveness
|
|
|
|
|
data_type: character varying
|
2024-06-25 16:42:40 +02:00
|
|
|
description: |
|
|
|
|
|
Indicates whether the amounts included in line items are tax
|
|
|
|
|
inclusive (Inclusive), tax exclusive (Exclusive) or simply,
|
|
|
|
|
there are no taxes on the invoice (NoTax).
|
|
|
|
|
tests:
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- Inclusive
|
|
|
|
|
- Exclusive
|
|
|
|
|
- NoTax
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: is_reconciled
|
|
|
|
|
data_type: boolean
|
2024-06-25 16:42:40 +02:00
|
|
|
description: A flag indicating if the transaction has been reconciled.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
2024-06-25 16:16:28 +02:00
|
|
|
|
|
|
|
|
- name: has_attachments
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: url
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: external_link_provider_name
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: updated_at_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: updated_date_utc
|
|
|
|
|
data_type: date
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: dwh_extracted_at_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
2024-06-26 11:43:29 +02:00
|
|
|
- name: xero__bank_transaction_line_items
|
|
|
|
|
description: |
|
|
|
|
|
Line item level data for our Bank Transactions.
|
|
|
|
|
|
|
|
|
|
You can read more here: https://developer.xero.com/documentation/api/accounting/banktransactions
|
|
|
|
|
|
|
|
|
|
columns:
|
|
|
|
|
- name: id_bank_transaction
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: Xero's unique identifier for the transaction.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
|
|
|
|
|
- name: id_line_item
|
|
|
|
|
data_type: text
|
|
|
|
|
description: Xero's unique identifier for the line item.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- unique
|
|
|
|
|
|
|
|
|
|
- name: line_description
|
|
|
|
|
data_type: text
|
|
|
|
|
description: A text description of the line item.
|
|
|
|
|
|
|
|
|
|
- name: id_account
|
|
|
|
|
data_type: text
|
|
|
|
|
description: Xero's unique identifier for the related Account.
|
|
|
|
|
|
|
|
|
|
- name: account_code
|
|
|
|
|
data_type: text
|
|
|
|
|
description: Accounting code for the related account.
|
|
|
|
|
|
|
|
|
|
- name: account_name
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: Name for the related account.
|
|
|
|
|
|
|
|
|
|
- name: item_code
|
|
|
|
|
data_type: text
|
|
|
|
|
description: Item code if an item has been specified.
|
|
|
|
|
|
|
|
|
|
- name: quantity
|
|
|
|
|
data_type: numeric
|
2024-06-26 13:40:07 +02:00
|
|
|
description: How much of the item is transferred in this transaction.
|
2024-06-26 11:43:29 +02:00
|
|
|
|
|
|
|
|
- name: unit_amount
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: The quantity-to-money conversion rate for this item.
|
|
|
|
|
|
|
|
|
|
- name: line_amount_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
2024-06-26 13:40:07 +02:00
|
|
|
The total value transferred in this line, in the transaction currency.
|
2024-06-26 11:43:29 +02:00
|
|
|
|
|
|
|
|
- name: line_amount_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
2024-06-26 13:40:07 +02:00
|
|
|
The total value transferred in this line, presented in GBP.
|
2024-06-26 11:43:29 +02:00
|
|
|
|
|
|
|
|
- name: line_amount_wo_taxes_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
2024-06-26 13:40:07 +02:00
|
|
|
The total value transferred in this line, minus taxes, in the
|
2024-06-26 11:43:29 +02:00
|
|
|
transaction currency.
|
|
|
|
|
|
|
|
|
|
In some cases, this will be the same value as the line amount. This
|
|
|
|
|
depends on whether there is any tax in the invoice, and whether the
|
|
|
|
|
invoice amounts are tax inclusive or tax exclusive. You can find this
|
|
|
|
|
out in the details of the transaction this line item belongs to.
|
|
|
|
|
|
|
|
|
|
- name: line_amount_wo_taxes_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
2024-06-26 13:40:07 +02:00
|
|
|
The total value transferred in this line, minus taxes, presented in
|
2024-06-26 11:43:29 +02:00
|
|
|
GBP.
|
|
|
|
|
|
|
|
|
|
In some cases, this will be the same value as the line amount. This
|
|
|
|
|
depends on whether there is any tax in the invoice, and whether the
|
|
|
|
|
invoice amounts are tax inclusive or tax exclusive. You can find this
|
|
|
|
|
out in the details of the transaction this line item belongs to.
|
|
|
|
|
|
|
|
|
|
- name: tax_amount_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
The total value of taxes for this line, in the transaction currency.
|
|
|
|
|
|
|
|
|
|
- name: tax_amount_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: |
|
|
|
|
|
The total value of taxes for this line, presented in GBP.
|
|
|
|
|
|
|
|
|
|
- name: tax_type
|
|
|
|
|
data_type: text
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: transaction_currency_iso_4217
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: |
|
|
|
|
|
The currency in which this line item amounts are defined.
|
|
|
|
|
|
|
|
|
|
Line items don't really have a currency definition of its own, this
|
|
|
|
|
field is populated for your convenience when working with this data.
|
|
|
|
|
The transaction currency is defined at the Bank Transaction level, and
|
|
|
|
|
the values you see in this field should always be the same as the
|
|
|
|
|
currency of the Bank Transaction this line item belongs to.
|
2024-06-26 15:35:44 +02:00
|
|
|
- name: xero__bank_transaction_denom_mart.sql
|
|
|
|
|
description: |
|
|
|
|
|
This model is a denormalized mart, which only exists for presentation
|
|
|
|
|
purposes in a PBI report.
|
|
|
|
|
|
|
|
|
|
The data is the same that lives in `xero__bank_transaction_line_items`,
|
|
|
|
|
`xero__bank_transactions` and `xero__contacts`.
|
|
|
|
|
|
|
|
|
|
The granularity is at line item level, so be careful when doing
|
|
|
|
|
aggregations. Most aggregations on data on the transaction or contact
|
|
|
|
|
level will be wrong due to duplicates.
|
|
|
|
|
|
|
|
|
|
columns:
|
|
|
|
|
- name: id_line_item
|
|
|
|
|
data_type: text
|
|
|
|
|
description: Xero's unique identifier for the line item.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- unique
|
2024-07-09 15:31:47 +02:00
|
|
|
|
|
|
|
|
- name: xero__sales_denom_mart
|
|
|
|
|
description: |
|
|
|
|
|
This table is a denormalized mix of all invoices and credit notes data.
|
|
|
|
|
|
|
|
|
|
It is built by creating a snowflake schema for the invoicing area and
|
|
|
|
|
another one for the crediting area. In both cases, the cardinality is
|
|
|
|
|
*:1 between line items and documents, and *:1 between documents and
|
|
|
|
|
contacts. Then, the invoice and credit note side get unioned to be stored
|
|
|
|
|
in a single structure. The only transformation that happens differently
|
|
|
|
|
across both is that credit note amounts get their sign reversed (* -1) so
|
|
|
|
|
that aggregations happen naturally (credit amounts subtract from invoice
|
|
|
|
|
amounts). The final granularity of the table is on the line item level.
|
|
|
|
|
Invoice and credit note records can be told apart through the
|
|
|
|
|
document_class field.
|
|
|
|
|
|
|
|
|
|
The word _document_ in the context of this table encompasses both invoices
|
|
|
|
|
and credit notes.
|
|
|
|
|
|
|
|
|
|
The source of amounts is identifiable by their prefix. `line_` amount
|
|
|
|
|
fields come from the line items data, while `header_` fields come from the
|
|
|
|
|
document level data. Aggregating line fields can be done without worries.
|
|
|
|
|
Document level data can't be summed or averaged since it's duplicated per
|
|
|
|
|
line item, so be careful with it.
|
|
|
|
|
|
|
|
|
|
Most fields are not documented here: you can find more details in upstream
|
|
|
|
|
models.
|
|
|
|
|
|
|
|
|
|
columns:
|
|
|
|
|
- name: id_line_item
|
|
|
|
|
data_type: text
|
|
|
|
|
description: ""
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- unique
|
|
|
|
|
|
|
|
|
|
- name: id_item
|
|
|
|
|
data_type: text
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: document_class
|
|
|
|
|
data_type: text
|
|
|
|
|
description: |
|
|
|
|
|
Indicates whether the record belongs in an invoice or a credit note.
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- 'invoice'
|
|
|
|
|
- 'credit note'
|
|
|
|
|
|
|
|
|
|
- name: item_code
|
|
|
|
|
data_type: text
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: quantity
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: unit_amount
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: line_amount_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: line_amount_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: line_amount_wo_taxes_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: line_amount_wo_taxes_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: tax_amount_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: tax_amount_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: tax_type
|
|
|
|
|
data_type: text
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: document_currency_iso_4217
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- length_between:
|
|
|
|
|
min_length: 3
|
|
|
|
|
max_length: 3
|
|
|
|
|
|
|
|
|
|
- name: line_description
|
|
|
|
|
data_type: text
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: id_document
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
|
|
|
|
|
- name: reference
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: document_number
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: document_issued_at_utc
|
|
|
|
|
data_type: timestamp with time zone
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: document_issued_date_utc
|
|
|
|
|
data_type: date
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: document_type
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- "ACCREC"
|
|
|
|
|
- "ACCPAY"
|
|
|
|
|
- "ACCRECCREDIT"
|
|
|
|
|
- "ACCPAYCREDIT"
|
|
|
|
|
|
|
|
|
|
- name: document_currency_iso_4217
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: exchange_rate_to_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- not_negative
|
|
|
|
|
|
|
|
|
|
- name: document_status
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- PAID
|
|
|
|
|
- VOIDED
|
|
|
|
|
- DRAFT
|
|
|
|
|
- DELETED
|
|
|
|
|
- AUTHORISED
|
|
|
|
|
- SUBMITTED
|
|
|
|
|
|
|
|
|
|
- name: line_amount_tax_inclusiveness
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
tests:
|
|
|
|
|
- accepted_values:
|
|
|
|
|
values:
|
|
|
|
|
- Inclusive
|
|
|
|
|
- Exclusive
|
|
|
|
|
- NoTax
|
|
|
|
|
|
|
|
|
|
- name: header_total_amount_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: header_total_amount_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: header_total_amount_wo_tax_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: header_total_amount_wo_tax_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: header_total_tax_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: header_total_tax_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: header_total_due_local_curr
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: header_total_due_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: id_contact
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: id_deal
|
|
|
|
|
data_type: text
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: contact_name
|
|
|
|
|
data_type: character varying
|
|
|
|
|
description: ""
|