You are here

public function InvoiceInterface::collectAdjustments in Commerce Invoice 8.2

Collects all adjustments that belong to the invoice.

Unlike getAdjustments() which returns only invoice adjustments, this method returns both invoice and invoice item adjustments.

Important: The returned adjustments are unprocessed, and must be processed before use.

Parameters

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

Return value

\Drupal\commerce_order\Adjustment[] The adjustments.

See also

\Drupal\commerce_order\AdjustmentTransformerInterface::processAdjustments()

1 method overrides InvoiceInterface::collectAdjustments()
Invoice::collectAdjustments in src/Entity/Invoice.php
Collects all adjustments that belong to the invoice.

File

src/Entity/InvoiceInterface.php, line 204

Class

InvoiceInterface
Defines the interface for invoices.

Namespace

Drupal\commerce_invoice\Entity

Code

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