Introduction
This calculator Defines the unit price based on the value of the custom value. This calculator can be used to obtain a unit price based on a custom value. In this calculator the unit price is determined by multiplying the price specified in the price agreements with the value of the custom property specified in the calculator settings. It returns a rounded value using the rounding method specified in the calculator settings. If no rounding is specified, the default 'Floor' is used.
The quantity is always set to be 1 by this calculator. This makes this calculator different from the related Custom Value Quantity Calculator, that doesn't allow rounding of the total amount. (this calculator also just rounds the unit price, but by having a quant of 1 that effectively rounds the total amount)
The custom value will be taken from the order and can be inherited from Aircraft Registration, Aircraft Type, Debtor, FBO Location or Administration.
Required settings
CustomProperty(string)
Name of the custom property to use in the calculation. The custom value from this property is multiplied by the unit price from the price agreement. The custom property must exist and be applicable to the FBO location.
example: CustomProperty=Noise factor (L);
Optional settings
RoundingMethod(string)
Use this to specify the rounding method. The rounding methods can be Floor, Ceiling, NearestInteger, ToEven, or None
example. RoundingMethod=Floor
forceQuantityToOne(bool; default=true)
Use this setting to control the return value of the quantity. By default, this calculator returns always quantity = 1. By setting it to false, the quantity is set by the base calculator.
This calculator has the advantage of returning a rounded unit price in the end, whereas the Custom Value Quantity Calculator rounds the custom value and uses it as a quantity value
Important Notes
- Purpose: Calculates the unit price by multiplying the price agreement unit price by a custom value from a custom property.
- Calculation formula: UnitPrice = PriceAgreementUnitPrice × CustomValue
- Custom value source: The custom value is retrieved from the order, and can come from the aircraft registration, aircraft type, debtor, or order-level custom values.
- Custom property validation: The custom property must be applicable to the FBO location. If not, an error is thrown.
- Missing custom value: If the custom value is not defined or cannot be parsed as a decimal, a warning is shown and the unit price is set to null (shows as "awaiting price").
- Quantity: By default, the quantity is set to 1 to avoid affecting rounding. This can be changed with forceQuantityToOne=false.
- Price agreement: The calculator requires a price agreement with a unit price. The custom value multiplies this unit price.
-
Rounding: The final unit price is rounded according to RoundingMethod and the number of decimals specified for the product's unit price.
Example Configuration
Comments
0 comments
Please sign in to leave a comment.