public function ordered($quantity)
{
/*
* Only allow previous states of null, opened, and partially received order
*/
$this->validatePreviousState([null, $this::STATE_OPENED, $this::STATE_ORDERED_RECEIVED_PARTIAL], $this::STATE_ORDERED_PENDING);
$this->setAttribute('quantity', $quantity);
$this->setAttribute('state', $this::STATE_ORDERED_PENDING);
return $this->processSave('inventory.transaction.ordered');
}