Host Resolution model for report
This commit is contained in:
parent
ca5be5c3cf
commit
16bf7f1d6c
4 changed files with 191 additions and 8 deletions
35
models/reporting/xero/xero__host_resolutions_payments.sql
Normal file
35
models/reporting/xero/xero__host_resolutions_payments.sql
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
with
|
||||
int_xero__host_resolutions_payments as (
|
||||
select * from {{ ref("int_xero__host_resolutions_payments") }}
|
||||
),
|
||||
xero__contacts as (select * from {{ ref("xero__contacts") }})
|
||||
select
|
||||
hrp.id_line_item,
|
||||
hrp.document_class,
|
||||
hrp.id_account,
|
||||
hrp.account_code,
|
||||
hrp.account_name,
|
||||
hrp.line_description,
|
||||
hrp.transaction_date_utc,
|
||||
hrp.quantity,
|
||||
hrp.unit_amount,
|
||||
hrp.line_amount_local_curr,
|
||||
hrp.line_amount_in_gbp,
|
||||
hrp.line_amount_wo_taxes_local_curr,
|
||||
hrp.line_amount_wo_taxes_in_gbp,
|
||||
hrp.tax_amount_local_curr,
|
||||
hrp.tax_amount_in_gbp,
|
||||
hrp.transaction_currency_iso_4217,
|
||||
hrp.id_contact,
|
||||
hrp.id_deal,
|
||||
c.account_number,
|
||||
c.contact_name,
|
||||
c.is_customer,
|
||||
c.is_supplier,
|
||||
c.contact_first_name,
|
||||
c.contact_last_name,
|
||||
c.email_addresses,
|
||||
c.contact_number,
|
||||
c.contact_status
|
||||
from int_xero__host_resolutions_payments hrp
|
||||
left join xero__contacts c on c.id_contact = hrp.id_contact
|
||||
Loading…
Add table
Add a link
Reference in a new issue