Class DefaultApplyExternalTaxesStrategy
java.lang.Object
de.hybris.platform.externaltax.impl.DefaultApplyExternalTaxesStrategy
- All Implemented Interfaces:
ApplyExternalTaxesStrategy
Applies a given
ExternalTaxDocument to a net order following these rules:
- the order must be of type 'net'
- all external tax entry numbers must be matching one of the order entries' numbers
- all external tax values must be absolute numbers matching the order currency
- for each order entry : store tax values from
ExternalTaxDocument.getTaxesForOrderEntry(int)as own tax values - for each order entry : if
ExternalTaxDocument.getTaxesForOrderEntry(int)returns no value or empty value the own tax values are cleared - shipping cost taxes from
ExternalTaxDocument.getShippingCostTaxes()are stored as order total taxes ( seeAbstractOrderModel.getTotalTaxValues() - the sum of shipping and entry taxes is stored as order total tax ( see
)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BigDecimalapplyEntryTaxes(AbstractOrderModel order, ExternalTaxDocument taxDoc) voidapplyExternalTaxes(AbstractOrderModel order, ExternalTaxDocument externalTaxes) protected BigDecimalapplyShippingCostTaxes(AbstractOrderModel order, ExternalTaxDocument taxDoc) protected voidassertValidTaxValue(AbstractOrderModel order, TaxValue value) protected voidsetTotalTax(AbstractOrderModel order, BigDecimal totalTaxSum)
-
Constructor Details
-
DefaultApplyExternalTaxesStrategy
public DefaultApplyExternalTaxesStrategy()
-
-
Method Details
-
applyExternalTaxes
- Specified by:
applyExternalTaxesin interfaceApplyExternalTaxesStrategy
-
applyEntryTaxes
-
applyShippingCostTaxes
-
setTotalTax
-
assertValidTaxValue
-