Class CheckPaymentAcceptCmdImpl

  • All Implemented Interfaces:, ECCommand, ECTargetableCommand, TaskCommand, CheckPaymentAcceptCmd,,,,,,


    public class CheckPaymentAcceptCmdImpl
    extends TaskCommandImpl
    implements CheckPaymentAcceptCmd
    Default CheckPaymentAccept task command implementation class.


    Parameter Name Type Descriptions
    abOrder OrderAccessBean The Order Access Bean
    dApproveAmount BigDecimal The approved amount to be checked
    bReleaseToFulfillment Boolean The command is called as part of release to fulfillment.

    This Task Command implements the CheckPaymentAccept Interface. This Task Command is normally called during ReleaseToFulfillment. It checks if the previously approved payment for an order is still valid and if the Approved Amount is the same as the Order Amount.

    The command returns one of three possible answers:


    • Calls CheckAccountPayment Task command to see if the payment previously authorized by the external Accounting System is still valid.
    • if bReleaseToFulfillment is set to true, calls UpdateTASpending Task command. then calls UpdatePOSpending Task command.
    • if bReleaseToFulfillment is set to false, calls CheckTASpendingLimit Task command then calls CheckPOSpendingLimit Task command.
    • Finally, calls the CheckPaymentAcceptPolicy command for the Payment Policy used for the Purchase. (The ID of the Payment Policy is stored in the ORDPAYMTHD Table).
    • On return from the Business Policy command, if the policy command returns PaymentConstants.APPROVAL_NO or if the command receives one of these Error Codes (ERR_CODE_CURRENCY_CONVERT_FAIL, ERR_CODE_PURCHASE_AMOUNT_EXCEED_LIMIT_OF_TA, ERR_CODE_PURCHASE_AMOUNT_EXCEED_LIMIT_OF_LPO, ERR_CODE_INVALID_PO_INDIVIDUAL_PO_NOT_ALLOWED, ERR_CODE_INVALID_PO_INDIVIDUAL_PO_NOT_UNIQUE, ERR_CODE_INVALID_PO_PO_NOT_ACTIVE) from any of the Task Commands above, the AdminOrderCancel command will be called to cancel the order.

    Error View Name:

    • CheckPaymentAcceptErrorView


    • (Include error codes from the other subordinate commands)

    This command uses the following AccessBeans:

    This command calls the following TaskCommands:

    This command calls the following BusinessPolicyCommands:

    See Also:
    Serialized Form
    • Constructor Detail

      • CheckPaymentAcceptCmdImpl

        public CheckPaymentAcceptCmdImpl()
    • Method Detail

      • reset

        public void reset()
        Resets the instance variables of the command. The reset() method will reset all instance variables. If the command includes any output values that are accessible via getters, then make sure those values are no longer needed before calling this method to reset the instance variables of the command.

        This is useful if the command instance is to be called multiple times with different command parameters.

        Specified by:
        reset in interface
        reset in class AbstractECTargetableCommand
      • setApproveAmount

        public void setApproveAmount(java.math.BigDecimal approveAmount)
        Sets the approveAmount property of the command.
        Specified by:
        setApproveAmount in interface CheckPaymentAcceptCmd
        approveAmount - the approved amount to be checked
      • setOrder

        public void setOrder(OrderAccessBean ab)
        Sets the order property of the command.
        Specified by:
        setOrder in interface CheckPaymentAcceptCmd
        ab - the OrderAccessBean representing the order for which the approved amount is to be checked
      • setReleaseToFulfillment

        public void setReleaseToFulfillment(java.lang.Boolean b)
        Sets the bRelease property of the command.
        Specified by:
        setReleaseToFulfillment in interface CheckPaymentAcceptCmd
        b - true to indicate the checking was requested as part of release to fulfillment
      • setReturnCode

        public void setReturnCode(java.lang.String s)
        Sets the return code to be returned to the caller of the command.
        s - the return code string
        See Also: