You are here

public function InvoiceTotalSummaryInterface::buildTotals in Commerce Invoice 8.2

Builds the totals for the given invoice.

Parameters

\Drupal\commerce_invoice\Entity\InvoiceInterface $invoice: The invoice.

Return value

array An array of totals with the following elements:

  • subtotal: The order subtotal price.
  • adjustments: The adjustments:
    • type: The adjustment type.
    • label: The adjustment label.
    • amount: The adjustment amount.
    • percentage: The decimal adjustment percentage, when available.
  • total: The invoice total price.
1 method overrides InvoiceTotalSummaryInterface::buildTotals()
InvoiceTotalSummary::buildTotals in src/InvoiceTotalSummary.php
Builds the totals for the given invoice.

File

src/InvoiceTotalSummaryInterface.php, line 25

Class

InvoiceTotalSummaryInterface

Namespace

Drupal\commerce_invoice

Code

public function buildTotals(InvoiceInterface $invoice);