com.ibm.commerce.taxation.commands
Class ApplyOrderTaxesCmdImpl
com.ibm.commerce.taxation.commands.ApplyOrderTaxesCmdImpl
- All Implemented Interfaces:
- ApplyOrderTaxesCmd
- public class ApplyOrderTaxesCmdImpl
- implements ApplyOrderTaxesCmd
The ApplyOrderTaxesCmd
Task Command default Implementation is called
by the OrderPrepareCmd
Controller Command to set the different tax
amounts (e.g. GST, PST etc.) for each OrderItem supplied by OrderPrepare.
It uses CalculationCodes with calculationUsage of Taxation to calculate the
different tax amounts for each of the OrderItems.
If the command is successful, it will invoke another Task Command to set the
tax amounts in ORDERITEMS.
If unsuccessful, the command throws the ECApplicationException
specifying an Error Code of ERRCODE_NO_TAX and the Error View named CALCODE_ERRVIEW.
Field Summary |
static java.lang.String |
COPYRIGHT
|
Method Summary |
void |
init()
This method sets up the system for taxation :
Tax Types for Calculation Usages.
Tax Categories for each of the Tax Types.
|
protected void |
postApplyCalculationUsages(java.lang.Integer usageType)
Check if the command is unsuccessful. |
protected void |
postCalculationCodeApply(java.util.Hashtable orderItemABHash,
java.lang.Integer usageType)
Check for each orderitems if the tax amounts have been successfully
calculated. |
COPYRIGHT
public static final java.lang.String COPYRIGHT
ApplyOrderTaxesCmdImpl
public ApplyOrderTaxesCmdImpl()
init
public void init()
throws ECException
- This method sets up the system for taxation :
- Tax Types for Calculation Usages.
- Tax Categories for each of the Tax Types.
postApplyCalculationUsages
protected void postApplyCalculationUsages(java.lang.Integer usageType)
throws ECException
- Check if the command is unsuccessful. If it is, the command throws the
ECApplicationException specifying an Error Code of ERRCODE_NO_TAX and
the Error View named CALCODE_ERRVIEW.
postCalculationCodeApply
protected void postCalculationCodeApply(java.util.Hashtable orderItemABHash,
java.lang.Integer usageType)
- Check for each orderitems if the tax amounts have been successfully
calculated.