com.beasys.commerce.ebusiness.tax
Interface TaxCalculator
- All Superinterfaces:
- BusinessSmartComponent, java.io.Serializable, Session
- public interface TaxCalculator
- extends Session
A generic Tax Calculator. Implementations for different tax packages should subclass this class
- See Also:
TaxCalculatorHome
,
TaxCalculatorImpl
calculateTax
public TaxResult calculateTax(TaxParameters params,
TaxLineList lines)
throws java.rmi.RemoteException,
SystemException,
TaxException
- Calculate tax based on the parameters given. Only sales/use taxes for Canada and the US is implemented.
The basic TaxCalculator requires an override percentage. If one of the additional modules are used,
then additional functionality will be provided. Addresses should go through getAlternateAddresses before being passed in.
Otherwise accurate tax calculation can not be performed.
- Parameters:
params
- TaxParameters
provided for tax calculationlines
- TaxLineList
provided for tax calculation- Throws:
SystemException
- TaxException
-
getAlternateAddresses
public Address[] getAlternateAddresses(Address address)
throws java.rmi.RemoteException,
SystemException,
TaxException
- Given an address (with the stipulation that the Zipcode/postalcode is correct)
return a set of addresses that may be the correct address (city, county combinations)
- Parameters:
address
- Address which needs to be checked.- Throws:
SystemException
-
calculateTotalTax
public Price calculateTotalTax(TaxParameters params,
Price total)
throws java.rmi.RemoteException,
SystemException,
TaxException
- This essentially creates an itemLine with no taxcode, 1 unit,
and calls calculateTax with the line and parameters.
- Parameters:
params
- TaxParameters
provided for tax calculationtotal
- Total amount on which tax is to be calculated- Throws:
TaxException
-
Copyright © 2001 BEA Systems, Inc. All Rights Reserved