public function InvoiceItem::getTotalPrice in Commerce Invoice 8.2
Gets the invoice item total price.
Return value
\Drupal\commerce_price\Price|null The invoice item total price, or NULL.
Overrides InvoiceItemInterface::getTotalPrice
1 call to InvoiceItem::getTotalPrice()
- InvoiceItem::getAdjustedTotalPrice in src/
Entity/ InvoiceItem.php - Gets the adjusted invoice item total price.
File
- src/
Entity/ InvoiceItem.php, line 149
Class
- InvoiceItem
- Defines the invoice item entity class.
Namespace
Drupal\commerce_invoice\EntityCode
public function getTotalPrice() {
if (!$this
->get('total_price')
->isEmpty()) {
return $this
->get('total_price')
->first()
->toPrice();
}
}