Fixed waiver payment logic

This commit is contained in:
Joaquin Ossa 2025-02-04 14:14:00 +01:00
parent be6ccbafa7
commit b6bc19269d
4 changed files with 142 additions and 16 deletions

View file

@ -3,6 +3,9 @@ select
id_payment as id_payment,
payment_reference as payment_reference,
verification_payment_type as verification_payment_type,
is_host_taking_waiver_risk as is_host_taking_waiver_risk,
payaway_percentage as payaway_percentage,
payaway_minimum_commission_local_curr as payaway_minimum_commission_local_curr,
payment_status as payment_status,
payment_due_date_utc as payment_due_date_utc,
payment_paid_date_utc as payment_paid_date_utc,
@ -17,11 +20,14 @@ select
superhog_fee_in_txn_currency as superhog_fee_in_txn_currency,
superhog_fee_in_gbp as superhog_fee_in_gbp,
currency as currency,
rate as rate,
exchange_rate_to_gbp as exchange_rate_to_gbp,
id_user_host as id_user_host,
id_deal as id_deal,
first_name as first_name,
last_name as last_name,
email as email,
company_name as company_name,
host_country as host_country,
guest_first_name as guest_first_name,
guest_last_name as guest_last_name,
guest_email as guest_email,

View file

@ -1668,6 +1668,18 @@ models:
- "CheckInCover"
- "Fee"
- name: is_host_taking_waiver_risk
data_type: boolean
description: Boolean indicating whether the host is taking the risk
- name: payaway_percentage
data_type: numeric
description: Percentage of the payment that goes to Superhog.
- name: payaway_minimum_commission_local_curr
data_type: numeric
description: Minimum commission amount in local currency.
- name: payment_status
data_type: character varying
description: Current status of the payment (e.g., pending, paid, refunded).
@ -1752,6 +1764,23 @@ models:
The ISO 4217 currency code (e.g., GBP, USD, EUR) in which the payment
was originally made.
- name: exchange_rate_to_gbp
data_type: numeric
description: |
The exchange rate used to convert the payment amount from local currency
to GBP.
- name: id_user_host
data_type: character varying
description: |
The unique identifier of the host receiving the payment.
- name: id_deal
data_type: character varying
description: |
Main identifier of the B2B clients. A Deal can have multiple Hosts.
A Host can have only 1 Deal or no Deal at all. This field can be null.
- name: first_name
data_type: character varying
description: First name of the host receiving the payment.
@ -1769,6 +1798,11 @@ models:
description: |
The company name of the host.
- name: host_country
data_type: character varying
description: |
The country name of the host.
- name: guest_first_name
data_type: character varying
description: First name of the guest making the payment.