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") }}
|
{{ config(materialized="table") }}
|
||||||
|
|
||||||
|
{% set vat_applicable_services = "('Waiver', 'Fee', 'CheckInCover')" %}
|
||||||
|
|
||||||
with
|
with
|
||||||
stg_core__verification_to_payment as (
|
stg_core__verification_to_payment as (
|
||||||
select * from {{ ref("stg_core__verification_to_payment") }}
|
select * from {{ ref("stg_core__verification_to_payment") }}
|
||||||
|
|
@ -22,14 +25,12 @@ with
|
||||||
vtp.id_verification_to_payment,
|
vtp.id_verification_to_payment,
|
||||||
coalesce(vat.vat_rate, 0) as vat_rate,
|
coalesce(vat.vat_rate, 0) as vat_rate,
|
||||||
case
|
case
|
||||||
when vpt.verification_payment_type in ('Waiver', 'Fee', 'CheckInCover')
|
when vpt.verification_payment_type in {{ vat_applicable_services }}
|
||||||
then true
|
then true
|
||||||
else false
|
else false
|
||||||
end as is_service_subject_to_vat,
|
end as is_service_subject_to_vat,
|
||||||
case
|
case
|
||||||
when
|
when vpt.verification_payment_type not in {{ vat_applicable_services }}
|
||||||
vpt.verification_payment_type
|
|
||||||
not in ('Waiver', 'Fee', 'CheckInCover')
|
|
||||||
then false
|
then false
|
||||||
when vat.vat_rate = 0
|
when vat.vat_rate = 0
|
||||||
then false
|
then false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue