Class DefaultPROSCalculationService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
de.hybris.platform.order.impl.DefaultCalculationService
de.hybris.platform.shoppingservices.order.impl.DefaultShoppingCalculationService
de.hybris.platform.prosservices.order.impl.DefaultPROSCalculationService
- All Implemented Interfaces:
de.hybris.platform.order.CalculationService,ShoppingCalculationService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractService.SerializableDTO -
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecalculateNonRefundableTaxes(AbstractOrderModel orderModel, Map<String, Double> nonRefundableTaxes) Calculate non refundable taxes.protected doublecalculateTotalTaxValues(AbstractOrderModel order, boolean recalculate, int digits, double taxAdjustmentFactor, Map<de.hybris.platform.util.TaxValue, Map<Set<de.hybris.platform.util.TaxValue>, Double>> taxValueMap) This method calculates the total amount of the taxes present in the order.protected ShoppingRepricingServiceGets repricer service.protected SearchResponseServiceGets search response service.protected PROSTransportOfferingServiceGets transport offering service.voidsetRepricerService(ShoppingRepricingService repricerService) Sets repricer service.voidsetSearchResponseService(SearchResponseService searchResponseService) Sets search response service.voidsetTransportOfferingService(PROSTransportOfferingService transportOfferingService) Sets transport offering service.Methods inherited from class de.hybris.platform.shoppingservices.order.impl.DefaultShoppingCalculationService
calculateTotals, getShoppingCommonI18NService, getShoppingOrderRequiresCalculationStrategy, getTotalPriceCalculationStrategyMap, recalculateOrderEntryIfNeeded, resetAllValues, setShoppingCommonI18NService, setShoppingOrderRequiresCalculationStrategy, setTotalPriceCalculationStrategyMap, shoppingCalculateSubtotal, shoppingCalculateTotalsMethods inherited from class de.hybris.platform.order.impl.DefaultCalculationService
addAbsoluteEntryTaxValue, addRelativeEntryTaxValue, applyGrossMixedRate, applyNetMixedRate, calculate, calculate, calculateAbsoluteTotalTaxValue, calculateDiscountValues, calculateEntries, calculateSubtotal, calculateTotals, calculateTotals, calculateTotalTaxValues, convertDiscountValues, convertPriceIfNecessary, findBasePrice, findDiscountValues, findGlobalDiscounts, findTaxValues, getTaxCorrectionFactor, getTaxFreeEntrySupport, getTaxFreeSubTotal, getUnappliedRelativeTaxValues, hasJaloStrategies, isAllEntriesTaxed, isTaxFreeEntrySupport, mustHandleTaxFreeEntries, recalculate, recalculate, recalculate, refreshOrder, requiresCalculation, resetAdditionalCosts, resetAllValues, saveOrder, setCalculatedStatus, setCalculatedStatus, setCommonI18NService, setFindDeliveryCostStrategy, setFindDiscountsStrategies, setFindPaymentCostStrategy, setFindPriceStrategy, setFindTaxesStrategies, setOrderRequiresCalculationStrategy, setTaxFreeEntrySupportMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Constructor Details
-
DefaultPROSCalculationService
public DefaultPROSCalculationService()
-
-
Method Details
-
calculateTotalTaxValues
protected double calculateTotalTaxValues(AbstractOrderModel order, boolean recalculate, int digits, double taxAdjustmentFactor, Map<de.hybris.platform.util.TaxValue, Map<Set<de.hybris.platform.util.TaxValue>, Double>> taxValueMap) This method calculates the total amount of the taxes present in the order. After the first calculation, checks if there is a repricer response of type refund in the order. If yes, calculates the compensation between the amount of each tax already paid and the refunded amount in the repricer response.- Overrides:
calculateTotalTaxValuesin classde.hybris.platform.order.impl.DefaultCalculationService- Parameters:
order- the orderrecalculate- the boolean to trigger the recalculation of the cartdigits- the digits for the apply taxtaxAdjustmentFactor- the tax Adjustment factortaxValueMap- the map of the tax values- Returns:
- the total amount of the taxes present in the order.
-
calculateNonRefundableTaxes
protected double calculateNonRefundableTaxes(AbstractOrderModel orderModel, Map<String, Double> nonRefundableTaxes) Calculate non refundable taxes. If some of the taxes have not been fully refunded, the non-refunded amount will be added to the list of the taxes in the order.- Parameters:
orderModel- the order modelnonRefundableTaxes- the non refundable taxes- Returns:
- the total value of all the taxes in the order
-
getRepricerService
Gets repricer service.- Returns:
- the repricer service
-
setRepricerService
Sets repricer service.- Parameters:
repricerService- the repricer service
-
getSearchResponseService
Gets search response service.- Returns:
- the search response service
-
setSearchResponseService
Sets search response service.- Parameters:
searchResponseService- the search response service
-
getTransportOfferingService
Gets transport offering service.- Returns:
- the transport offering service
-
setTransportOfferingService
Sets transport offering service.- Parameters:
transportOfferingService- the transport offering service
-