fix broken case logic
This commit is contained in:
parent
070d067709
commit
bea2e0d926
1 changed files with 7 additions and 3 deletions
|
|
@ -29,15 +29,19 @@ with
|
||||||
coalesce(vat.vat_rate, 0) as vat_rate,
|
coalesce(vat.vat_rate, 0) as vat_rate,
|
||||||
case
|
case
|
||||||
when
|
when
|
||||||
vpt.verification_payment_type in {{ vat_applicable_services }}
|
vpt.verification_payment_type = 'Waiver'
|
||||||
and pamu.id_payaway_plan is null -- superhog takes waiver
|
and pamu.id_payaway_plan is null -- superhog takes waiver
|
||||||
then true
|
then true
|
||||||
|
when vpt.verification_payment_type in ('Fee', 'CheckInCover')
|
||||||
|
then true
|
||||||
else false
|
else false
|
||||||
end as is_service_subject_to_vat,
|
end as is_service_subject_to_vat,
|
||||||
case
|
case
|
||||||
|
when vpt.verification_payment_type not in {{ vat_applicable_services }}
|
||||||
|
then false
|
||||||
when
|
when
|
||||||
vpt.verification_payment_type not in {{ vat_applicable_services }}
|
vpt.verification_payment_type = 'Waiver'
|
||||||
or pamu.id_payaway_plan is not null -- host takes waiver
|
and pamu.id_payaway_plan is not null -- host takes waiver
|
||||||
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