Fixing formatting

This commit is contained in:
Joaquin Ossa 2025-03-06 17:19:15 +01:00
parent f8b551a75c
commit 0536cfb0e2

View file

@ -166,7 +166,7 @@ select
as host_resolution_amount_paid_per_created_booking, as host_resolution_amount_paid_per_created_booking,
{{ {{
return_capped_value( return_capped_value(
"cast(host_resolutions.xero_host_resolution_payment_count as decimal) / created_bookings.created_bookings", "cast(host_resolutions.xero_host_resolution_payment_count as decimal)/ created_bookings.created_bookings",
-1, -1,
1, 1,
) )
@ -233,7 +233,17 @@ select
) as revenue_retained_in_gbp, ) as revenue_retained_in_gbp,
{{ {{
return_capped_value( return_capped_value(
"nullif( coalesce(guest_payments.total_guest_payments_in_gbp, 0) + coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0) + coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0) + coalesce(invoiced_revenue.xero_waiver_paid_back_to_host_in_gbp, 0), 0) / nullif( coalesce(guest_payments.total_guest_payments_in_gbp, 0) + coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0) + coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0), 0)", "nullif(
coalesce(guest_payments.total_guest_payments_in_gbp, 0)
+ coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0)
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0)
+ coalesce(invoiced_revenue.xero_waiver_paid_back_to_host_in_gbp, 0),
0) /
nullif(
coalesce(guest_payments.total_guest_payments_in_gbp, 0)
+ coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0)
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0),
0)",
-1, -1,
1, 1,
) )
@ -251,7 +261,17 @@ select
) as revenue_retained_post_resolutions_in_gbp, ) as revenue_retained_post_resolutions_in_gbp,
{{ {{
return_capped_value( return_capped_value(
"nullif( coalesce(guest_payments.total_guest_payments_in_gbp, 0) + coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0) + coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0) + coalesce(invoiced_revenue.xero_waiver_paid_back_to_host_in_gbp, 0) + coalesce(host_resolutions.xero_host_resolution_amount_paid_in_gbp, 0), 0) / nullif(coalesce(guest_payments.total_guest_payments_in_gbp, 0) + coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0) + coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0), 0)", "nullif(
coalesce(guest_payments.total_guest_payments_in_gbp, 0)
+ coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0)
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0)
+ coalesce(invoiced_revenue.xero_waiver_paid_back_to_host_in_gbp, 0)
+ coalesce(host_resolutions.xero_host_resolution_amount_paid_in_gbp, 0),
0) /
nullif(coalesce(guest_payments.total_guest_payments_in_gbp, 0)
+ coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0)
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0),
0)",
-1, -1,
1, 1,
) )