public class SapCartCalculationService extends DefaultCalculationService
AbstractService.SerializableDTOmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
SapCartCalculationService() |
| 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 java.util.List<DiscountValue> |
findDiscountValues(AbstractOrderEntryModel entry) |
ModuleConfigurationAccess |
getModuleConfigurationAccess() |
SapPricingCartService |
getSapPricingCartService() |
SapPricingEnablementService |
getSapPricingEnablementService() |
protected boolean |
isSyncOrdermgmtEnabled() |
void |
recalculate(AbstractOrderModel order)
recalculates the whole order and all its entries.
|
protected void |
resetAdditionalCosts(AbstractOrderModel order,
java.util.Collection<TaxValue> relativeTaxValues) |
protected void |
resetAllValues(AbstractOrderEntryModel entry) |
protected java.util.Map |
resetAllValues(AbstractOrderModel order) |
void |
setModuleConfigurationAccess(ModuleConfigurationAccess moduleConfigurationAccess) |
void |
setSapPricingCartService(SapPricingCartService sapPricingCartService) |
void |
setSapPricingEnablementService(SapPricingEnablementService sapPricingEnablementService) |
addAbsoluteEntryTaxValue, addRelativeEntryTaxValue, applyGrossMixedRate, applyNetMixedRate, calculate, calculateAbsoluteTotalTaxValue, calculateDiscountValues, calculateEntries, calculateSubtotal, calculateTotals, calculateTotals, calculateTotalTaxValues, calculateTotalTaxValues, convertDiscountValues, convertPriceIfNecessary, findBasePrice, findGlobalDiscounts, findTaxValues, getTaxCorrectionFactor, getTaxFreeEntrySupport, getTaxFreeSubTotal, getUnappliedRelativeTaxValues, hasJaloStrategies, isAllEntriesTaxed, isTaxFreeEntrySupport, mustHandleTaxFreeEntries, recalculate, recalculate, recalculateOrderEntryIfNeeded, refreshOrder, requiresCalculation, saveOrder, setCalculatedStatus, setCalculatedStatus, setCommonI18NService, setFindDeliveryCostStrategy, setFindDiscountsStrategies, setFindPaymentCostStrategy, setFindPriceStrategy, setFindTaxesStrategies, setOrderRequiresCalculationStrategy, setTaxFreeEntrySupportgetModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplacepublic SapPricingCartService getSapPricingCartService()
public void setSapPricingCartService(SapPricingCartService sapPricingCartService)
public SapPricingEnablementService getSapPricingEnablementService()
public void setSapPricingEnablementService(SapPricingEnablementService sapPricingEnablementService)
public 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 resetAllValues(AbstractOrderEntryModel entry) throws CalculationException
resetAllValues in class DefaultCalculationServiceCalculationExceptionprotected java.util.Map resetAllValues(AbstractOrderModel order) throws CalculationException
resetAllValues in class DefaultCalculationServiceCalculationExceptionprotected void resetAdditionalCosts(AbstractOrderModel order, java.util.Collection<TaxValue> relativeTaxValues)
resetAdditionalCosts in class DefaultCalculationServiceprotected java.util.List<DiscountValue> findDiscountValues(AbstractOrderEntryModel entry) throws CalculationException
findDiscountValues in class DefaultCalculationServiceCalculationExceptionprotected boolean isSyncOrdermgmtEnabled()
public ModuleConfigurationAccess getModuleConfigurationAccess()
public void setModuleConfigurationAccess(ModuleConfigurationAccess moduleConfigurationAccess)
Copyright © 2018 SAP SE. All Rights Reserved.