- Issue created by @Leo Pitt
I was confused by some of the parameters that are required by the StockTransactionsInterface::createTransaction method.
/**
* Receive stock.
*
* @param \Drupal\commerce\PurchasableEntityInterface $entity
* The purchasable entity (most likely a product variation entity).
* @param int $location_id
* The location ID.
* @param string $zone
* The zone.
* @param float $quantity
* The quantity.
* @param float $unit_cost
* The unit cost.
* @param string $currency_code
* The currency code.
* @param string $message
* The message.
*/
public function receiveStock(PurchasableEntityInterface $entity, $location_id, $zone, $quantity, $unit_cost, $currency_code, $message = NULL);
$unit_cost and $currency_code needed? Is it purely for logging, or is it going to have an impact on sales figures?Appreciate that answers can probably be worked out by examining the code base but it would be helpful documenting in code, in my opinion.
Active
1.0
Documentation