Stevebauman\Inventory\Traits\InventoryTransactionTrait::remove PHP Method

remove() public method

If the transaction state is current on-hold, and a quantity is given then a partial-remove will be triggered and the remaining quantity will be on-hold. If no quantity is given, then this will set the transaction state to removed and the stock will be permanently removed from the current stock. If the transaction state was open or null, and a quantity is given, then the specified quantity is permanently removed from the stock.
public remove ( integer | float | string $quantity, string $reason = '', integer | float | string $cost )
$quantity integer | float | string
$reason string
$cost integer | float | string
    public function remove($quantity = 0, $reason = '', $cost = 0)
    {
        if ($quantity) {
            return $this->removePartial($quantity, $reason, $cost);
        }
        return $this->removeAll();
    }