Modifier and Type | Class and Description |
---|---|
protected class |
TaxMgr.StaticData
Used to store the static data of this manager
|
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log
the log
|
protected static java.lang.String |
mutex
mutex
|
protected static java.util.Map<java.lang.String,TaxMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
templateBaseDir
Modifier and Type | Method and Description |
---|---|
protected void |
addCountryStandardAttributes(KKCriteria c)
Add the standard Country attributes to the Criteria
|
java.math.BigDecimal |
addStoreTax(java.math.BigDecimal cost,
int taxClassId)
This is a utility method to directly get the final cost.
|
java.math.BigDecimal |
addStoreTax(java.math.BigDecimal cost,
int taxClassId,
int quantity)
This is a utility method to directly get the final cost.
|
java.math.BigDecimal |
addTax(java.math.BigDecimal cost,
int countryId,
int zoneId,
int taxClassId)
This is a utility method to directly get the final cost.
|
java.math.BigDecimal |
addTax(java.math.BigDecimal cost,
int countryId,
int zoneId,
int taxClassId,
int quantity)
This is a utility method to directly get the final cost.
|
Country[] |
getAllCountries()
Returns an array of all defined countries
|
Country |
getCountryPerId(int countryId)
Returns the country object for the country id, or Null if the country doesn't exist in the
DB.
|
Country |
getCountryPerName(java.lang.String countryName)
Returns the country object for the country name, or Null if the country doesn't exist in the
DB.
|
GeoZone[] |
getGeoZonesPerZone(ZoneIf zone)
Find the GeoZones that exist for a particular zone
|
int |
getStoreCountryId() |
java.math.BigDecimal |
getStoreTax(java.math.BigDecimal cost,
int taxClassId)
This is a utility method to directly return the tax that needs to be applied for a defined
item cost and a quantity of 1.
|
java.math.BigDecimal |
getStoreTax(java.math.BigDecimal cost,
int taxClassId,
int quantity)
This is a utility method to directly return the total tax that needs to be applied for a
defined item cost and quantity.
|
java.math.BigDecimal |
getStoreTaxRate(int taxClassId)
Returns the tax rate for the store for a taxClassId.
|
int |
getStoreZoneId() |
java.math.BigDecimal |
getTax(java.math.BigDecimal cost,
int countryId,
int zoneId,
int taxClassId)
This is a utility method to directly return the tax that needs to be applied for a defined
item cost and a quantity of 1.
|
java.math.BigDecimal |
getTax(java.math.BigDecimal cost,
int countryId,
int zoneId,
int taxClassId,
int quantity)
This is a utility method to directly return the total tax that needs to be applied for a
defined item cost and quantity.
|
int |
getTaxQuantityRule()
Returns the rule used to calculate tax for products with multiple quantities.
|
java.math.BigDecimal |
getTaxRate(int countryId,
int zoneId,
int taxClassId)
The tax rate can be calculated based on the country id, the zone id and the tax class id.
|
TaxRate[] |
getTaxRateObjects(int countryId,
int zoneId,
int taxClassId)
The tax rate can be calculated based on the country id, the zone id and the tax class id.
|
int |
getTaxScale()
Returns the precision use for calculating tax that matches the ADMIN_CURRENCY_DECIMAL_PLACES
configuration variable.
|
Zone |
getZonePerCountryAndCode(int countryId,
java.lang.String zoneDesc)
The zone name and zone code is compared with the zoneDesc parameter in order to determine
whether a zone exists in the DB matching zoneDesc for the country defined by countryId.
|
Zone |
getZonePerCountryAndCode(int countryId,
java.lang.String zoneDesc,
java.sql.Connection con)
The zone name and zone code is compared with the zoneDesc parameter in order to determine
whether a zone exists in the DB matching zoneDesc for the country defined by countryId.
|
Zone |
getZonePerId(int zoneId)
Get the zone with the specified Id
|
Zone |
getZonePerId(int zoneId,
java.sql.Connection con)
Get the zone with the specified Id
|
Zone[] |
getZonesPerCountry(int countryId)
Get all zones for a country.
|
void |
refreshConfigs()
Get the config variables needed to setup the tax mgr
|
Zone[] |
searchForZones(ZoneSearchIf search)
Search for zones using various search criteria
|
protected void |
setZoneCriteriaWithStandardAttributes(KKCriteria c)
Sets the criteria with the standard attributes so as not to have to repeat this code many
times.
|
acquireLock, addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkRequired, escapeHTML, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCacheMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getEventMgr, getExportMgr, getHTMLEscaper, getKonaKartConfig, getKonaKartConfig, getKonaKartConfig, getLangMgr, getManuMgr, getMiscItemMgr, getMiscPriceMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderIntegrationMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getProductsToCategoresCriteria, getPromMgr, getPunchOutMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getStoreMgr, getStoreTime, getSuggestionMgr, getTaxMgr, getTemplate, getTemplateRoot, getVelocityContextMgr, getWishListMgr, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isClassPresent, isCommunity, isDeadlockException, isEnterprise, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreSharedDb, isMultiStoreShareProducts, isMultiVendor, isUnix, manageThrowable, releaseLock, updateStaticVariablesNow
protected static org.apache.commons.logging.Log log
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,TaxMgr.StaticData> staticDataHM
public TaxMgr(KKEngIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface TaxMgrIf
java.lang.Exception
- an unexpected exceptionpublic Zone getZonePerCountryAndCode(int countryId, java.lang.String zoneDesc) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getZonePerCountryAndCode
in interface TaxMgrIf
countryId
- the countryIdzoneDesc
- the zoneDescorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionpublic Zone getZonePerCountryAndCode(int countryId, java.lang.String zoneDesc, java.sql.Connection con) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getZonePerCountryAndCode
in interface TaxMgrIf
countryId
- the countryIdzoneDesc
- the zoneDesccon
- Connection for transactionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionpublic Zone[] getZonesPerCountry(int countryId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getZonesPerCountry
in interface TaxMgrIf
countryId
- the countryIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionpublic Zone[] searchForZones(ZoneSearchIf search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
searchForZones
in interface TaxMgrIf
search
- the searchorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionpublic Zone getZonePerId(int zoneId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getZonePerId
in interface TaxMgrIf
zoneId
- the zoneIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionpublic Zone getZonePerId(int zoneId, java.sql.Connection con) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getZonePerId
in interface TaxMgrIf
zoneId
- the zoneIdcon
- Connection for transactionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionpublic java.math.BigDecimal getStoreTaxRate(int taxClassId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, com.konakart.app.KKException
TaxMgrIf
getStoreTaxRate
in interface TaxMgrIf
taxClassId
- the taxClassIdcom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionpublic java.math.BigDecimal getTaxRate(int countryId, int zoneId, int taxClassId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, com.konakart.app.KKException
getTaxRate
in interface TaxMgrIf
countryId
- the countryIdzoneId
- the zoneIdtaxClassId
- the taxClassIdcom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionpublic TaxRate[] getTaxRateObjects(int countryId, int zoneId, int taxClassId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, com.konakart.app.KKException
getTaxRateObjects
in interface TaxMgrIf
countryId
- the countryIdzoneId
- the zoneIdtaxClassId
- the taxClassIdcom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionpublic java.math.BigDecimal getTax(java.math.BigDecimal cost, int countryId, int zoneId, int taxClassId) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getTax
in interface TaxMgrIf
cost
- the costcountryId
- the countryIdzoneId
- the zoneIdtaxClassId
- the taxClassIdcom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public java.math.BigDecimal getTax(java.math.BigDecimal cost, int countryId, int zoneId, int taxClassId, int quantity) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getTax
in interface TaxMgrIf
cost
- the costcountryId
- the countryIdzoneId
- the zoneIdtaxClassId
- the taxClassIdquantity
- the quantitycom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public java.math.BigDecimal getStoreTax(java.math.BigDecimal cost, int taxClassId) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getStoreTax
in interface TaxMgrIf
cost
- the costtaxClassId
- the taxClassIdcom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public java.math.BigDecimal getStoreTax(java.math.BigDecimal cost, int taxClassId, int quantity) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getStoreTax
in interface TaxMgrIf
cost
- the costtaxClassId
- the taxClassIdquantity
- the quantitycom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public java.math.BigDecimal addTax(java.math.BigDecimal cost, int countryId, int zoneId, int taxClassId) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
addTax
in interface TaxMgrIf
cost
- the costcountryId
- the countryIdzoneId
- the zoneIdtaxClassId
- the taxClassIdcom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public java.math.BigDecimal addTax(java.math.BigDecimal cost, int countryId, int zoneId, int taxClassId, int quantity) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
addTax
in interface TaxMgrIf
cost
- the costcountryId
- the countryIdzoneId
- the zoneIdtaxClassId
- the taxClassIdquantity
- the quantitycom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public java.math.BigDecimal addStoreTax(java.math.BigDecimal cost, int taxClassId) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
addStoreTax
in interface TaxMgrIf
cost
- the costtaxClassId
- the taxClassIdcom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public java.math.BigDecimal addStoreTax(java.math.BigDecimal cost, int taxClassId, int quantity) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
addStoreTax
in interface TaxMgrIf
cost
- the costtaxClassId
- the taxClassIdquantity
- the quantitycom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public GeoZone[] getGeoZonesPerZone(ZoneIf zone) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getGeoZonesPerZone
in interface TaxMgrIf
zone
- the zoneorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionpublic Country[] getAllCountries() throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, com.konakart.app.KKException
TaxMgrIf
getAllCountries
in interface TaxMgrIf
com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionprotected void addCountryStandardAttributes(KKCriteria c)
c
- Criteria to be populatedpublic Country getCountryPerName(java.lang.String countryName) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getCountryPerName
in interface TaxMgrIf
countryName
- the countryNamecom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public Country getCountryPerId(int countryId) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getCountryPerId
in interface TaxMgrIf
countryId
- the countryIdcom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public int getTaxQuantityRule() throws com.konakart.app.KKException
getTaxQuantityRule
in interface TaxMgrIf
com.konakart.app.KKException
- an unexpected KKException exceptionpublic int getTaxScale() throws com.konakart.app.KKException
getTaxScale
in interface TaxMgrIf
com.konakart.app.KKException
- an unexpected KKException exceptionprotected void setZoneCriteriaWithStandardAttributes(KKCriteria c)
c
- the cpublic int getStoreCountryId() throws com.konakart.app.KKException
getStoreCountryId
in interface TaxMgrIf
com.konakart.app.KKException
- an unexpected KKException exceptionpublic int getStoreZoneId() throws com.konakart.app.KKException
getStoreZoneId
in interface TaxMgrIf
com.konakart.app.KKException
- an unexpected KKException exceptionCopyright © 2018 DS Data Systems UK Ltd.