commerce-invoice--admin.html.twig in Commerce Invoice 8.2
Invoice template used on the admin invoice page.
Available variables:
- attributes: HTML attributes for the wrapper.
- invoice: The rendered invoice fields. Use 'invoice' to print them all, or print a subset such as 'invoice.invoice_number'. Use the following code to exclude the printing of a given field:
{{ invoice|without('invoice_number') }}
- invoice_entity: The invoice entity.
File
templates/commerce-invoice--admin.html.twigView source
- {#
- /**
- * @file
- * Invoice template used on the admin invoice page.
- *
- * Available variables:
- * - attributes: HTML attributes for the wrapper.
- * - invoice: The rendered invoice fields.
- * Use 'invoice' to print them all, or print a subset such as
- * 'invoice.invoice_number'. Use the following code to exclude the
- * printing of a given field:
- * @code
- * {{ invoice|without('invoice_number') }}
- * @endcode
- * - invoice_entity: The invoice entity.
- *
- * @ingroup themeable
- */
- #}
-
- {{ attach_library('commerce_order/form') }}
- {% set invoice_state = invoice_entity.getState.getLabel %}
-
- <div class="layout-order-form clearfix">
- <div class="layout-region layout-region-order-main">
- {{ invoice.invoice_items }}
- {{ invoice.total_price }}
-
- {% if invoice.activity %}
- <h2>{% trans %}Activity{% endtrans %}</h2>
- {{ invoice.activity }}
- {% endif %}
- </div>
- <div class="layout-region layout-region-order-secondary">
- <div class="entity-meta">
- <div class="entity-meta__header">
- <h3 class="entity-meta__title">
- {{ invoice_state }}
- </h3>
- {% for key in ['invoice_date', 'due_date'] %}
- {% if invoice[key] %}
- <div class="form-item">
- {{ invoice[key] }}
- </div>
- {% endif %}
- {% endfor %}
- </div>
- <details open class="seven-details">
- <summary role="button" class="seven-details__summary">
- {{ 'Customer Information'|t }}
- </summary>
- <div class="details-wrapper seven-details__wrapper">
- {% for key in ['uid', 'mail'] %}
- {% if invoice[key] %}
- <div class="form-item">
- {{ invoice[key] }}
- </div>
- {% endif %}
- {% endfor %}
- </div>
- </details>
- {% if invoice.billing_information %}
- <details open class="seven-details">
- <summary role="button" class="seven-details__summary">
- {{ 'Billing information'|t }}
- </summary>
- <div class="details-wrapper seven-details__wrapper">
- {{ invoice.billing_information }}
- </div>
- </details>
- {% endif %}
- {# If the invoice has possible transitions, render the field for transition buttons. #}
- {% if invoice_entity.getState.getTransitions is not empty %}
- <div class="entity-meta__header">
- {{ invoice.state }}
- </div>
- {% endif %}
- </div>
- </div>
- </div>