Invoice Entries Report
This template generates a report on invoice entries from Xero, breaking down the data by year and month. It gives detailed information on each invoice entry including various attributes such as invoice ID, description, quantity, and so on.
- Grain
- See the notes
- Built from
- 2Raw tables
- 1Core
- 1Analytics
- Reads from Xero
- invoiceinvoice_line_item
- Ships as
- Weld and dbt SQL, open source on GitHub
1-- core.xero.invoice_entries_report
2-- Invoice Entries Report. This template generates a report on invoice entries from
3-- Xero, breaking down the data by year and month. It gives detailed information on
4-- each invoice entry including various attributes such as invoice ID, description,
5-- quantity, and so on.
6--
7-- From the weld.app template library. Not reconciled against Xero;
8-- check the output against the source before relying on it.
9
10SELECT
11EXTRACT(YEAR FROM i.date) AS year,
12EXTRACT(MONTH FROM i.date) AS month,
13ili.invoice_id,
14ili.description,
15ili.quantity,
16ili.unit_amount,
17ili.tax_type,
18ili.tax_amount,
19ili.line_amount,
20ili.account_code,
21ili.item_item_id,
22ili.item_name,
23ili.item_code,
24ili.tracking,
25ili.line_item_id
26FROM
27{{raw.xero.invoice_line_item}} ili
28-- Join the invoice table to get the date of each invoice
29JOIN
30{{raw.xero.invoice}} i ON ili.invoice_id = i.invoice_id
31GROUP BY
321,2,
33ili.invoice_id,
34ili.description,
35ili.quantity,
36ili.unit_amount,
37ili.tax_type,
38ili.tax_amount,
39ili.line_amount,
40ili.account_code,This model and the 1 it depends on. Deploy them together; refs like {{staging.…}} resolve to the matching folders in Weld, and the dbt view uses source() and ref().
How it counts. And where it stops.
Leveraging SQL’s EXTRACT function, this template helps in extracting detailed data on Xero invoice entries by segregating it based on the year and month. The report encompasses vital details of each invoice including invoice ID, description, quantity, unit amount, tax type, and much more. It not only facilitates a meticulous representation of each entry but also empowers users to have a streamlined access to exhaustive data, promoting informed decision-making in financial management and reporting.
Raw tables it reads
- raw.xero.invoice
- raw.xero.invoice_line_item
Put Xero in front
of your agents.
Connect Xero, deploy the models, and ask questions in Claude, Cursor or ChatGPT. Free for 14 days, no credit card.