|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.integrations.taxware.TaxWareCalculateTax
public class TaxWareCalculateTax
Using the associated TaxService, this class calculates the sales/world tax for the items. This class implements the multiple items requests sent to Taxware, where items are represented by the shipping destination group objects passed in TaxRequestInfo. Also, it will use the VeraZip system to provide accurate means of verifying the city-state-zip address info. Using verazip can be triggered, the SalesUse system can verify address to some extent, but not as good as VeraZip.
SalesTaxService
,
TaxRequest
,
TaxResult
,
TaxRequestInfo
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
static int |
MAXIMUM_RECORD_SIZE
|
protected boolean |
mSubmitShipping
Whether or not to submit shipping cost to TaxWare as freight. |
protected TaxService |
mTaxService
Reference to the sales tax service. |
protected boolean |
mUseVerazip
Whether or not to attempt to use VeraZip. |
protected TaxWareVerifyZipInfo |
mVerifyZipInfo
|
protected boolean |
mWritingAudit
Whether or not to write this transaction to the TaxWare audit file. |
protected VeraZipOrderImpl |
zipInfo
|
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
TaxWareCalculateTax()
Constructor for the service. |
Method Summary | |
---|---|
TaxResult[] |
calculateProcess(TaxRequestInfo ccinfo)
|
TaxStatus |
calculateTax(TaxRequestInfo ccinfo)
Calculate tax on the information specified in TaxRequestInfo |
TaxStatus[] |
calculateTaxByShipping(TaxRequestInfo ccinfo)
Calculate tax on the information specified in TaxRequestInfo. |
TaxResult[] |
calculateTaxes(TaxRequestInfo ccinfo,
int index,
int until)
|
void |
doStartService()
This is called after a Service has been created, placed into the naming hierarchy, and initialized with its configured property values. |
static double |
DoubleFormat(double a)
|
protected TaxService |
getAppropriateSalesTaxService(TaxRequestInfo pOrder)
Returns the TaxService appropriate for the request. |
boolean |
getSubmitShipping()
Get whether shipping cost from the order will be submitted to taxware as freight |
TaxService |
getTaxService()
Get the TaxService used to generate the TaxRequest. |
boolean |
getUseVerazip()
Get whether or not to attempt to use VeraZip. |
TaxWareVerifyZipInfo |
getVerifyZipInfo()
|
boolean |
getWritingAudit()
Returns whether we are writing this transaction to the TaxWare audit file. |
static void |
main(java.lang.String[] args)
Run some simple tests |
protected void |
modifyRequest(AddressVerificationInfo pOrder,
TaxRequest request)
Modifies the request before submitting it to TaxWare. |
protected TaxStatus |
recordResult(TaxResult[] taxresult)
Adds up the taxresults' tax properties |
protected TaxStatus[] |
recordResultByShipping(TaxResult[] taxresult)
Returns an array of taxStatus objects at the shipping level |
protected TaxStatus |
setErrorAndGetReturnValue(java.lang.String pKey,
java.lang.String pMessage)
Sets the error message and returns the TaxStatus object |
void |
setSubmitShipping(boolean pSubmitShipping)
Set whether shipping cost from the order will be submitted to taxware as freight |
void |
setTaxService(TaxService pTaxService)
Set the TaxService used to generate the TaxRequest. |
void |
setUseVerazip(boolean pUseVerazip)
Set whether or not to attempt to use VeraZip. |
void |
setVerifyZipInfo(TaxWareVerifyZipInfo pVerifyZipInfo)
|
void |
setWritingAudit(boolean pWritingAudit)
Set whether to write this transaction to the TaxWare audit file. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static final int MAXIMUM_RECORD_SIZE
protected TaxWareVerifyZipInfo mVerifyZipInfo
protected VeraZipOrderImpl zipInfo
protected TaxService mTaxService
protected boolean mSubmitShipping
protected boolean mUseVerazip
protected boolean mWritingAudit
Constructor Detail |
---|
public TaxWareCalculateTax()
Method Detail |
---|
public TaxWareVerifyZipInfo getVerifyZipInfo()
public void setVerifyZipInfo(TaxWareVerifyZipInfo pVerifyZipInfo)
public void setUseVerazip(boolean pUseVerazip)
public boolean getUseVerazip()
public void setSubmitShipping(boolean pSubmitShipping)
public boolean getSubmitShipping()
public void setWritingAudit(boolean pWritingAudit)
boolean
- whether or not to writepublic boolean getWritingAudit()
public void setTaxService(TaxService pTaxService)
public TaxService getTaxService()
protected TaxService getAppropriateSalesTaxService(TaxRequestInfo pOrder)
protected TaxStatus setErrorAndGetReturnValue(java.lang.String pKey, java.lang.String pMessage)
protected void modifyRequest(AddressVerificationInfo pOrder, TaxRequest request)
In this version, adds GEOCODE information from verazip if available.
You may override this method to prevent calling verazip or to add addition information to the request, like a non standard tax rates.
public TaxStatus calculateTax(TaxRequestInfo ccinfo)
TaxProcessor
calculateTax
in interface TaxProcessor
ccinfo
- the TaxInfo reference which contains all the tax calculation data
public TaxStatus[] calculateTaxByShipping(TaxRequestInfo ccinfo)
TaxProcessor
calculateTaxByShipping
in interface TaxProcessor
ccinfo
- the TaxInfo reference which contains all the tax calculation data
public TaxResult[] calculateProcess(TaxRequestInfo ccinfo) throws TaxwareException
TaxwareException
public TaxResult[] calculateTaxes(TaxRequestInfo ccinfo, int index, int until) throws TaxwareException
TaxwareException
protected TaxStatus recordResult(TaxResult[] taxresult)
An
- array of taxResult objects
TaxResult
,
TaxStatus
protected TaxStatus[] recordResultByShipping(TaxResult[] taxresult)
An
- array of taxResult objects
TaxResult
,
TaxStatus
public static double DoubleFormat(double a)
public void doStartService()
GenericService
doStartService
in class GenericService
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |