Marks a transaction as received. If the previous state was ordered then the amount
ordered is inserted into the stock. If a quantity is specified then the status of the
transaction is set to received-partial, and then returned to ordered with the amount of
quantity left to receive.