commerce-invoice-total-summary.html.twig in Commerce Invoice 8.2
Default invoice total summary template.
Available variables:
- attributes: HTML attributes for the wrapper.
- invoice_entity: The order entity.
- totals: An array of order totals values with the following keys:
- 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. For example, "0.2" for a 20% adjustment.
- total: The order total price.
1 theme call to commerce-invoice-total-summary.html.twig
- InvoiceTotalSummary::viewElements in src/
Plugin/ Field/ FieldFormatter/ InvoiceTotalSummary.php - Builds a renderable array for a field value.
File
templates/commerce-invoice-total-summary.html.twigView source
- {#
- /**
- * @file
- * Default invoice total summary template.
- *
- * Available variables:
- * - attributes: HTML attributes for the wrapper.
- * - invoice_entity: The order entity.
- * - totals: An array of order totals values with the following keys:
- * - 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. For example, "0.2" for a 20% adjustment.
- * - total: The order total price.
- *
- * @ingroup themeable
- */
- #}
- {{ attach_library('commerce_order/total_summary') }}
- <div{{ attributes }}>
- <div class="order-total-line order-total-line__subtotal">
- <span class="order-total-line-label">{{ 'Subtotal'|t }} </span><span class="order-total-line-value">{{ totals.subtotal|commerce_price_format }}</span>
- </div>
- {% for adjustment in totals.adjustments %}
- <div class="order-total-line order-total-line__adjustment order-total-line__adjustment--{{ adjustment.type|clean_class }}">
- <span class="order-total-line-label">{{ adjustment.label }} </span><span class="order-total-line-value">{{ adjustment.amount|commerce_price_format }}</span>
- </div>
- {% endfor %}
- <div class="order-total-line order-total-line__total">
- <span class="order-total-line-label">{{ 'Total'|t }} </span><span class="order-total-line-value">{{ totals.total|commerce_price_format }}</span>
- </div>
- </div>