Introduction
Defines the price unit quantity based on the number of nights the aircraft is on the ground, where:
- a night is defined by the passing of 00:00.
If the arrival or departure time is not known, zero is returned for now (This could change in the future, as 'unknown' would be better).
Overnight Parking Calculator Settings
- FreeMinutesAfterArrival (int; default=0)
Number of free parking minutes immediately after arrival. Applied before counting overnight stays.
- ChargeFreeMinutesIfStayingLonger (bool; default=false)
If true, free minutes after arrival are charged if the total stay exceeds the free period. If false, free minutes are never charged regardless of stay duration.
- AlwaysChargeAfterFreeMinutes (bool; default=false)
If true, charges at least 1 night if the aircraft stays longer than the free period, even if no full overnight stay occurred. If false, only charges when there is an actual overnight stay.
- Maximum (int?; default=null)
Maximum number of nights to charge. If the calculated nights exceed this value, the quantity is capped at this maximum. If not specified, there is no maximum limit.
- SubtractFromMaximum (bool; default=false)
If true and Maximum is set, the quantity is calculated as Maximum - nights. Used for discounts (e.g., set Maximum=1 and SubtractFromMaximum=true to give a discount for 0 nights: 0 nights = 1, 1+ nights = 0).
- MultiplyByTons (bool; default=false)
If true, multiplies the calculated number of nights by the aircraft's MTOW in tons. If false, quantity is not multiplied by tons.
- MultiplyRemainderAboveTons (int; default=0)
When MultiplyByTons=true, only the remainder above this value is multiplied. Formula: Quantity × (MTOWTons - MultiplyRemainderAboveTons). Example: If MultiplyRemainderAboveTons=2, only the tons above 2 are multiplied.
- MtowRoundingMethod (string; default=Ceiling)
How to round the MTOW in tons when MultiplyByTons is enabled.
Options:- Ceiling - Rounds up
- Floor - Rounds down
- NearestInteger - Rounds to nearest (0.5 rounds up)
- TakeMTOWInKgFromCustomProperty (string; default="")
Name of a custom property to use for MTOW in kg instead of the aircraft registration's MTOW. If not specified, uses the aircraft registration MTOW.
ForceToBlankIfCustomPropertyIsNotSet (bool; default=true)
If true and TakeMTOWInKgFromCustomProperty is specified but not set, the quantity will be blank. If false, falls back to the aircraft registration MTOW.
Important Notes
- Overnight calculation: Counts the number of nights (overnight stays) between arrival and departure. A night is counted when the stay spans multiple calendar days.
- Free minutes: FreeMinutesAfterArrival is applied first. If ChargeFreeMinutesIfStayingLonger=false, the free period is excluded from the calculation. If ChargeFreeMinutesIfStayingLonger=true, the free period is included if the stay exceeds it.
- Minimum charge: If AlwaysChargeAfterFreeMinutes=true and the aircraft stays longer than the free period but doesn't have a full overnight stay, the quantity is set to 1.
- Both arrival and departure times are required: The calculator requires both arrival and departure times. If either is missing, a warning is shown and the quantity is set to 0.
Maximum and subtract: When Maximum is set and SubtractFromMaximum=true, the calculation is inverted. This is useful for discount products (e.g., "No overnight discount" where 0 nights = discount, 1+ nights = no discount).
Comments
0 comments
Please sign in to leave a comment.