com.ibm.commerce.inventory.commands
Interface CreateReceiptCmd

All Superinterfaces:
ECCommand, TaskCommand
All Known Implementing Classes:
CreateReceiptCmdImpl

public interface CreateReceiptCmd
extends TaskCommand

Create a receipt of an item at a fulfillment center.

This 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
Identifier of the fulfillment center where the inventory was received.
itemspcId
Identifier of the received item.
memberId
Identifier of the owner of the received item.
partNumber
Part number of the received item which can used to uniquely identify an item for the owner identified by memberId.
qtyReceived
The quantity received.
raDetailId
The expected inventory record detail identifier for expected inventory receipt.
receiptDate
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
The identifier of the vendor that supplied the inventory.
VersionSpcId
The product version identifier of the item.

Output Parameters

rcptAvailId
Returns the available receipt identifier.
receiptId
Return the identifer 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
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".
 
Method Summary
 java.lang.String getComment1()
          Return comment1 (receipt comment).
 java.lang.String getComment2()
          Return comment2 (quality comment).
 java.math.BigDecimal getCost()
          Return unit cost.
 java.lang.Long getDistArrangId()
          Return distribution arrangement identifier.
 java.lang.Integer getFfmcenterId()
          Return fulfillment center identifier.
 java.lang.Long getItemspcId()
          Return item identifier.
 java.lang.Long getMemberId()
          Return member identifier.
 java.lang.String getPartNumber()
          Return part number.
 java.lang.Integer getQtyReceived()
          Return the quantity received.
 java.lang.Long getRaDetailId()
          Return expected inventory record detail identifier.
 java.lang.Long getRcptAvailId()
          Return available receipt identifier.
 java.sql.Timestamp getReceiptDate()
          Return the date the inventory was received.
 java.lang.Long getReceiptId()
          Return the receipt identifier.
 java.lang.String getReceiptType()
          Return type of receipt which indicates how this receipt was created.
 java.lang.Long getRtnRcptDspId()
          Return the disposition record identifier of returned item.
 java.lang.String getSetCCurr()
          Return currency of the COST field.
 java.lang.Long getVendorId()
          Return the identifier of the vendor that supplied the inventory.
 java.lang.Long getVersionSpcId()
          Return the product version identifier of the item.
 void setComment1(java.lang.String newComment1)
          Set comment1 (receipt comment).
 void setComment2(java.lang.String newComment2)
          Set comment2 (quality comment).
 void setCost(java.math.BigDecimal newCost)
          Set unit cost.
 void setDistArrangId(java.lang.Long newDistArrangId)
          Set distribution arrangement identifier.
 void setFfmcenterId(java.lang.Integer newFfmcenterId)
          Set fulfillment center identifier.
 void setItemspcId(java.lang.Long newItemspcId)
          Set item identifier.
 void setMemberId(java.lang.Long newMemberId)
          Set member identifier.
 void setPartNumber(java.lang.String newPartNumber)
          Set part number.
 void setQtyReceived(java.lang.Integer newQtyReceived)
          Set the quantity received.
 void setRaDetailId(java.lang.Long newRaDetailId)
          Set expected inventory record detail identifier.
 void setRcptAvailId(java.lang.Long newRcptAvailId)
          Set available receipt identifier.
 void setReceiptDate(java.sql.Timestamp newReceiptDate)
          Set the date the inventory was received.
 void setReceiptId(java.lang.Long newReceiptId)
          Set the receipt identifier.
 void setReceiptType(java.lang.String newReceiptType)
          Set type of receipt which indicates how this receipt was created.
 void setRequestProperties(TypedProperty newRequestProperties)
          Set request properties.
 void setRtnRcptDspId(java.lang.Long newRtnRcptDspId)
          Set the disposition record identifier of returned item.
 void setSetCCurr(java.lang.String newSetCCurr)
          Set currency of the COST field.
 void setVendorId(java.lang.Long newVendorId)
          Set the identifier of the vendor that supplied the inventory.
 void setVersionSpcId(java.lang.Long newVersionSpcId)
          Set the product version identifier of the item.
 
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
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
The internal copyright field.

defaultCommandClassName

public static final java.lang.String defaultCommandClassName
The default implementation class is "com.ibm.commerce.inventory.commands.CreateReceiptCmdImpl".

NAME

public static final java.lang.String NAME
The name of this interface is "com.ibm.commerce.inventory.commands.CreateReceiptCmd".
Method Detail

getComment1

public java.lang.String getComment1()
Return comment1 (receipt comment).
Returns:
java.lang.String

getComment2

public java.lang.String getComment2()
Return comment2 (quality comment).
Returns:
java.lang.String

getCost

public java.math.BigDecimal getCost()
Return unit cost.
Returns:
java.math.BigDecimal

getDistArrangId

public java.lang.Long getDistArrangId()
Return distribution arrangement identifier.
Returns:
java.lang.Long

getFfmcenterId

public java.lang.Integer getFfmcenterId()
Return fulfillment center identifier.
Returns:
java.lang.Integer

getItemspcId

public java.lang.Long getItemspcId()
Return item identifier.
Returns:
java.lang.Long

getMemberId

public java.lang.Long getMemberId()
Return member identifier.
Returns:
java.lang.Long

getPartNumber

public java.lang.String getPartNumber()
Return part number.
Returns:
java.lang.String

getQtyReceived

public java.lang.Integer getQtyReceived()
Return the quantity received.
Returns:
java.lang.Integer

getRaDetailId

public java.lang.Long getRaDetailId()
Return expected inventory record detail identifier.
Returns:
java.lang.Long

getRcptAvailId

public java.lang.Long getRcptAvailId()
Return available receipt identifier.
Returns:
java.lang.Long

getReceiptDate

public java.sql.Timestamp getReceiptDate()
Return the date the inventory was received.
Returns:
java.sql.Timestamp

getReceiptId

public java.lang.Long getReceiptId()
Return the receipt identifier.
Returns:
java.lang.Long

getReceiptType

public java.lang.String getReceiptType()
Return type of receipt which indicates how this receipt was created.
Returns:
java.lang.String

getRtnRcptDspId

public java.lang.Long getRtnRcptDspId()
Return the disposition record identifier of returned item.
Returns:
java.lang.Long

getSetCCurr

public java.lang.String getSetCCurr()
Return currency of the COST field.
Returns:
java.lang.String

getVendorId

public java.lang.Long getVendorId()
Return the identifier of the vendor that supplied the inventory.
Returns:
java.lang.Long

getVersionSpcId

public java.lang.Long getVersionSpcId()
Return the product version identifier of the item.
Returns:
java.lang.Long

setComment1

public void setComment1(java.lang.String newComment1)
Set comment1 (receipt comment).
Parameters:
newComment1 - java.lang.String

setComment2

public void setComment2(java.lang.String newComment2)
Set comment2 (quality comment).
Parameters:
newComment2 - java.lang.String

setCost

public void setCost(java.math.BigDecimal newCost)
Set unit cost.
Parameters:
newCost - java.lang.String

setDistArrangId

public void setDistArrangId(java.lang.Long newDistArrangId)
Set distribution arrangement identifier.
Parameters:
newDistArrangId - java.lang.Long

setFfmcenterId

public void setFfmcenterId(java.lang.Integer newFfmcenterId)
Set fulfillment center identifier.
Parameters:
newFfmcenterId - java.lang.Integer

setItemspcId

public void setItemspcId(java.lang.Long newItemspcId)
Set item identifier.
Parameters:
newItemspcId - java.lang.Long

setMemberId

public void setMemberId(java.lang.Long newMemberId)
Set member identifier.
Parameters:
newMemberId - java.lang.Long

setPartNumber

public void setPartNumber(java.lang.String newPartNumber)
Set part number.
Parameters:
newPartNumber - java.lang.String

setQtyReceived

public void setQtyReceived(java.lang.Integer newQtyReceived)
Set the quantity received.
Parameters:
newQtyReceived - java.lang.Integer

setRaDetailId

public void setRaDetailId(java.lang.Long newRaDetailId)
Set expected inventory record detail identifier.
Parameters:
newRaDetailId - java.lang.Integer

setRcptAvailId

public void setRcptAvailId(java.lang.Long newRcptAvailId)
Set available receipt identifier.
Parameters:
newRcptAvailId - java.lang.Long

setReceiptDate

public void setReceiptDate(java.sql.Timestamp newReceiptDate)
Set the date the inventory was received.
Parameters:
newReceiptDate - java.sql.Timestamp

setReceiptId

public void setReceiptId(java.lang.Long newReceiptId)
Set the receipt identifier.
Parameters:
newReceiptId - java.lang.Long

setReceiptType

public void setReceiptType(java.lang.String newReceiptType)
Set type of receipt which indicates how this receipt was created.
Parameters:
newReceiptType - java.lang.String

setRequestProperties

public void setRequestProperties(TypedProperty newRequestProperties)
                          throws ECApplicationException
Set request properties.
Parameters:
reqParms - com.ibm.commerce.datatype.TypedProperty

setRtnRcptDspId

public void setRtnRcptDspId(java.lang.Long newRtnRcptDspId)
Set the disposition record identifier of returned item.
Parameters:
newRtnRcptDspId - java.lang.Long

setSetCCurr

public void setSetCCurr(java.lang.String newSetCCurr)
Set currency of the COST field.
Parameters:
newSetCCurr - java.lang.String

setVendorId

public void setVendorId(java.lang.Long newVendorId)
Set the identifier of the vendor that supplied the inventory.
Parameters:
newVendorId - java.lang.Long

setVersionSpcId

public void setVersionSpcId(java.lang.Long newVersionSpcId)
Set the product version identifier of the item.
Parameters:
newVersionSpcId - java.lang.Long