36 lines
980 B
MySQL
36 lines
980 B
MySQL
|
|
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
|