Merged PR 5005: New API invoices
# Description Added new invoices metrics for CIH and S&P API for KPI and Accounting models # Checklist - [x] The edited models and dependants run properly with production data. - [x] The edited models are sufficiently documented. - [x] The edited models contain PK tests, and I've ran and passed them. - [ ] I have checked for DRY opportunities with other models and docs. - [ ] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. New API invoices Related work items: #29276
This commit is contained in:
commit
84eda4554f
10 changed files with 146 additions and 0 deletions
|
|
@ -670,6 +670,28 @@
|
|||
"display_exclusion": "INVOICING",
|
||||
"include_in_account_reporting": false,
|
||||
},
|
||||
{
|
||||
"order_by": 247,
|
||||
"metric": "Invoiced Check In Hero API Revenue",
|
||||
"value": "xero_check_in_hero_api_net_fees_in_gbp",
|
||||
"previous_year_value": "previous_year_xero_check_in_hero_api_net_fees_in_gbp",
|
||||
"relative_increment": "relative_increment_xero_check_in_hero_api_net_fees_in_gbp",
|
||||
"number_format": "currency_gbp",
|
||||
"increment_sign_format": "positive",
|
||||
"display_exclusion": "INVOICING",
|
||||
"include_in_account_reporting": false,
|
||||
},
|
||||
{
|
||||
"order_by": 248,
|
||||
"metric": "Invoiced Screen & Protect Revenue",
|
||||
"value": "xero_screen_and_protect_net_fees_in_gbp",
|
||||
"previous_year_value": "previous_year_xero_screen_and_protect_net_fees_in_gbp",
|
||||
"relative_increment": "relative_increment_xero_screen_and_protect_net_fees_in_gbp",
|
||||
"number_format": "currency_gbp",
|
||||
"increment_sign_format": "positive",
|
||||
"display_exclusion": "INVOICING",
|
||||
"include_in_account_reporting": false,
|
||||
},
|
||||
{
|
||||
"order_by": 250,
|
||||
"metric": "Guest Revenue",
|
||||
|
|
|
|||
|
|
@ -231,6 +231,8 @@ with
|
|||
-- APIs REVENUE --
|
||||
invoiced_revenue.xero_apis_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_e_deposit_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_check_in_hero_api_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_screen_and_protect_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_guesty_net_fees_in_gbp,
|
||||
|
||||
-- HOST RESOLUTIONS --
|
||||
|
|
@ -483,6 +485,8 @@ select
|
|||
-- APIs REVENUE --
|
||||
{{ calculate_safe_relative_increment("xero_apis_net_fees_in_gbp") }},
|
||||
{{ calculate_safe_relative_increment("xero_e_deposit_net_fees_in_gbp") }},
|
||||
{{ calculate_safe_relative_increment("xero_check_in_hero_api_net_fees_in_gbp") }},
|
||||
{{ calculate_safe_relative_increment("xero_screen_and_protect_net_fees_in_gbp") }},
|
||||
{{ calculate_safe_relative_increment("xero_guesty_net_fees_in_gbp") }},
|
||||
|
||||
-- HOST RESOLUTIONS --
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@
|
|||
) as xero_waiver_paid_back_to_host_in_gbp,
|
||||
sum(xero_e_deposit_net_fees_in_gbp) as xero_e_deposit_net_fees_in_gbp,
|
||||
sum(xero_athena_net_fees_in_gbp) as xero_athena_net_fees_in_gbp,
|
||||
sum(
|
||||
xero_check_in_hero_api_net_fees_in_gbp
|
||||
) as xero_check_in_hero_api_net_fees_in_gbp,
|
||||
sum(
|
||||
xero_screen_and_protect_net_fees_in_gbp
|
||||
) as xero_screen_and_protect_net_fees_in_gbp,
|
||||
sum(xero_guesty_net_fees_in_gbp) as xero_guesty_net_fees_in_gbp,
|
||||
sum(xero_apis_net_fees_in_gbp) as xero_apis_net_fees_in_gbp,
|
||||
sum(
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@
|
|||
) as xero_waiver_paid_back_to_host_in_gbp,
|
||||
sum(xero_e_deposit_net_fees_in_gbp) as xero_e_deposit_net_fees_in_gbp,
|
||||
sum(xero_athena_net_fees_in_gbp) as xero_athena_net_fees_in_gbp,
|
||||
sum(
|
||||
xero_check_in_hero_api_net_fees_in_gbp
|
||||
) as xero_check_in_hero_api_net_fees_in_gbp,
|
||||
sum(
|
||||
xero_screen_and_protect_net_fees_in_gbp
|
||||
) as xero_screen_and_protect_net_fees_in_gbp,
|
||||
sum(xero_guesty_net_fees_in_gbp) as xero_guesty_net_fees_in_gbp,
|
||||
sum(xero_apis_net_fees_in_gbp) as xero_apis_net_fees_in_gbp,
|
||||
sum(
|
||||
|
|
|
|||
|
|
@ -174,6 +174,20 @@ select
|
|||
else 0
|
||||
end
|
||||
) as xero_athena_net_fees_in_gbp,
|
||||
sum(
|
||||
case
|
||||
when ixsdm.accounting_root_aggregation = 'Check in Hero API'
|
||||
then ixsdm.line_amount_wo_taxes_in_gbp
|
||||
else 0
|
||||
end
|
||||
) as xero_check_in_hero_api_net_fees_in_gbp,
|
||||
sum(
|
||||
case
|
||||
when ixsdm.accounting_root_aggregation = 'Screen and Protect API'
|
||||
then ixsdm.line_amount_wo_taxes_in_gbp
|
||||
else 0
|
||||
end
|
||||
) as xero_screen_and_protect_net_fees_in_gbp,
|
||||
sum(
|
||||
case
|
||||
when ixsdm.accounting_root_aggregation = 'Guesty Resolutions'
|
||||
|
|
|
|||
|
|
@ -50,6 +50,12 @@ select
|
|||
) as xero_waiver_paid_back_to_host_in_gbp,
|
||||
sum(ir.xero_e_deposit_net_fees_in_gbp) as xero_e_deposit_net_fees_in_gbp,
|
||||
sum(ir.xero_athena_net_fees_in_gbp) as xero_athena_net_fees_in_gbp,
|
||||
sum(
|
||||
ir.xero_check_in_hero_api_net_fees_in_gbp
|
||||
) as xero_check_in_hero_api_net_fees_in_gbp,
|
||||
sum(
|
||||
ir.xero_screen_and_protect_net_fees_in_gbp
|
||||
) as xero_screen_and_protect_net_fees_in_gbp,
|
||||
sum(ir.xero_guesty_net_fees_in_gbp) as xero_guesty_net_fees_in_gbp,
|
||||
sum(ir.xero_apis_net_fees_in_gbp) as xero_apis_net_fees_in_gbp,
|
||||
sum(
|
||||
|
|
|
|||
|
|
@ -50,6 +50,12 @@ select
|
|||
) as xero_waiver_paid_back_to_host_in_gbp,
|
||||
sum(ir.xero_e_deposit_net_fees_in_gbp) as xero_e_deposit_net_fees_in_gbp,
|
||||
sum(ir.xero_athena_net_fees_in_gbp) as xero_athena_net_fees_in_gbp,
|
||||
sum(
|
||||
ir.xero_check_in_hero_api_net_fees_in_gbp
|
||||
) as xero_check_in_hero_api_net_fees_in_gbp,
|
||||
sum(
|
||||
ir.xero_screen_and_protect_net_fees_in_gbp
|
||||
) as xero_screen_and_protect_net_fees_in_gbp,
|
||||
sum(ir.xero_guesty_net_fees_in_gbp) as xero_guesty_net_fees_in_gbp,
|
||||
sum(ir.xero_apis_net_fees_in_gbp) as xero_apis_net_fees_in_gbp,
|
||||
sum(
|
||||
|
|
|
|||
|
|
@ -4442,6 +4442,20 @@ models:
|
|||
in a given date and per specified dimension. This is an
|
||||
API service.
|
||||
|
||||
- name: xero_check_in_hero_api_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of daily Check-In Hero API Net Fees, in GBP, without taxes
|
||||
in a given date and per specified dimension. This is an
|
||||
API service.
|
||||
|
||||
- name: xero_screen_and_protect_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of daily Screen & Protect API Net Fees, in GBP, without taxes
|
||||
in a given date and per specified dimension. This is an
|
||||
API service.
|
||||
|
||||
- name: xero_athena_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
|
|
@ -4651,6 +4665,20 @@ models:
|
|||
in a given month and per specified dimension. This is an
|
||||
API service.
|
||||
|
||||
- name: xero_check_in_hero_api_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of accummulated Check-In Hero API Net Fees, in GBP, without taxes
|
||||
in a given month and per specified dimension. This is an
|
||||
API service.
|
||||
|
||||
- name: xero_screen_and_protect_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of accummulated Screen & Protect API Net Fees, in GBP, without taxes
|
||||
in a given month and per specified dimension. This is an
|
||||
API service.
|
||||
|
||||
- name: xero_athena_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
|
|
@ -4854,6 +4882,20 @@ models:
|
|||
in a given month up to the given date and per specified dimension.
|
||||
This is an API service.
|
||||
|
||||
- name: xero_check_in_hero_api_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of accummulated Check-In Hero API Net Fees, in GBP, without taxes
|
||||
in a given month up to the given date and per specified dimension.
|
||||
This is an API service.
|
||||
|
||||
- name: xero_screen_and_protect_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Sum of accummulated Screen & Protect API Net Fees, in GBP, without taxes
|
||||
in a given month up to the given date and per specified dimension.
|
||||
This is an API service.
|
||||
|
||||
- name: xero_athena_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
|
|
@ -4931,6 +4973,8 @@ models:
|
|||
- xero_verification_net_fees_in_gbp
|
||||
- xero_operator_net_fees_in_gbp
|
||||
- xero_e_deposit_net_fees_in_gbp
|
||||
- xero_check_in_hero_api_net_fees_in_gbp
|
||||
- xero_screen_and_protect_net_fees_in_gbp
|
||||
- xero_athena_net_fees_in_gbp
|
||||
- xero_guesty_resolutions_net_fees_in_gbp
|
||||
- xero_guesty_net_fees_in_gbp
|
||||
|
|
@ -5041,6 +5085,20 @@ models:
|
|||
for a given date, dimension and value.
|
||||
This is an API service.
|
||||
|
||||
- name: xero_check_in_hero_api_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
The monthly Check-In Hero API Net Fees, in GBP, without taxes
|
||||
for a given date, dimension and value.
|
||||
This is an API service.
|
||||
|
||||
- name: xero_screen_and_protect_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
The monthly Screen & Protect API Net Fees, in GBP, without taxes
|
||||
for a given date, dimension and value.
|
||||
This is an API service.
|
||||
|
||||
- name: xero_athena_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
|
|
@ -5116,6 +5174,8 @@ models:
|
|||
- xero_verification_net_fees_in_gbp
|
||||
- xero_operator_net_fees_in_gbp
|
||||
- xero_e_deposit_net_fees_in_gbp
|
||||
- xero_check_in_hero_api_net_fees_in_gbp
|
||||
- xero_screen_and_protect_net_fees_in_gbp
|
||||
- xero_athena_net_fees_in_gbp
|
||||
- xero_guesty_resolutions_net_fees_in_gbp
|
||||
- xero_guesty_net_fees_in_gbp
|
||||
|
|
@ -5227,6 +5287,20 @@ models:
|
|||
for a given date, dimension and value.
|
||||
This is an API service.
|
||||
|
||||
- name: xero_check_in_hero_api_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
The month-to-date Check-In Hero API Net Fees, in GBP, without taxes
|
||||
for a given date, dimension and value.
|
||||
This is an API service.
|
||||
|
||||
- name: xero_screen_and_protect_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
The month-to-date Screen & Protect API Net Fees, in GBP, without taxes
|
||||
for a given date, dimension and value.
|
||||
This is an API service.
|
||||
|
||||
- name: xero_athena_net_fees_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue