com.ibm.commerce.inventory.commands

Interface CreateReceiptCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Implementing Classes:
    CreateReceiptCmdImpl


    public interface CreateReceiptCmd
    extends TaskCommand
    Create a receipt of an item at a fulfillment center. Called by ReturnItemToInventoryCmd for Reports.

    This task command first determines the type of receipt to be created. If the expected inventory record detail identifier is provided, an expected inventory receipt will be created and the receipt type will be set to 'EIR'. If the disposition record identifier of returned item is provided, a return receipt will be created and the receipt type will be set to 'RTN'. Otherwise, an ad hoc receipt will be created and the receipt type will be set to 'ADHC'.

    If this is an expected inventory receipt, the quantity received and quantity remaining of the corresponding expected inventory record detail will be updated.

    If the receipt is created successfully, the receipt identifier will be returned. And the receipt will be made available to the distribution arrangement by calling MakeReceiptAvailableCmd task command.

    This command requires to have the store id set in the command context.

    Input Parameters

    comment1
    Comment on the new receipt.
    comment2
    Comment on the quality.
    cost
    Unit cost of the item.
    distArrangId
    Identifier of the distribution arrangement that have access to this received inventory.
    ffmcenterId
    Required. Identifier of the fulfillment center where the inventory was received.
    itemSpcId
    Required, but can be pulled from other values. So, required unless versionSpcId is set, or raDetailID is set for an EIR receipt, or memberId and partNumber are set. Identifier of the received item.
    memberId
    Identifier of the owner of the received item. Can be used with partNumber to determine itemSpcId.
    partNumber
    Part number of the received item which can used to uniquely identify an item for the owner identified by memberId. Can be used with memberId to determine itemSpcId.
    qtyReceived
    Required. The quantity received.
    raDetailId
    Required if expected inventory. The expected inventory record detail identifier for expected inventory receipt.
    receiptDate
    Required. The date the inventory was received.
    rtnRcptDspId
    The disposition record identifier of returned item for return receipt.
    setCCurr
    The currency of the COST field.
    vendorId
    Required if expected inventory. The identifier of the vendor that supplied the inventory.
    versionSpcId
    Required unless itemSpcId is set. The product version identifier of the item.

    Output Parameters

    rcptAvailId
    Returns the available receipt identifier.
    receiptId
    Return the identifier of the new receipt.
    receiptType
    Return the type of the receipt which indicates how this receipt was created. (ADHC: Ad hoc receipt, EIR: Expected Inventory Receipt, RTN: returned receipt.)

    Exceptions

    When the required fields are missing or not in the right data type, this command will throw exception to indicate which field is missing or bad.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The internal copyright field.
      static java.lang.String defaultCommandClassName
      The default implementation class is "com.ibm.commerce.inventory.commands.CreateReceiptCmdImpl".
      static java.lang.String NAME
      The name of this interface is "com.ibm.commerce.inventory.commands.CreateReceiptCmd".
      • Fields inherited from interface com.ibm.websphere.command.Command

        serialVersionUID
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.lang.String getComment1()
      Gets the comment specified on the new receipt.
      java.lang.String getComment2()
      Gets the comment specified regarding the quality of the item received.
      java.math.BigDecimal getCost()
      Gets the unit cost of the item.
      java.lang.Long getDistArrangId()
      Gets the identifier of the distribution arrangement that has access to this received inventory.
      java.lang.Integer getFfmcenterId()
      Gets the identifier of the fulfillment center where the inventory was received.
      java.lang.Long getItemspcId()
      Gets the identifier of the item specified for receipt.
      java.lang.Long getMemberId()
      Gets the identifier of the owner of the received item.
      java.lang.String getPartNumber()
      Gets the part number of the received item.
      java.lang.Integer getQtyReceived()
      Gets the number of items received.
      java.lang.Long getRaDetailId()
      Gets the expected inventory record detail identifier for the expected inventory receipt.
      java.lang.Long getRcptAvailId()
      Gets the available receipt identifier.
      java.sql.Timestamp getReceiptDate()
      Gets the date the inventory was received.
      java.lang.Long getReceiptId()
      Gets the identifier of the new receipt.
      java.lang.String getReceiptType()
      Gets the type of receipt which indicates how this receipt was created.
      java.lang.Long getRtnRcptDspId()
      Gets the disposition record identifier of the item returned for receipt.
      java.lang.String getSetCCurr()
      Gets the currency of the cost field.
      java.lang.Long getVendorId()
      Gets the identifier of the vendor that supplied the inventory.
      java.lang.Long getVersionSpcId()
      Gets the product version identifier of the item returned for receipt.
      void setComment1(java.lang.String newComment1)
      Sets the comment on the new receipt.
      void setComment2(java.lang.String newComment2)
      Sets the comment regarding the quality of the item received.
      void setCost(java.math.BigDecimal newCost)
      Sets the unit cost of the item being received.
      void setDistArrangId(java.lang.Long newDistArrangId)
      Sets the identifier of the distribution arrangement that has access to this received inventory.
      void setFfmcenterId(java.lang.Integer newFfmcenterId)
      Sets the fulfillment center identifier.
      void setItemspcId(java.lang.Long newItemspcId)
      Sets the identifier of the item specified for receipt.
      void setMemberId(java.lang.Long newMemberId)
      Sets the identifier of the owner of the item specified for receipt.
      void setPartNumber(java.lang.String newPartNumber)
      Sets the part number of the items being received.
      void setQtyReceived(java.lang.Integer newQtyReceived)
      Sets the number of items being received.
      void setRaDetailId(java.lang.Long newRaDetailId)
      Sets the identifier of the record detail of the expected inventory.
      void setRcptAvailId(java.lang.Long newRcptAvailId)
      Sets the identifier of the available receipt.
      void setReceiptDate(java.sql.Timestamp newReceiptDate)
      Sets the date the inventory was received.
      void setReceiptId(java.lang.Long newReceiptId)
      Sets identifier of the new receipt.
      void setReceiptType(java.lang.String newReceiptType)
      Sets the type of receipt which indicates how this receipt was created.
      void setRequestProperties(TypedProperty newRequestProperties)
      Sets a group of receipt properties.
      void setRtnRcptDspId(java.lang.Long newRtnRcptDspId)
      Sets the disposition record identifier of the returned item.
      void setSetCCurr(java.lang.String newSetCCurr)
      Sets the currency of the cost field.
      void setVendorId(java.lang.Long newVendorId)
      Sets the identifier of the vendor that supplied the inventory.
      void setVersionSpcId(java.lang.Long newVersionSpcId)
      Sets the product version identifier of the item specified for receipt.
      • Methods inherited from interface com.ibm.commerce.command.CacheableECCommand

        execute
      • Methods inherited from interface com.ibm.websphere.command.CacheableCommand

        executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
      • Methods inherited from interface com.ibm.websphere.command.TargetableCommand

        getCommandTarget, getCommandTargetName, hasOutputProperties, performExecute, setCommandTarget, setCommandTargetName, setOutputProperties
      • Methods inherited from interface com.ibm.websphere.command.Command

        isReadyToCallExecute, reset
      • Methods inherited from interface com.ibm.websphere.command.CommandCaller

        unionDependencies
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
      • NAME

        static final java.lang.String NAME
        The name of this interface is "com.ibm.commerce.inventory.commands.CreateReceiptCmd".
        See Also:
        Constant Field Values
      • defaultCommandClassName

        static final java.lang.String defaultCommandClassName
        The default implementation class is "com.ibm.commerce.inventory.commands.CreateReceiptCmdImpl".
        See Also:
        Constant Field Values
    • Method Detail

      • getComment1

        java.lang.String getComment1()
        Gets the comment specified on the new receipt.
        Returns:
        Comment specified on the new receipt.
        See Also:
        setComment1(java.lang.String)
      • getComment2

        java.lang.String getComment2()
        Gets the comment specified regarding the quality of the item received.
        Returns:
        Quality comment on the received item.
        See Also:
        setComment2(java.lang.String)
      • getDistArrangId

        java.lang.Long getDistArrangId()
        Gets the identifier of the distribution arrangement that has access to this received inventory.
        Returns:
        Distribution arrangement identifier.
        See Also:
        setDistArrangId(java.lang.Long)
      • getFfmcenterId

        java.lang.Integer getFfmcenterId()
        Gets the identifier of the fulfillment center where the inventory was received.
        Returns:
        Fulfillment center identifier.
        See Also:
        setFfmcenterId(java.lang.Integer)
      • getItemspcId

        java.lang.Long getItemspcId()
        Gets the identifier of the item specified for receipt.
        Returns:
        Item identifier.
        See Also:
        setItemspcId(java.lang.Long)
      • getMemberId

        java.lang.Long getMemberId()
        Gets the identifier of the owner of the received item.
        Returns:
        Member identifier.
        See Also:
        setMemberId(java.lang.Long)
      • getPartNumber

        java.lang.String getPartNumber()
        Gets the part number of the received item. Can be used to uniquely identify an item for the owner identified by memberId.
        Returns:
        Part number.
        See Also:
        setPartNumber(java.lang.String)
      • getRaDetailId

        java.lang.Long getRaDetailId()
        Gets the expected inventory record detail identifier for the expected inventory receipt.
        Returns:
        Record detail identifier.
        See Also:
        setRaDetailId(java.lang.Long)
      • getRcptAvailId

        java.lang.Long getRcptAvailId()
        Gets the available receipt identifier.
        Returns:
        Available receipt identifier.
        See Also:
        setRcptAvailId(java.lang.Long)
      • getReceiptDate

        java.sql.Timestamp getReceiptDate()
        Gets the date the inventory was received.
        Returns:
        Inventory received date.
        See Also:
        setReceiptDate(java.sql.Timestamp)
      • getReceiptId

        java.lang.Long getReceiptId()
        Gets the identifier of the new receipt.
        Returns:
        New receipt identifier.
        See Also:
        setReceiptId(java.lang.Long)
      • getReceiptType

        java.lang.String getReceiptType()
        Gets the type of receipt which indicates how this receipt was created. (ADHC: Ad hoc receipt, EIR: Expected Inventory Receipt, RTN: returned receipt.)
        Returns:
        Receipt type.
        See Also:
        setReceiptType(java.lang.String)
      • getRtnRcptDspId

        java.lang.Long getRtnRcptDspId()
        Gets the disposition record identifier of the item returned for receipt.
        Returns:
        Disposition record identifier.
        See Also:
        setRtnRcptDspId(java.lang.Long)
      • getSetCCurr

        java.lang.String getSetCCurr()
        Gets the currency of the cost field.
        Returns:
        Currency of the cost field.
        See Also:
        setSetCCurr(java.lang.String)
      • getVendorId

        java.lang.Long getVendorId()
        Gets the identifier of the vendor that supplied the inventory.
        Returns:
        Vendor identifier.
        See Also:
        setVendorId(java.lang.Long)
      • getVersionSpcId

        java.lang.Long getVersionSpcId()
        Gets the product version identifier of the item returned for receipt.
        Returns:
        Product version identifier.
        See Also:
        setVersionSpcId(java.lang.Long)
      • setComment1

        void setComment1(java.lang.String newComment1)
        Sets the comment on the new receipt.
        Parameters:
        newComment1 - generic comment, COMMENT1 property
        See Also:
        getComment1()
      • setComment2

        void setComment2(java.lang.String newComment2)
        Sets the comment regarding the quality of the item received.
        Parameters:
        newComment2 - quality comment, COMMENT2 property
        See Also:
        getComment2()
      • setCost

        void setCost(java.math.BigDecimal newCost)
        Sets the unit cost of the item being received.
        Parameters:
        newCost - cost of item, COST property
        See Also:
        getCost()
      • setDistArrangId

        void setDistArrangId(java.lang.Long newDistArrangId)
        Sets the identifier of the distribution arrangement that has access to this received inventory.
        Parameters:
        newDistArrangId - distribution arrangement identifier, DISTARRANG_ID property
        See Also:
        getDistArrangId()
      • setFfmcenterId

        void setFfmcenterId(java.lang.Integer newFfmcenterId)
        Sets the fulfillment center identifier.
        Parameters:
        newFfmcenterId - fulfillment center identifier, FFMCENTER_ID property
        See Also:
        getFfmcenterId()
      • setItemspcId

        void setItemspcId(java.lang.Long newItemspcId)
        Sets the identifier of the item specified for receipt.
        Parameters:
        newItemspcId - item specified identifier, ITEMSPC_ID property
        See Also:
        getItemspcId()
      • setMemberId

        void setMemberId(java.lang.Long newMemberId)
        Sets the identifier of the owner of the item specified for receipt.
        Parameters:
        newMemberId - member identifier, MEMBER_ID property
        See Also:
        getMemberId()
      • setPartNumber

        void setPartNumber(java.lang.String newPartNumber)
        Sets the part number of the items being received.
        Parameters:
        newPartNumber - part number, PARTNUMBER property
        See Also:
        getPartNumber()
      • setQtyReceived

        void setQtyReceived(java.lang.Integer newQtyReceived)
        Sets the number of items being received.
        Parameters:
        newQtyReceived - quantity of received items, QTYRECEIVED property
        See Also:
        getQtyReceived()
      • setRaDetailId

        void setRaDetailId(java.lang.Long newRaDetailId)
        Sets the identifier of the record detail of the expected inventory.
        Parameters:
        newRaDetailId - record detail identifier, RADETAIL_ID property
        See Also:
        getRaDetailId()
      • setRcptAvailId

        void setRcptAvailId(java.lang.Long newRcptAvailId)
        Sets the identifier of the available receipt.
        Parameters:
        newRcptAvailId - available receipt identifier
        See Also:
        getRcptAvailId()
      • setReceiptDate

        void setReceiptDate(java.sql.Timestamp newReceiptDate)
        Sets the date the inventory was received.
        Parameters:
        newReceiptDate - receipt date, RECEIPTDATE property
        See Also:
        getReceiptDate()
      • setReceiptId

        void setReceiptId(java.lang.Long newReceiptId)
        Sets identifier of the new receipt. Called by the implementation.
        Parameters:
        newReceiptId - new receipt identifier.
        See Also:
        getReceiptId()
      • setReceiptType

        void setReceiptType(java.lang.String newReceiptType)
        Sets the type of receipt which indicates how this receipt was created.
        Parameters:
        newReceiptType - new receipt type, RECEIPTTYPE property
        See Also:
        getReceiptType()
      • setRtnRcptDspId

        void setRtnRcptDspId(java.lang.Long newRtnRcptDspId)
        Sets the disposition record identifier of the returned item.
        Parameters:
        newRtnRcptDspId - disposition record identifier, RTNRCPTDSP_ID property
        See Also:
        getRtnRcptDspId()
      • setSetCCurr

        void setSetCCurr(java.lang.String newSetCCurr)
        Sets the currency of the cost field.
        Parameters:
        newSetCCurr - currency, SETCCURR property
        See Also:
        getSetCCurr()
      • setVendorId

        void setVendorId(java.lang.Long newVendorId)
        Sets the identifier of the vendor that supplied the inventory.
        Parameters:
        newVendorId - vendor identifier, VENDOR_ID property
        See Also:
        getVendorId()
      • setVersionSpcId

        void setVersionSpcId(java.lang.Long newVersionSpcId)
        Sets the product version identifier of the item specified for receipt.
        Parameters:
        newVersionSpcId - version identifier, VERSIONSPC_ID property
        See Also:
        getVersionSpcId()
      • setRequestProperties

        void setRequestProperties(TypedProperty newRequestProperties)
                           throws ECApplicationException
        Sets a group of receipt properties. Caller sets up the parameters in the properties field and the caller calls this method which calls the setters for each property. See class documentation for required parameter descriptions.
        Parameters:
        newRequestProperties - receipt properties
        Throws:
        ECApplicationException