Changed names of types of payments for better clarity
This commit is contained in:
parent
35e4735720
commit
fb61c69714
2 changed files with 22 additions and 16 deletions
|
|
@ -16,15 +16,15 @@ with
|
||||||
id_verification_request,
|
id_verification_request,
|
||||||
max(
|
max(
|
||||||
case when verification_payment_type = 'CheckInCover' then 1 else 0 end
|
case when verification_payment_type = 'CheckInCover' then 1 else 0 end
|
||||||
)::boolean as checkincover,
|
)::boolean as has_check_in_cover_payment,
|
||||||
max(
|
max(
|
||||||
case when verification_payment_type = 'Deposit' then 1 else 0 end
|
case when verification_payment_type = 'Deposit' then 1 else 0 end
|
||||||
)::boolean as deposit,
|
)::boolean as has_deposit_payment,
|
||||||
max(
|
max(
|
||||||
case when verification_payment_type = 'Waiver' then 1 else 0 end
|
case when verification_payment_type = 'Waiver' then 1 else 0 end
|
||||||
)::boolean as waiver,
|
)::boolean as has_waiver_payment,
|
||||||
max(case when verification_payment_type = 'Fee' then 1 else 0 end)::boolean
|
max(case when verification_payment_type = 'Fee' then 1 else 0 end)::boolean
|
||||||
as fee
|
as has_fee_payment
|
||||||
from int_core__verification_payments
|
from int_core__verification_payments
|
||||||
group by id_verification_request
|
group by id_verification_request
|
||||||
)
|
)
|
||||||
|
|
@ -45,10 +45,12 @@ select
|
||||||
end as selected_payment_option,
|
end as selected_payment_option,
|
||||||
u.date_of_birth,
|
u.date_of_birth,
|
||||||
extract(year from age(u.date_of_birth)) as age_of_guest,
|
extract(year from age(u.date_of_birth)) as age_of_guest,
|
||||||
case when pt.checkincover is true then true else false end as check_in_cover,
|
case
|
||||||
case when pt.waiver is true then true else false end as waiver,
|
when pt.checkincover is true then true else false
|
||||||
case when pt.deposit is true then true else false end as deposit,
|
end as has_check_in_cover_payment,
|
||||||
case when pt.fee is true then true else false end as fee
|
case when pt.waiver is true then true else false end as has_waiver_payment,
|
||||||
|
case when pt.deposit is true then true else false end as has_deposit_payment,
|
||||||
|
case when pt.fee is true then true else false end as has_fee_payment
|
||||||
from staging.stg_core__guest_satisfaction_responses gss
|
from staging.stg_core__guest_satisfaction_responses gss
|
||||||
left join
|
left join
|
||||||
staging.stg_core__verification_request vr
|
staging.stg_core__verification_request vr
|
||||||
|
|
|
||||||
|
|
@ -1002,18 +1002,22 @@ models:
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: ""
|
description: ""
|
||||||
|
|
||||||
- name: check_in_cover
|
- name: has_check_in_cover_payment
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: ""
|
description: |
|
||||||
|
True if guest payed for check-in cover
|
||||||
|
|
||||||
- name: waiver
|
- name: has_waiver_payment
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: ""
|
description: |
|
||||||
|
True if guest payed the waiver
|
||||||
|
|
||||||
- name: deposit
|
- name: has_deposit_payment
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: ""
|
description: |
|
||||||
|
True if guest payed the deposit
|
||||||
|
|
||||||
- name: fee
|
- name: has_fee_payment
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: ""
|
description: |
|
||||||
|
True if guest payed the fee
|
||||||
Loading…
Add table
Add a link
Reference in a new issue