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
|
|
|
|
|
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 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.
|