Invoice model completed

This commit is contained in:
Joaquin Ossa 2024-12-23 15:25:38 +01:00
parent 1fff7b91a2
commit 9a4c7a312d
5 changed files with 201 additions and 297 deletions

View file

@ -18,19 +18,20 @@ select
then true
else false
end as is_protected,
(au.json_document_user_data ->> 'PriceIncrease')::decimal as price_increase,
(au.json_document_user_data ->> 'PriceIncrease')::decimal
as price_increase_percentage,
(au.json_document_user_data ->> 'PriceIncreaseStartDate')::date
as price_increase_start_date_utc,
(au.json_document_user_data ->> 'MonthlyVolumeDiscount')::decimal
as monthly_volume_discount,
as monthly_volume_discount_percentage,
(au.json_document_user_data ->> 'ThresholdApprovedBookingVolume')::integer
as threshold_approved_booking_volume,
as threshold_approved_or_flagged_booking_volume,
(au.json_document_user_data ->> 'MonthlyVolumeDiscountStartDate')::date
as monthly_volume_discount_start_date_utc,
(au.json_document_user_data ->> 'MonthlyVolumeDiscountEndDate')::date
as monthly_volume_discount_end_date_utc,
(au.json_document_user_data ->> 'MonthlyGeneralDiscount')::decimal
as monthly_general_discount,
as monthly_general_discount_percentage,
(au.json_document_user_data ->> 'MonthlyGeneralDiscountStartDate')::date
as monthly_general_discount_start_date_utc,
(au.json_document_user_data ->> 'MonthlyGeneralDiscountEndDate')::date

View file

@ -4742,7 +4742,7 @@ models:
data_tests:
- not_null
- name: price_increase
- name: price_increase_percentage
data_type: numeric
description: The percentage or value of the price increase
applied to the user's account.
@ -4758,7 +4758,7 @@ models:
data_tests:
- is_first_day_of_month
- name: monthly_volume_discount
- name: monthly_volume_discount_percentage
data_type: numeric
description: The discount percentage or value offered based on the
volume of bookings achieved within a month.
@ -4769,7 +4769,7 @@ models:
max_value: 100
strictly: true
- name: threshold_approved_booking_volume
- name: threshold_approved_or_flagged_booking_volume
data_type: numeric
description: The minimum number of bookings required to qualify for
the monthly volume discount.
@ -4792,7 +4792,7 @@ models:
data_tests:
- is_last_day_of_month
- name: monthly_general_discount
- name: monthly_general_discount_percentage
data_type: numeric
description: The general discount percentage or value applied to all
bookings within the applicable period.