com.ibm.commerce.payment.commands
Interface CheckPOSpendingLimitCmd
- All Superinterfaces:
- ECCommand, TaskCommand
- All Known Implementing Classes:
- CheckPOSpendingLimitCmdImpl
- public interface CheckPOSpendingLimitCmd
- extends TaskCommand
Checks if the Spending Limit of a Limited PO would be exceeded by the specified Order.
Parameter:
Parameter Name |
Type |
Descriptions |
order |
OrderAccessBean |
The Order Access Bean |
buyerPurchaseOrder |
BuyerPurchaseOrder AccessBean |
The BuyerPurchaseOrder Access Bean representing the Limited PO with the Spending Limit. |
totalAmount |
BigDecimal |
The Total Amount to be checked. This amount is in the Currency of the Order. |
errorViewName |
String |
Optional error view name passed in by the Caller. |
Behavior:
- Checks if Spending Limit of PO would be exceeded.
- Records of the Purchase Amount of purchases registered against a
Limited PO is kept in the same currency specified for the Limited PO.
These records are kept in Table LPOPURAMT.
(Note that the currency specified by the Limited PO must not change once
the PO is used for any purchases.)
- Purchases can be made using different currencies.
Checking involves doing a Currency Conversion if necessary and then check.
- If the Check fails, the command throws an ECApplicationException.
Note that CheckPOSpendingLimit
may be called several times
by various command during Order Flow.
(for example, from Order Capture commands, the OrderProcess command, and so on.). The actual update of the
PO Spending Amount is made during ReleaseToFulfillment by the
CheckPaymentAcceptCmdImpl
Task Command
Implementation class when bReleaseToFulfillment is set to true.
Error View Name:
- CheckPOSpendingLimitErrorView (This is the default ErrorViewName
if none is passed into the command.)
ErrorCodes:
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
COPYRIGHT
public static final java.lang.String COPYRIGHT
defaultCommandClassName
public static final java.lang.String defaultCommandClassName
- The default implementation class.
ERRTASK_NAME
public static final java.lang.String ERRTASK_NAME
- Name of the Error View for this command.
The constant value of this field is "CheckPOSpendingLimitErrorView".
NAME
public static final java.lang.String NAME
setBuyerPurchaseOrder
public void setBuyerPurchaseOrder(BuyerPurchaseOrderAccessBean abBPOA)
- Sets the abBPOA property of the command.
- Parameters:
abBPOA
- the BuyerPurchaseOrderAccessBean of the Buyer Purchase Order
setErrorViewName
public void setErrorViewName(java.lang.String sEVN)
- Optional error view name passed in by the Caller.
setOrder
public void setOrder(OrderAccessBean abOrder)
- Sets the order property of the command.
- Parameters:
abOrder
- the OrderAccessBean of the Order
setTotalAmount
public void setTotalAmount(java.math.BigDecimal nTotalAmount)
- Sets the nTotalAmount property of the command.
- Parameters:
nTotalAmount
- the amount to be checked with.