Excluded host resolutions payments
This commit is contained in:
parent
423457126f
commit
ab6ea150a8
2 changed files with 10 additions and 0 deletions
|
|
@ -6,6 +6,9 @@ with
|
||||||
select * from {{ ref("xero__credit_note_line_items") }}
|
select * from {{ ref("xero__credit_note_line_items") }}
|
||||||
),
|
),
|
||||||
xero__contacts as (select * from {{ ref("xero__contacts") }}),
|
xero__contacts as (select * from {{ ref("xero__contacts") }}),
|
||||||
|
stg_seed__accounting_aggregations as (
|
||||||
|
select * from {{ ref("stg_seed__accounting_aggregations") }}
|
||||||
|
),
|
||||||
fees_invoiced as (
|
fees_invoiced as (
|
||||||
select
|
select
|
||||||
cast(
|
cast(
|
||||||
|
|
@ -27,6 +30,10 @@ with
|
||||||
sum(cnli.line_amount_wo_taxes_in_gbp) as fees_credited
|
sum(cnli.line_amount_wo_taxes_in_gbp) as fees_credited
|
||||||
from xero__credit_note_line_items cnli
|
from xero__credit_note_line_items cnli
|
||||||
left join xero__contacts c on cnli.id_contact = c.id_contact
|
left join xero__contacts c on cnli.id_contact = c.id_contact
|
||||||
|
left join
|
||||||
|
stg_seed__accounting_aggregations aa
|
||||||
|
on aa.account_code = cnli.account_code
|
||||||
|
and aa.root_aggregation <> 'Host Resolutions Payments'
|
||||||
where cnli.credit_note_status in {{ relevant_document_statuses }}
|
where cnli.credit_note_status in {{ relevant_document_statuses }}
|
||||||
group by date_trunc('month', cnli.credit_note_issued_at_utc), c.id_deal
|
group by date_trunc('month', cnli.credit_note_issued_at_utc), c.id_deal
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -38,3 +38,6 @@ account_code,root_aggregation,kpis_aggregation,financial_l1_aggregation,financia
|
||||||
"239",Resolution Process for Deposit Management Services,Accounting Resolutions,2-Deposit Management,21-Deposit Management Services,215-Resolution Process for Deposit Management Services
|
"239",Resolution Process for Deposit Management Services,Accounting Resolutions,2-Deposit Management,21-Deposit Management Services,215-Resolution Process for Deposit Management Services
|
||||||
"240",Screen and Protect API,Invoiced API Revenue,1-Guest Screening and Protection,18-Screen and Protect API,181-Screen and Protect API
|
"240",Screen and Protect API,Invoiced API Revenue,1-Guest Screening and Protection,18-Screen and Protect API,181-Screen and Protect API
|
||||||
"301",Damage Host-Waiver Payments,Damage Host-Waiver Payments,5-Damage Host-Waiver Payments,51-Damage Host-Waiver Payments,511-Damage Host-Waiver Payments
|
"301",Damage Host-Waiver Payments,Damage Host-Waiver Payments,5-Damage Host-Waiver Payments,51-Damage Host-Waiver Payments,511-Damage Host-Waiver Payments
|
||||||
|
"316",Host Resolutions Payments,Host Resolutions Payments,4-Mediation and Resolution,42-Host Resolutions,421-Host Resolutions
|
||||||
|
"323",Host Resolutions Payments,Host Resolutions Payments,4-Mediation and Resolution,43-E-Deposit Resolutions,431-E-Deposit Resolutions
|
||||||
|
"324",Host Resolutions Payments,Host Resolutions Payments,4-Mediation and Resolution,44-Check In Hero Resolutions,441-Check In Hero Resolutions
|
||||||
|
Loading…
Add table
Add a link
Reference in a new issue