|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.core.pricing.service.module.SimpleTaxModule
public class SimpleTaxModule
Simple factor-based tax module that can be configured by adding rates for specific postalCodes, city, state, or country. Through configuration, this module can be used to set a specific tax rate for items and shipping for a given postal code, city, state, or country. Utilizes the fulfillment group's address to determine the tax location. Useful for those with very simple tax needs.
| Field Summary | |
|---|---|
protected Double |
defaultFulfillmentGroupTaxRate
|
protected Double |
defaultItemTaxRate
|
protected Map<String,Double> |
fulfillmentGroupCityTaxRateMap
|
protected Map<String,Double> |
fulfillmentGroupCountryTaxRateMap
|
protected Map<String,Double> |
fulfillmentGroupPostalCodeTaxRateMap
|
protected Map<String,Double> |
fulfillmentGroupStateTaxRateMap
|
protected Map<String,Double> |
itemCityTaxRateMap
|
protected Map<String,Double> |
itemCountryTaxRateMap
|
protected Map<String,Double> |
itemPostalCodeTaxRateMap
|
protected Map<String,Double> |
itemStateTaxRateMap
|
static String |
MODULENAME
|
protected String |
name
|
protected boolean |
taxFees
|
| Constructor Summary | |
|---|---|
SimpleTaxModule()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MODULENAME
protected String name
protected Map<String,Double> itemPostalCodeTaxRateMap
protected Map<String,Double> itemCityTaxRateMap
protected Map<String,Double> itemStateTaxRateMap
protected Map<String,Double> itemCountryTaxRateMap
protected Map<String,Double> fulfillmentGroupPostalCodeTaxRateMap
protected Map<String,Double> fulfillmentGroupCityTaxRateMap
protected Map<String,Double> fulfillmentGroupStateTaxRateMap
protected Map<String,Double> fulfillmentGroupCountryTaxRateMap
protected Double defaultItemTaxRate
protected Double defaultFulfillmentGroupTaxRate
protected boolean taxFees
| Constructor Detail |
|---|
public SimpleTaxModule()
| Method Detail |
|---|
public Order calculateTaxForOrder(Order order)
throws TaxException
calculateTaxForOrder in interface TaxModuleTaxExceptionpublic String getName()
getName in interface TaxModulepublic void setName(String name)
setName in interface TaxModule
public Double lookupPostalCodeRate(Map<String,Double> postalCodeTaxRateMap,
String postalCode)
postalCode -
public Double lookupCityRate(Map<String,Double> cityTaxRateMap,
String city)
cityTaxRateMap, - city
public Double lookupStateRate(Map<String,Double> stateTaxRateMap,
State state)
stateTaxRateMap, - state
public Double lookupCountryRate(Map<String,Double> countryTaxRateMap,
Country country)
countryTaxRateMap, - state
protected boolean isItemTaxable(FulfillmentGroupItem item)
protected boolean isFeeTaxable(FulfillmentGroupFee fee)
public Double determineItemTaxRate(Address address)
address -
public Double determineTaxRateForFulfillmentGroup(FulfillmentGroup fulfillmentGroup)
fulfillmentGroup -
public Map<String,Double> getItemPostalCodeTaxRateMap()
public void setItemPostalCodeTaxRateMap(Map<String,Double> itemPostalCodeTaxRateMap)
public Map<String,Double> getItemCityTaxRateMap()
public void setItemCityTaxRateMap(Map<String,Double> itemCityTaxRateMap)
public Map<String,Double> getItemStateTaxRateMap()
public void setItemStateTaxRateMap(Map<String,Double> itemStateTaxRateMap)
public Map<String,Double> getItemCountryTaxRateMap()
public void setItemCountryTaxRateMap(Map<String,Double> itemCountryTaxRateMap)
public Map<String,Double> getFulfillmentGroupPostalCodeTaxRateMap()
public void setFulfillmentGroupPostalCodeTaxRateMap(Map<String,Double> fulfillmentGroupPostalCodeTaxRateMap)
public Map<String,Double> getFulfillmentGroupCityTaxRateMap()
public void setFulfillmentGroupCityTaxRateMap(Map<String,Double> fulfillmentGroupCityTaxRateMap)
public Map<String,Double> getFulfillmentGroupStateTaxRateMap()
public void setFulfillmentGroupStateTaxRateMap(Map<String,Double> fulfillmentGroupStateTaxRateMap)
public Map<String,Double> getFulfillmentGroupCountryTaxRateMap()
public void setFulfillmentGroupCountryTaxRateMap(Map<String,Double> fulfillmentGroupCountryTaxRateMap)
public Double getDefaultItemTaxRate()
public void setDefaultItemTaxRate(Double defaultItemTaxRate)
public Double getDefaultFulfillmentGroupTaxRate()
public void setDefaultFulfillmentGroupTaxRate(Double defaultFulfillmentGroupTaxRate)
public Double getFactor()
public void setFactor(Double factor)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||