Skip to content

Price Calculation

Akram El Assas edited this page Nov 18, 2024 · 7 revisions

Pricing Fields

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.

Discounted Price

For any price, if discounted price is set, discounted price will take over normal price.

Calculation

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:

  1. If Weekly price is set and Bi-Weekly price is set, price = 1 * WeeklyPrice + 1 * BiWeeklyPrice
  2. If Weekly price is not set and Bi-Weekly price is set, price = 3 * BiWeeklyPrice + 1 * DailyPrice
  3. If Weekly price is not set and Bi-Weekly price is not set, price = 10 * DailyPrice

Here is an example calculation for 42 days:

  1. 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
  2. If Monthly price is set and Weekly price is set and Bi-Weekly price is not set, price = 1 * MonthlyPrice + 1 * WeeklyPrice + 5 * DailyPrice
  3. If Monthly price is set and Weekly price is not set and Bi-Weekly price is set, price = 1 * MonthlyPrice + 4 * BiWeeklyPrice
  4. If Monthly price is set and Weekly price is not set and Bi-Weekly price is not set, price = 1 * MonthlyPrice + 12 * DailyPrice
  5. If Monthly price is not set and Weekly price is not set and Bi-Weekly price is not set, price = 42 * DailyPrice