-
-
Notifications
You must be signed in to change notification settings - Fork 219
Price Calculation
Akram El Assas edited this page Nov 18, 2024
·
7 revisions
Cars have the following pricing fields:
- Daily price (1 day - required)
- Discounted Daily price (1 day - optional)
- Bi-Weekly price (3 days - optional)
- Discounted Bi-Weekly price (3 days - optional)
- Weekly price (7 days - optional)
- Discounted Weekly price (7 days - optional)
- Monthly price (30 days - optional)
- Discounted Monthly price (30 days - optional)
Only Daily price is required. Other prices are optional.
For any price, if discounted price is set, discounted price will take over normal price.
If all other pricing fields are not set, price for N
days is: N * DailyPrice
Otherwise, price is calculated with pricing fields set and daily price.
Here is an example calculation for 10 days:
- If Weekly price is set and Bi-Weekly price is set,
price = 1 * WeeklyPrice + 1 * BiWeeklyPrice
- If Weekly price is not set and Bi-Weekly price is set,
price = 3 * BiWeeklyPrice + 1 * DailyPrice
- If Weekly price is not set and Bi-Weekly price is not set,
price = 10 * DailyPrice
Here is an example calculation for 42 days:
- If Monthly price is set and Weekly price is set and Bi-Weekly price is set,
price = 1 * MonthlyPrice + 1 * WeeklyPrice + 1 * BiWeeklyPrice + 2 * DailyPrice
- If Monthly price is set and Weekly price is set and Bi-Weekly price is not set,
price = 1 * MonthlyPrice + 1 * WeeklyPrice + 5 * DailyPrice
- If Monthly price is set and Weekly price is not set and Bi-Weekly price is set,
price = 1 * MonthlyPrice + 4 * BiWeeklyPrice
- If Monthly price is set and Weekly price is not set and Bi-Weekly price is not set,
price = 1 * MonthlyPrice + 12 * DailyPrice
- If Monthly price is not set and Weekly price is not set and Bi-Weekly price is not set,
price = 42 * DailyPrice
Copyright © 2024 Akram El Assas. All rights reserved.