sh-notion/notion_data_team_no_files/Invoice Screen & Protect 1610446ff9c980f88de6d6293b4fab03.md
Pablo Martin a256b48b01 pages
2025-07-11 16:15:17 +02:00

101 lines
No EOL
14 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Invoice Screen & Protect
## Protection Types
There are 4 types of protections:
1. **Basic Protection**
2. **Damage Waiver**
3. **Screen and Protect (S&P)**
4. **Standalone Protection**
### Invoicing Rules
- Partners are invoiced each month for each **approved** or **flagged** verification with a checkout date in that invoicing month.
- **Damage Waiver** is an exception: it is charged based on the month of creation rather than the checkout date.
### Cancellation and Rejection Fees
- All **cancelled** or **rejected** verifications are charged a cancellation or rejection fee of **0.25 (local currency)**.
- If a verification is **both cancelled and rejected**, only one fee is charged (whichever occurred first):
- Cancellation fee is charged on the **month of cancellation**.
- Rejection fee is charged on the **month of creation**.
### Flagged Verifications
- Verifications flagged by Wilbur (`is_flag_protected = false`) will have a `Flagged` status.
- Flagged verifications are charged the rejection fee of **0.25** on the **month of creation**.
- Flagged verifications are not protected.
### Special Rules for Damage Waiver
- Damage Waiver is **not refundable**, meaning the fee is charged even if the booking is cancelled. If is rejected it means it was never charged, so it applies the rejection fee only.
- Damage Waiver is not impacted by `is_flag_protected`. Verifications with `is_flag_protected = false` are still charged.
## Fee Calculation
To calculate the nightly fee for each booking:
1. **Join Protection Types with Price Tables**:
- Match using `id_currency` and `protection_amount`.
2. **Long-Stay vs. Short-Stay Fees**:
- For bookings with `number_of_nights > 30`, use the `long_stay_fee` from the prices table.
- For shorter stays, use the `short_stay_fee`.
## Discounts
Sales representatives can apply discounts to partners. Discounts are valid only during their active periods (based on start and end dates) and are categorized as follows:
1. **Generic Discount**:
- Applies to the whole account, excluding Damage Waiver.
- Configured with a start and end date.
2. **Volume Discount**:
- Applies based on the volume of **approved** or **flagged** bookings with a checkout date in that month. It doesnt apply to Damage Waiver.
- Verifications flagged by Wilbur (`is_flag_protected = false`) will have a `Flagged` status but these dont count towards the Volume Discount.
3. **Total Fee Calculation:**
- First it applies the price increment and then the discount. For example:
```sql
booking_fee = 100
general_discount = 10
price_increase = 5
charged_fee = (100 * 1.05) * 0.90 = 94.5
```
**Important Notes:**
- Damage Waiver is always excluded from discounts.
- **Only one discount can be applied to an account at a time. Discounts cannot coexist.**
## Price Increase
A **Price Increase** mechanism exists but is not currently in use. It may be implemented in the future.
## Example
| **user** | **is_protected** | **monthly_volume_discount** | **threshold_approved_booking_volume** | **monthly_volume_discount_start_date_utc** | **monthly_volume_discount_end_date_utc** | id_currency |
| --- | --- | --- | --- | --- | --- | --- |
| joaquin_travel | TRUE | 10 | 5 | 01/11/2024 | 30/06/2028 | 1 |
| id_verification | protection_type | protection_starting_level | protection_basic_amount | protection_extended_amount | verification_status | checkin_date_utc | checkout_date_utc | number_of_nights | is_cancelled | cancelled_at_utc | cancelled_date_utc | creation_at_utc | creation_date_utc | cosmos_created_date_utc | nightly_fee | booking_fee | cancellation_fee | rejected_fee | discount_percentage | fee_amount | discount_amount | final_fee | invoice_month |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | DAMAGE WAIVER | [NULL] | 5,000 | [NULL] | FLAGGED | 01/01/2025 | 15/01/2025 | 14 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                     - | £              30.00 | £   - | £                        - | 10 | £                              30.00 | £                                3.00 | £         27.00 | 1 |
| 2 | BASIC PROTECTION | [NULL] | 500 | [NULL] | APPROVED | 01/02/2025 | 05/04/2025 | 63 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                1.75 | £                     - | £                                 - | £                        - | 0 | £                            110.25 | £                                     - | £       110.25 | 4 |
| 3 | DAMAGE WAIVER | [NULL] | 5,000 | [NULL] | APPROVED | 01/01/2025 | 05/01/2025 | 4 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                     - | £              30.00 | £                                 - | £                        - | 10 | £                              30.00 | £                                3.00 | £         27.00 | 1 |
| 4 | BASIC PROTECTION | [NULL] | 500 | [NULL] | APPROVED | 01/01/2025 | 05/01/2025 | 4 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                3.75 | £                     - | £                                 - | £                        - | 10 | £                              15.00 | £                                1.50 | £         13.50 | 1 |
| 5 | DAMAGE WAIVER | [NULL] | 10,000 | [NULL] | APPROVED | 01/01/2025 | 15/03/2025 | 73 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                     - | £              40.00 | £                                 - | £                        - | 0 | £                              40.00 | £                                     - | £         40.00 | 3 |
| 6 | STANDALONE PROTECTION | 500 | [NULL] | 5,000,000 | APPROVED | 01/01/2025 | 05/01/2025 | 4 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £              13.75 | £                     - | £                                 - | £                        - | 10 | £                              55.00 | £                                5.50 | £         49.50 | 1 |
| 7 | SCREEN & PROTECT | [NULL] | 500 | 100,000 | APPROVED | 01/01/2025 | 05/01/2025 | 4 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                7.00 | £                     - | £                                 - | £                        - | 10 | £                              28.00 | £                                2.80 | £         25.20 | 1 |
| 8 | SCREEN & PROTECT | [NULL] | 250 | 5,000,000 | REJECTED | 01/01/2025 | 05/01/2025 | 4 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                     - | £                     - | £                                 - | £                    0.25 | 0 | £                                0.25 | £                                     - | £           0.25 | 12 |
| 9 | SCREEN & PROTECT | [NULL] | 500 | 100,000 | REJECTED | 01/03/2025 | 05/03/2025 | 4 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                     - | £                     - | £                                 - | £                    0.25 | 0 | £                                0.25 | £                                     - | £           0.25 | 12 |
| 10 | SCREEN & PROTECT | [NULL] | 250 | 1,000,000 | APPROVED | 01/01/2025 | 15/03/2025 | 73 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                5.25 | £                     - | £                                 - | £                        - | 10 | £                            383.25 | £                              38.33 | £       344.93 | 3 |
| 11 | STANDALONE PROTECTION | 250 | [NULL] | 5,000,000 | FLAGGED | 01/01/2025 | 10/01/2025 | 9 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £              14.00 | £                     - | £                                 - | £                        - | 10 | £                            126.00 | £                              12.60 | £       113.40 | 1 |
| 12 | BASIC PROTECTION | [NULL] | 500 | [NULL] | FLAGGED | 01/01/2025 | 11/01/2025 | 10 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                3.75 | £                     - | £                                 - | £                        - | 10 | £                              37.50 | £                                3.75 | £         33.75 | 1 |
| 13 | SCREEN & PROTECT | [NULL] | 250 | 50,000 | FLAGGED | 01/02/2025 | 16/02/2025 | 15 | TRUE | 17/12/2024 | 17/12/2024 | 17/12/2024 | 01/01/2024 | 03/12/2024 | £                     - | £                     - | £                            0.25 | £                        - | 0 | £                                0.25 | £                                     - | £           0.25 | 1 |
| 14 | STANDALONE PROTECTION | 250 | [NULL] | 5,000,000 | APPROVED | 01/01/2025 | 05/10/2025 | 277 | TRUE | 05/04/2025 | 05/04/2025 | 05/01/2025 | 01/01/2024 | 17/12/2024 | £                     - | £                     - | £                            0.25 | £                        - | 0 | £                                0.25 | £                                     - | £           0.25 | 4 |
| 15 | SCREEN & PROTECT | [NULL] | 500 | 1,000,000 | APPROVED | 01/01/2025 | 05/01/2025 | 4 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £              11.00 | £                     - | £                                 - | £                        - | 10 | £                              44.00 | £                                4.40 | £         39.60 | 1 |
| 16 | BASIC PROTECTION | [NULL] | 500 | [NULL] | APPROVED | 01/01/2025 | 05/01/2025 | 4 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                3.75 | £                     - | £                                 - | £                        - | 10 | £                              15.00 | £                                1.50 | £         13.50 | 1 |
| 17 | SCREEN & PROTECT | [NULL] | 5,000 | 50,000 | FLAGGED | 01/01/2025 | 09/01/2025 | 8 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                6.00 | £                     - | £                                 - | £                        - | 10 | £                              48.00 | £                                4.80 | £         43.20 | 1 |
| 18 | SCREEN & PROTECT | [NULL] | 5,000 | 50,000 | APPROVED | 01/01/2025 | 25/01/2025 | 24 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                6.00 | £                     - | £                                 - | £                        - | 10 | £                            144.00 | £                              14.40 | £       129.60 | 1 |
| 19 | DAMAGE WAIVER | [NULL] | 250 | [NULL] | FLAGGED | 01/01/2025 | 05/01/2025 | 4 | FALSE | [NULL] | [NULL] | 01/01/2024 | 01/01/2024 | 17/12/2024 | £                     - | £              15.00 | £                                 - | £                        - | 0 | £                              15.00 | £                                     - | £         15.00 | 1 |