diff --git a/models/intermediate/cross/int_monthly_aggregated_metrics_history_by_deal.sql b/models/intermediate/cross/int_monthly_aggregated_metrics_history_by_deal.sql index 761cde5..258e6cd 100644 --- a/models/intermediate/cross/int_monthly_aggregated_metrics_history_by_deal.sql +++ b/models/intermediate/cross/int_monthly_aggregated_metrics_history_by_deal.sql @@ -177,8 +177,6 @@ select -- 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_api_net_fees_in_gbp, invoiced_revenue.xero_guesty_net_fees_in_gbp, -- HOST RESOLUTIONS -- diff --git a/models/intermediate/cross/int_mtd_aggregated_metrics.sql b/models/intermediate/cross/int_mtd_aggregated_metrics.sql index 3cdb02a..4472bcf 100644 --- a/models/intermediate/cross/int_mtd_aggregated_metrics.sql +++ b/models/intermediate/cross/int_mtd_aggregated_metrics.sql @@ -683,10 +683,10 @@ }, { "order_by": 248, - "metric": "Invoiced Screen & Protect API Revenue", - "value": "xero_screen_and_protect_api_net_fees_in_gbp", - "previous_year_value": "previous_year_xero_screen_and_protect_api_net_fees_in_gbp", - "relative_increment": "relative_increment_xero_screen_and_protect_api_net_fees_in_gbp", + "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", diff --git a/models/intermediate/cross/int_mtd_vs_previous_year_metrics.sql b/models/intermediate/cross/int_mtd_vs_previous_year_metrics.sql index 60e06b7..117059f 100644 --- a/models/intermediate/cross/int_mtd_vs_previous_year_metrics.sql +++ b/models/intermediate/cross/int_mtd_vs_previous_year_metrics.sql @@ -232,7 +232,7 @@ with 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_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 -- @@ -486,11 +486,7 @@ select {{ 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_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 -- diff --git a/models/intermediate/kpis/int_kpis__agg_monthly_invoiced_revenue.sql b/models/intermediate/kpis/int_kpis__agg_monthly_invoiced_revenue.sql index ed301fe..abbcaf6 100644 --- a/models/intermediate/kpis/int_kpis__agg_monthly_invoiced_revenue.sql +++ b/models/intermediate/kpis/int_kpis__agg_monthly_invoiced_revenue.sql @@ -49,8 +49,8 @@ xero_check_in_hero_api_net_fees_in_gbp ) as xero_check_in_hero_api_net_fees_in_gbp, sum( - xero_screen_and_protect_api_net_fees_in_gbp - ) as xero_screen_and_protect_api_net_fees_in_gbp, + 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( diff --git a/models/intermediate/kpis/int_kpis__agg_mtd_invoiced_revenue.sql b/models/intermediate/kpis/int_kpis__agg_mtd_invoiced_revenue.sql index 3c01994..70b048b 100644 --- a/models/intermediate/kpis/int_kpis__agg_mtd_invoiced_revenue.sql +++ b/models/intermediate/kpis/int_kpis__agg_mtd_invoiced_revenue.sql @@ -49,8 +49,8 @@ xero_check_in_hero_api_net_fees_in_gbp ) as xero_check_in_hero_api_net_fees_in_gbp, sum( - xero_screen_and_protect_api_net_fees_in_gbp - ) as xero_screen_and_protect_api_net_fees_in_gbp, + 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( diff --git a/models/intermediate/kpis/int_kpis__metric_daily_invoiced_revenue.sql b/models/intermediate/kpis/int_kpis__metric_daily_invoiced_revenue.sql index cc319e2..e83b89a 100644 --- a/models/intermediate/kpis/int_kpis__metric_daily_invoiced_revenue.sql +++ b/models/intermediate/kpis/int_kpis__metric_daily_invoiced_revenue.sql @@ -187,7 +187,7 @@ select then ixsdm.line_amount_wo_taxes_in_gbp else 0 end - ) as xero_screen_and_protect_api_net_fees_in_gbp, + ) as xero_screen_and_protect_net_fees_in_gbp, sum( case when ixsdm.accounting_root_aggregation = 'Guesty Resolutions' diff --git a/models/intermediate/kpis/int_kpis__metric_monthly_invoiced_revenue.sql b/models/intermediate/kpis/int_kpis__metric_monthly_invoiced_revenue.sql index abb62e9..04f8174 100644 --- a/models/intermediate/kpis/int_kpis__metric_monthly_invoiced_revenue.sql +++ b/models/intermediate/kpis/int_kpis__metric_monthly_invoiced_revenue.sql @@ -54,8 +54,8 @@ select 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_api_net_fees_in_gbp - ) as xero_screen_and_protect_api_net_fees_in_gbp, + 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( diff --git a/models/intermediate/kpis/int_kpis__metric_mtd_invoiced_revenue.sql b/models/intermediate/kpis/int_kpis__metric_mtd_invoiced_revenue.sql index f3ba0ec..47cb643 100644 --- a/models/intermediate/kpis/int_kpis__metric_mtd_invoiced_revenue.sql +++ b/models/intermediate/kpis/int_kpis__metric_mtd_invoiced_revenue.sql @@ -54,8 +54,8 @@ select 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_api_net_fees_in_gbp - ) as xero_screen_and_protect_api_net_fees_in_gbp, + 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( diff --git a/models/intermediate/kpis/schema.yml b/models/intermediate/kpis/schema.yml index 4f7031d..b280863 100644 --- a/models/intermediate/kpis/schema.yml +++ b/models/intermediate/kpis/schema.yml @@ -4449,7 +4449,7 @@ models: in a given date and per specified dimension. This is an API service. - - name: xero_screen_and_protect_api_net_fees_in_gbp + - 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 @@ -4669,14 +4669,14 @@ models: data_type: decimal description: | Sum of accummulated Check-In Hero API Net Fees, in GBP, without taxes - in a given date and per specified dimension. This is an + in a given month and per specified dimension. This is an API service. - - name: xero_screen_and_protect_api_net_fees_in_gbp + - 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 date and per specified dimension. This is an + in a given month and per specified dimension. This is an API service. - name: xero_athena_net_fees_in_gbp @@ -4886,15 +4886,15 @@ models: data_type: decimal description: | Sum of accummulated Check-In Hero API Net Fees, in GBP, without taxes - in a given date and per specified dimension. This is an - API service. + in a given month up to the given date and per specified dimension. + This is an API service. - - name: xero_screen_and_protect_api_net_fees_in_gbp + - 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 date and per specified dimension. This is an - API service. + 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 @@ -4974,7 +4974,7 @@ models: - 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_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 @@ -5089,15 +5089,15 @@ models: data_type: decimal description: | The monthly Check-In Hero API Net Fees, in GBP, without taxes - in a given date and per specified dimension. This is an - API service. + for a given date, dimension and value. + This is an API service. - - name: xero_screen_and_protect_api_net_fees_in_gbp + - name: xero_screen_and_protect_net_fees_in_gbp data_type: decimal description: | The monthly Screen & Protect API Net Fees, in GBP, without taxes - in a given date and per specified dimension. This is an - API service. + for a given date, dimension and value. + This is an API service. - name: xero_athena_net_fees_in_gbp data_type: decimal @@ -5175,7 +5175,7 @@ models: - 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_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 @@ -5291,15 +5291,15 @@ models: data_type: decimal description: | The month-to-date Check-In Hero API Net Fees, in GBP, without taxes - in a given date and per specified dimension. This is an - API service. + for a given date, dimension and value. + This is an API service. - - name: xero_screen_and_protect_api_net_fees_in_gbp + - 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 - in a given date and per specified dimension. This is an - API service. + for a given date, dimension and value. + This is an API service. - name: xero_athena_net_fees_in_gbp data_type: decimal diff --git a/models/reporting/general/monthly_aggregated_metrics_history_by_deal.sql b/models/reporting/general/monthly_aggregated_metrics_history_by_deal.sql index 81bf94b..b90e40b 100644 --- a/models/reporting/general/monthly_aggregated_metrics_history_by_deal.sql +++ b/models/reporting/general/monthly_aggregated_metrics_history_by_deal.sql @@ -158,16 +158,6 @@ select then xero_e_deposit_net_fees_in_gbp else null end as xero_e_deposit_net_fees_in_gbp, - case - when {{ is_date_before_20th_of_previous_month("date") }} - then xero_check_in_hero_api_net_fees_in_gbp - else null - end as xero_check_in_hero_api_net_fees_in_gbp, - case - when {{ is_date_before_20th_of_previous_month("date") }} - then xero_screen_and_protect_api_net_fees_in_gbp - else null - end as xero_screen_and_protect_api_net_fees_in_gbp, case when {{ is_date_before_20th_of_previous_month("date") }} then xero_waiver_paid_back_to_host_in_gbp diff --git a/seeds/schema.yml b/seeds/schema.yml index 2ad2130..ea35b56 100644 --- a/seeds/schema.yml +++ b/seeds/schema.yml @@ -211,6 +211,8 @@ seeds: - Old Dashboard Booking Fees - Athena API - E-Deposit API + - Check in Hero API + - Screen and Protect API - Guesty Resolutions - Basic Protection - Waiver Pro @@ -281,6 +283,8 @@ seeds: - 15-E-Deposit API - 41-Guesty Resolutions - 31-Check In Cover + - 32-Check in Hero API + - 18-Screen and Protect API - 17-Protection Services - 16-Screening Services - 51-Damage Host-Waiver Payments @@ -303,6 +307,8 @@ seeds: - 111-Booking Fees - 141-Athena API - 151-E-Deposit API + - 321-Check in Hero API + - 181-Screen and Protect API - 411-Guesty Resolutions - 311-Check In Cover - 171-Basic Protection