more features into reporting

This commit is contained in:
Joaquin Ossa 2024-10-02 10:57:30 +02:00
parent bf01360fba
commit aab6155b67
4 changed files with 144 additions and 12 deletions

View file

@ -82,7 +82,17 @@ with
select
v.id_verification,
v.id_booking,
v.id_user_partner,
v.id_accommodation,
v.listing_town,
v.listing_country,
v.verification_status,
v.channel,
v.company_name,
v.is_cancelled,
er.currency,
v.nightly_fee_local,
v.number_nights,
er.ok_status_fee_in_txn_currency,
er.ok_status_fee_in_gbp,
er.rejected_fee_in_txn_currency,
@ -98,6 +108,8 @@ select
else 0
end as cancelled_fee_in_gbp,
v.created_date_utc,
v.cancelled_date_utc,
v.checkin_date_utc,
v.checkout_date_utc
from int_edeposit__verifications v
inner join edeposit_records er on er.id_verification = v.id_verification

View file

@ -231,12 +231,56 @@ models:
# tests:
# - not_null
- name: id_user_partner
data_type: text
description: "unique Superhog generated id for partner"
# tests:
# - not_null
- name: id_accommodation
data_type: text
description: "unique Superhog generated id for a listing"
# tests:
# - not_null
- name: listing_town
data_type: text
description: "town name where the listing is located"
- name: listing_country
data_type: text
description: "country name where the listing is located"
- name: verification_status
data_type: text
description: "status of the verification"
- name: channel
data_type: text
description: ""
- name: company_name
data_type: text
description: ""
- name: is_cancelled
data_type: boolean
description: "true if the booking was cancelled"
- name: currency
data_type: text
description: "currency in which the transaction actually happened"
# tests:
# - not_null
- name: nightly_fee_local
data_type: double precision
description: "fee charged per night"
- name: number_nights
data_type: integer
description: "number of nights for the booking"
- name: ok_status_fee_in_txn_currency
data_type: numeric
description: "fee charged in used currency for approved or flagged verifications and not cancelled"
@ -291,18 +335,28 @@ models:
# min_value: 0
# strictly: false
- name: checkout_date_utc
data_type: date
description: "Date of checkout for the booking"
# tests:
# - not_null
- name: created_date_utc
data_type: date
description: "Date of creation of the verification in the system"
# tests:
# - not_null
- name: cancelled_date_utc
data_type: date
description: "Date of cancellation for the booking"
- name: checkin_date_utc
data_type: date
description: "Date of checkin for the booking"
# tests:
# - not_null
- name: checkout_date_utc
data_type: date
description: "Date of checkout for the booking"
# tests:
# - not_null
- name: int_edeposit__guesty_verifications
description: "This table shows all verification for Guesty.
The charged fee is 2GBP per booked night if booking is approved