Skip to content

Seasonal Pricing & Rate Matrix

Charter replaces annual spreadsheet tariff updates with a yearless Central Rates Manager (RateMatrixService) and an exact minor-unit PricingEngine.

Central Rates Manager shows yearless monthly and date-range coverage across the entire fleet with inline editing and Bulk Adjust.

1. Yearless RecurringRateCalendar & Precedence

Section titled “1. Yearless RecurringRateCalendar & Precedence”

Each yacht defines recurring seasonal rate blocks that roll over automatically every calendar year without manual date duplication. PricingEngine::calculate() (max duration MAX_CHARTER_DAYS = 730) resolves nightly/weekly/hourly fees in exact Money + DecimalMath arithmetic in strict precedence order:

  1. Date Range Rate: Specific yearless calendar windows (for example Dec 20 - Jan 05 festive holiday tariff) take highest priority.
  2. Monthly Rate: Assigned month pills (for example May, October vs. July, August).
  3. Pro-Rata Math: Shorter or longer charters divide weekly rates using pro_rata_divisor (7 nights standard or 6 days divisor).
  4. Discounts: Evaluates stackable vs. non-stackable discount competition, capped by max_discount_percent (default 20%).
  5. VAT Override Chain: Yacht override -> Destination VAT -> Marina VAT -> Global default_vat_rate.
  6. APA (default_apa_percent): Applied to the VAT-excluded net charter fee (automatically 0% for CharterTerms::Bareboat).
  7. Extras: Separated cleanly into extrasWithBooking (ExtraPayableAt::WithBooking) and extrasAtBase (ExtraPayableAt::AtBase).

2. Fail-Closed Multi-Currency Conversion (CurrencyConverter)

Section titled “2. Fail-Closed Multi-Currency Conversion (CurrencyConverter)”

CurrencyConverter delegates formatting and exchange rates directly to ProcessWire\Currency (applySpread: true). If a requested currency pair has no active exchange rate or a zero rate, CurrencyConverter throws a WireException instead of silently falling back to 1.0.

3. Central Rates Manager & Bulk Adjustments (RateMatrixService)

Section titled “3. Central Rates Manager & Bulk Adjustments (RateMatrixService)”
  • Filter the entire fleet by yacht name/ref, category, destination, currency, or pricing state (All, Missing, Priced).
  • Inspect live color-coded month states (Full month, Partial / date range, Overlap conflict, Unassigned) computed by RecurringRateCalendar::analyzeMonthStates().
  • Save individual yacht rates (./rates-save/) under setExpectedModified optimistic concurrency locking.
  • Click Bulk Adjust (./rates-bulk/) to preview (dryRun: true) and commit percentage or fixed-amount tariff adjustments across filtered or selected yachts in exact Money arithmetic.
{
"currencyCode": "EUR",
"baseCurrency": "EUR",
"fxRate": 1,
"nights": 7,
"baseFee": "29150.00",
"discountTotal": "2915.00",
"netCharterFee": "26235.00",
"vatRate": 20,
"vatAmount": "5247.00",
"apaPercent": 30,
"apaAmount": "7870.50",
"extrasWithBooking": "950.00",
"extrasAtBase": "400.00",
"grandTotal": "40302.50",
"totalWithBaseExtras": "40702.50"
}

Step-by-Step: Updating Fleet Tariffs for a New Season (Admin UI)

Section titled “Step-by-Step: Updating Fleet Tariffs for a New Season (Admin UI)”
  1. Open Setup -> Charter -> Rates Manager and click the Priced filter pill (or filter by category such as Gulets).
  2. Click Bulk Adjust in the top-right corner, choose Percentage (+5%), and enable Dry Run Preview first to inspect every yacht’s before/after weekly rate.
  3. Confirm the preview looks accurate and click Apply Adjustments to commit all rows atomically in exact minor-unit math.

Next steps