How to configure an Off-Peak Landing Discount whilst maintaining a minimum fee

Scenario

For this example, landing fees at Basel Airport are calculated based on MTOW. The fee calculation uses the below 'unit price calculation formula' to multiply MTOW Tons x Unit price. The price agreements are then setup according to custom values defining an emission class against the aircraft registration.

Each registration is assigned a custom value to define the emission value required for the calculation.
A minimum charge of CHF 70.15 is applied for landing. If the calculation results in an amount lower than CHF 70.15 then the minimum amount should be applied.

Unit Price Caclulation Formula
((Func<decimal?>)(() => {
decimal? result = null;
 
if (input.UnitPrice.HasValue && input.MtowInKg.HasValue && input.CustomValue.HasValue)
{
var emission = input.CustomValue.Value;
int mtowTons = Convert.ToInt32(Math.Ceiling((input.MtowInKg.Value / 1000M)));
result = input.UnitPrice * emission * mtowTons;
result = (result.Value);
}
 
return (decimal?)result;
}))();

The price agreement setup uses the filters: Custom value (emission value), MTOW below, minimum amount and price.

In the below example, prices have been defined for aircraft containing the custom value 'A' classification for emission.
Aircraft below 6-tonnes should not be applied this landing rate, so the price is zero. Prices are then applicable in terms of weight, for aircraft 6-50-tonnes and 50-101-tonnes. In all cases the minimum fee is applicable.


When an aircraft of any emission classification arrives during certain off-peak hours, the airport offers a discount of -18% but the minimum fee of CHF 70.15 is still applicable. 
Two peak lists must be created in order to apply the discount between 'Mon-Sat 0600-2200' and 'Sun & Holidays 0800-2200'. These 'peak category values' are then used as an additional filter when creating the discounted price agreement.

Under usual procedure, there are two ways of applying a discount:

  1. Using a separate child product such as 'Discount' is setup to simply subtract -18% from the price of the parent product and show a discount on the handling order. 
    This option however does not allow FBO One to recognize that the minimum fee of CHF 70.15 should be applied even after the discount and so cannot be used here

  2. If the discount is not to be shown on a separate line, a price agreement of -18% can be assigned within the list of price agreements for the landing fee product and subtracts -18% from the price within the order (as shown below). For this scenario, this setup does not work given the 'Unit price calculation formula' in place within the product

As neither of the above methods are available to apply the -18% discount, the only way to configure this is through the use of individual price agreements. Each price agreement must be created per emission class, per MTOW weight band and per off-peak category. The 'minimum amount' field should be used to allow the minimum fee of CHF 70.15 to apply regardless of the calculated amount. The price should be manually calculated by subtracting 18% from the standard rate for each corresponding emission class and per MTOW weight band.

Example 

Emission Class A Landing fees per weight band are setup as follows:

The off-peak discounted emission Class A Landing fees are setup in addition to the above prices by adding the 'peak category value' and the price -18% as follows: