replace hardcode with variable
This commit is contained in:
parent
092b8bd725
commit
4cf74db49a
1 changed files with 5 additions and 4 deletions
|
|
@ -1,4 +1,7 @@
|
|||
{{ config(materialized="table") }}
|
||||
|
||||
{% set vat_applicable_services = "('Waiver', 'Fee', 'CheckInCover')" %}
|
||||
|
||||
with
|
||||
stg_core__verification_to_payment as (
|
||||
select * from {{ ref("stg_core__verification_to_payment") }}
|
||||
|
|
@ -22,14 +25,12 @@ with
|
|||
vtp.id_verification_to_payment,
|
||||
coalesce(vat.vat_rate, 0) as vat_rate,
|
||||
case
|
||||
when vpt.verification_payment_type in ('Waiver', 'Fee', 'CheckInCover')
|
||||
when vpt.verification_payment_type in {{ vat_applicable_services }}
|
||||
then true
|
||||
else false
|
||||
end as is_service_subject_to_vat,
|
||||
case
|
||||
when
|
||||
vpt.verification_payment_type
|
||||
not in ('Waiver', 'Fee', 'CheckInCover')
|
||||
when vpt.verification_payment_type not in {{ vat_applicable_services }}
|
||||
then false
|
||||
when vat.vat_rate = 0
|
||||
then false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue