java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.taxation.commands.GetReturnTaxesCmdImpl
This GetReturnTaxesCmd
Task Command Implementation calculates
the tax amounts of the original order items net those to be returned in a
RMA.
If the command is successful in calculating the taxes, it will return the tax amounts for the net items.
Behaviour
recalculates taxes on the original order items net the items to be returned.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.taxation.commands. GetReturnTaxesCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
GetReturnTaxesCmdImpl() |
Method Summary | |
---|---|
protected
java.math.BigDecimal |
getNetAdjByCategoryForReturn(java.util.Hashtable aRMAItemAdjs,
java.util.Hashtable aOrderItemAdjs,
java.lang.Integer aTaxCategoryId) Returns the net adjustment amounts for a particular tax category. |
OrderItemAccessBean[] |
getOrderItemABs() Returns the orderitem access beans. |
java.util.Hashtable |
getOrderItemAdjustments(java.lang.Long aOrderItemId) Obtains the original adjustment amounts for the orderitem to be returned. |
protected
java.util.Hashtable |
getRMAItemAdjustmentCredits(java.lang.Long aRMAItemId) Obtains the adjustment credit amounts for the orderitem to be returned. |
void |
performExecute() Executes main business logic of the command. |
void |
setRMAItemABs(
RMAItemAccessBean[] aRMAItemABs) Sets the RMAItem for which the new tax amounts are to be calculated. |
void |
validateParameters() Checks mandatory parameters. |
protected
java.math.BigDecimal |
validateTaxableNetPrice(
OrderItemAccessBean aOrderItemAB,
RMAItemAccessBean aRMAItemAB) Returns the net adjustment amounts for a particular tax category. |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public GetReturnTaxesCmdImpl()
Method Detail |
---|
protected java.math.BigDecimal getNetAdjByCategoryForReturn(java.util.Hashtable aRMAItemAdjs, java.util.Hashtable aOrderItemAdjs, java.lang.Integer aTaxCategoryId) throws ECException
aRMAItemAdjs
- the adjustment credits in a RMA.aOrderItemAdjs
- the adjustment amounts in a RMA.aTaxCategoryId
- the tax category.
ECException
public OrderItemAccessBean[] getOrderItemABs()
getOrderItemABs
in interface
GetReturnTaxesCmd
public java.util.Hashtable getOrderItemAdjustments(java.lang.Long aOrderItemId) throws ECException
aOrderItemId
- The id of the orderitem.
ECException
protected java.util.Hashtable getRMAItemAdjustmentCredits(java.lang.Long aRMAItemId) throws ECException
aRMAItemId
- The id of the RMA orderitem.
ECException
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void setRMAItemABs(RMAItemAccessBean[] aRMAItemABs)
setRMAItemABs
in interface
GetReturnTaxesCmd
aRMAItemABs
- the access beans of the orderItem to be
returned.public void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException
protected java.math.BigDecimal validateTaxableNetPrice(OrderItemAccessBean aOrderItemAB, RMAItemAccessBean aRMAItemAB) throws ECException
ECException