public class DefaultC4CCalculationService extends DefaultCalculationService
AbstractService.SerializableDTOmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultC4CCalculationService() |
| Modifier and Type | Method and Description |
|---|---|
void |
calculate(AbstractOrderModel order)
Calculates the given order and all its entries unless they're already calculated and the order has not been
modified.
|
void |
calculateTotals(AbstractOrderModel order,
boolean recalculate)
(re)calculates all totals for the given order.
|
protected void |
calculateTotals(AbstractOrderModel order,
boolean recalculate,
java.util.Map<TaxValue,java.util.Map<java.util.Set<TaxValue>,java.lang.Double>> taxValueMap)
calculates all totals.
|
void |
recalculate(AbstractOrderModel order)
recalculates the whole order and all its entries.
|
void |
setOrderRequireCalculationStrategy(OrderRequiresCalculationStrategy orderRequireCalculationStrategy) |
void |
setQuoteRequiresCalculationStrategy(C4CQuoteRequiresCalculationStrategy quoteRequiresCalculationStrategy) |
addAbsoluteEntryTaxValue, addRelativeEntryTaxValue, applyGrossMixedRate, applyNetMixedRate, calculate, calculateAbsoluteTotalTaxValue, calculateDiscountValues, calculateEntries, calculateSubtotal, calculateTotals, calculateTotalTaxValues, calculateTotalTaxValues, convertDiscountValues, convertPriceIfNecessary, findBasePrice, findDiscountValues, findGlobalDiscounts, findTaxValues, getTaxCorrectionFactor, getTaxFreeEntrySupport, getTaxFreeSubTotal, getUnappliedRelativeTaxValues, hasJaloStrategies, isAllEntriesTaxed, isTaxFreeEntrySupport, mustHandleTaxFreeEntries, recalculate, recalculate, recalculateOrderEntryIfNeeded, refreshOrder, requiresCalculation, resetAdditionalCosts, resetAllValues, resetAllValues, saveOrder, setCalculatedStatus, setCalculatedStatus, setCommonI18NService, setFindDeliveryCostStrategy, setFindDiscountsStrategies, setFindPaymentCostStrategy, setFindPriceStrategy, setFindTaxesStrategies, setOrderRequiresCalculationStrategy, setTaxFreeEntrySupportgetModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplacepublic void calculate(AbstractOrderModel order) throws CalculationException
CalculationServiceSo this method will fetch prices, taxes and discounts (using spring configurable strategies) for uncalculated or modified entries only - all other will remain unchanged. If at least one entry has been calculated or the order itself has been modified the totals will be calculated as well.
if you merely like to adjust totals while keeping prices, taxes and discounts you should call
CalculationService.calculateTotals(AbstractOrderModel, boolean) instead (e.g. if just a quantity has changed or prices have
been imported and cannot be found via price factory ).
calculate in interface CalculationServicecalculate in class DefaultCalculationServiceorder - target AbstractOrderModelCalculationException - if a pricefactory error occurred.public void recalculate(AbstractOrderModel order) throws CalculationException
CalculationService
if you merely like to adjust totals while keeping prices, taxes and discounts you should call
CalculationService.calculateTotals(AbstractOrderModel, boolean) instead (e.g. if just a quantity has changed or prices have
been imported and cannot be found via price factory ).
recalculate in interface CalculationServicerecalculate in class DefaultCalculationServiceorder - target AbstractOrderModelCalculationException - if a pricefactory error occurred.public void calculateTotals(AbstractOrderModel order, boolean recalculate) throws CalculationException
CalculationServicecalculateTotals in interface CalculationServicecalculateTotals in class DefaultCalculationServiceorder - target AbstractOrderModelrecalculate - forces setting total even if order is marked as calculatedCalculationExceptionprotected void calculateTotals(AbstractOrderModel order, boolean recalculate, java.util.Map<TaxValue,java.util.Map<java.util.Set<TaxValue>,java.lang.Double>> taxValueMap) throws CalculationException
DefaultCalculationServicecalculateTotals in class DefaultCalculationServicerecalculate - if false calculation is done only if the calculated flag is not settaxValueMap - the map { tax value -> Double( sum of all entry totals for this tax ) } obtainable via
DefaultCalculationService.calculateSubtotal(AbstractOrderModel, boolean)CalculationExceptionpublic void setOrderRequireCalculationStrategy(OrderRequiresCalculationStrategy orderRequireCalculationStrategy)
public void setQuoteRequiresCalculationStrategy(C4CQuoteRequiresCalculationStrategy quoteRequiresCalculationStrategy)
Copyright © 2018 SAP SE. All Rights Reserved.