fixed calculations to gbp
This commit is contained in:
parent
6dda0cdcc2
commit
1597126927
1 changed files with 12 additions and 7 deletions
|
|
@ -272,8 +272,11 @@ select
|
|||
vr.cancelled_date_utc,
|
||||
coalesce(bnf.nightly_fee_in_local_currency, 0) * vr.number_of_nights
|
||||
+ coalesce(bbf.booking_fee_in_local_currency, 0) as total_fee_in_local_currency,
|
||||
coalesce(bnf.nightly_fee_in_local_currency, 0) * vr.number_of_nights
|
||||
+ coalesce(bbf.booking_fee_in_local_currency, 0) * der.rate as total_fee_in_gbp,
|
||||
(
|
||||
coalesce(bnf.nightly_fee_in_local_currency, 0) * vr.number_of_nights
|
||||
+ coalesce(bbf.booking_fee_in_local_currency, 0)
|
||||
)
|
||||
* der.rate as total_fee_in_gbp,
|
||||
coalesce(bnf.discount_percentage, 0) as discount_percentage,
|
||||
coalesce(bnf.nightly_fee_in_local_currency, 0)
|
||||
* vr.number_of_nights
|
||||
|
|
@ -289,11 +292,13 @@ select
|
|||
* vr.number_of_nights
|
||||
* (100 - coalesce(bnf.discount_percentage, 0))
|
||||
/ 100 as total_fee_after_discount_in_local_currency,
|
||||
coalesce(bbf.booking_fee_in_local_currency, 0)
|
||||
+ coalesce(bnf.nightly_fee_in_local_currency, 0)
|
||||
* vr.number_of_nights
|
||||
* (100 - coalesce(bnf.discount_percentage, 0))
|
||||
/ 100
|
||||
(
|
||||
coalesce(bbf.booking_fee_in_local_currency, 0)
|
||||
+ coalesce(bnf.nightly_fee_in_local_currency, 0)
|
||||
* vr.number_of_nights
|
||||
* (100 - coalesce(bnf.discount_percentage, 0))
|
||||
/ 100
|
||||
)
|
||||
* der.rate as total_fee_after_discount_in_gbp,
|
||||
coalesce(bbf.invoice_date_utc, bnf.invoice_date_utc) as invoice_date_utc,
|
||||
vr.creation_at_utc,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue