You are here

public function InvoiceItemInterface::getAdjustedUnitPrice in Commerce Invoice 8.2

Gets the adjusted invoice item unit price.

Calculated by dividing the adjusted total price by quantity.

Useful for refunds and other purposes where there's a need to know how much a single unit contributed to the order total.

Parameters

string[] $adjustment_types: The adjustment types to include in the adjusted price. Examples: fee, promotion, tax. Defaults to all adjustment types.

Return value

\Drupal\commerce_price\Price|null The adjusted invoice item unit price, or NULL.

1 method overrides InvoiceItemInterface::getAdjustedUnitPrice()
InvoiceItem::getAdjustedUnitPrice in src/Entity/InvoiceItem.php
Gets the adjusted invoice item unit price.

File

src/Entity/InvoiceItemInterface.php, line 160

Class

InvoiceItemInterface
Defines the interface for invoice items.

Namespace

Drupal\commerce_invoice\Entity

Code

public function getAdjustedUnitPrice(array $adjustment_types = []);