Class DefaultApplyExternalTaxesStrategy
- java.lang.Object
-
- de.hybris.platform.externaltax.impl.DefaultApplyExternalTaxesStrategy
-
- All Implemented Interfaces:
ApplyExternalTaxesStrategy
public class DefaultApplyExternalTaxesStrategy extends java.lang.Object implements ApplyExternalTaxesStrategy
Applies a givenExternalTaxDocumentto 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 Constructor Description DefaultApplyExternalTaxesStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.math.BigDecimalapplyEntryTaxes(AbstractOrderModel order, ExternalTaxDocument taxDoc)voidapplyExternalTaxes(AbstractOrderModel order, ExternalTaxDocument externalTaxes)protected java.math.BigDecimalapplyShippingCostTaxes(AbstractOrderModel order, ExternalTaxDocument taxDoc)protected voidassertValidTaxValue(AbstractOrderModel order, TaxValue value)protected voidsetTotalTax(AbstractOrderModel order, java.math.BigDecimal totalTaxSum)
-
-
-
Method Detail
-
applyExternalTaxes
public void applyExternalTaxes(AbstractOrderModel order, ExternalTaxDocument externalTaxes)
- Specified by:
applyExternalTaxesin interfaceApplyExternalTaxesStrategy
-
applyEntryTaxes
protected java.math.BigDecimal applyEntryTaxes(AbstractOrderModel order, ExternalTaxDocument taxDoc)
-
applyShippingCostTaxes
protected java.math.BigDecimal applyShippingCostTaxes(AbstractOrderModel order, ExternalTaxDocument taxDoc)
-
setTotalTax
protected void setTotalTax(AbstractOrderModel order, java.math.BigDecimal totalTaxSum)
-
assertValidTaxValue
protected void assertValidTaxValue(AbstractOrderModel order, TaxValue value)
-
-