Class OrderRatesGeneratorServiceImpl
java.lang.Object
ch.tocco.nice2.optional.order.impl.service.OrderRatesGeneratorServiceImpl
- All Implemented Interfaces:
OrderRatesGeneratorService
@Component
public class OrderRatesGeneratorServiceImpl
extends Object
implements OrderRatesGeneratorService
this service calculates the Order_rates for an Order, the rules are as follows
- the initial_rate is always enforced (if the value exceeds the totalGrossMc
then one rate with the value of totalGrossMc is created)
- normal rates refers to all rates except an initial_rate if present and the last rate
- the minimal_rate is enforced for all normal rates
- the rounding is applied to all normal rates
- no negative or 0.00 rates are created; therefore the numberOfRates is only a guideline and not enforced
if other criteria have to be met
-
Constructor Summary
ConstructorDescriptionOrderRatesGeneratorServiceImpl
(CommandExecutor executor, TextResources textResources) -
Method Summary
Modifier and TypeMethodDescriptionvoid
generateOrderRates
(Entity order) the Order_rates are generated based on settings on the order and the related Payment_schedule
-
Constructor Details
-
OrderRatesGeneratorServiceImpl
-
-
Method Details
-
generateOrderRates
Description copied from interface:OrderRatesGeneratorService
the Order_rates are generated based on settings on the order and the related Payment_schedule- Specified by:
generateOrderRates
in interfaceOrderRatesGeneratorService
- Parameters:
order
- the order for which Order_rates should be generated
-