<commit_before>{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}

<div class="ui segment">
    <table class="ui very basic table" id="sylius-checkout-subtotal">
        <thead>
        <tr>
            <th class="sylius-table-column-item">{{ 'sylius.ui.item'|trans }}</th>
            <th class="sylius-table-column-qty">{{ 'sylius.ui.quantity'|trans }}</th>
            <th class="sylius-table-column-subtotal">{{ 'sylius.ui.subtotal'|trans }}</th>
        </tr>
        </thead>
        <tbody>
        {% for item in order.items %}
            <tr>
                <td>{{ item.getVariant.product.name }}</td>
                <td class="center aligned">
                    {{ item.quantity }}
                </td>
                <td id="sylius-item-{{ item.variant.product.slug }}-subtotal">{{ money.convertAndFormat(item.subtotal) }}</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div><commit_msg>Add prices and discounts to the order summary box<commit_after>{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}

{% set itemsSubtotal = sylius_order_items_subtotal(order) %}
{% set taxIncluded = sylius_order_tax_included(order) %}
{% set taxExcluded = sylius_order_tax_excluded(order) %}

<div class="ui segment">
    <table class="ui very basic table" id="sylius-checkout-subtotal">
        <thead>
        <tr>
            <th class="sylius-table-column-item">{{ 'sylius.ui.item'|trans }}</th>
            <th class="sylius-table-column-qty">{{ 'sylius.ui.qty'|trans }}</th>
            <th class="sylius-table-column-subtotal">{{ 'sylius.ui.subtotal'|trans }}</th>
        </tr>
        </thead>
        <tbody>
        {% for item in order.items %}
            <tr>
                <td>{{ item.getVariant.product.name }}</td>
                <td class="center aligned">
                    {{ item.quantity }}
                </td>
                <td class="right aligned" id="sylius-item-{{ item.variant.product.slug }}-subtotal">{{ money.convertAndFormat(item.subtotal) }}</td>
            </tr>
        {% endfor %}
        </tbody>
        <tfoot>
            <tr>
                <td colspan="1" style="border-top: 2px solid #ddd;">
                    <strong>{{ 'sylius.ui.items_total'|trans }}:</strong>
                </td>
                <td colspan="2" id="sylius-summary-items-subtotal" class="right aligned" style="border-top: 2px solid #ddd;">
                    {{ money.convertAndFormat(itemsSubtotal) }}
                </td>
            </tr>
            <tr {% if taxIncluded and not taxExcluded %}class="tax-disabled" {% endif %}>
                <td colspan="1">
                    <strong>{{ 'sylius.ui.taxes_total'|trans }}:</strong>
                </td>
                <td colspan="2" class="right aligned">
                    {% if not taxIncluded and not taxExcluded %}
                        <div id="sylius-summary-tax-none">{{ money.convertAndFormat(0) }}</div>
                    {% endif %}
                    {% if taxExcluded %}
                        <div id="sylius-summary-tax-excluded">{{ money.convertAndFormat(taxExcluded) }}</div>
                    {% endif %}
                    {% if taxIncluded %}
                        <div class="tax-disabled">
                            <span id="sylius-summary-tax-included">{{ money.convertAndFormat(taxIncluded) }}</span>
                            <div><small>({{ 'sylius.ui.included_in_price'|trans }})</small></div>
                        </div>
                    {% endif %}
                </td>
            </tr>
            <tr>
                <td colspan="1">
                    <strong>{{ 'sylius.ui.discount'|trans }}:</strong>
                </td>
                <td colspan="2" id="sylius-summary-promotion-total" class="right aligned">
                    {{ money.convertAndFormat(order.orderPromotionTotal) }}
                </td>
            </tr>
            <tr>
                <td colspan="1">
                    <strong>{{ 'sylius.ui.shipping_estimated_cost'|trans }}:</strong>
                </td>
                <td colspan="2" class="right aligned">
                    {% if order.getAdjustmentsTotal('shipping') > order.shippingTotal %}
                        <div class="old-price">{{ money.convertAndFormat(order.getAdjustmentsTotal('shipping')) }}</div>
                    {% endif %}
                    <span id="sylius-summary-shipping-total">{{ money.convertAndFormat(order.shippingTotal) }}</span>
                </td>
            </tr>
            <tr class="ui large header">
                <td colspan="1">
                    <strong>{{ 'sylius.ui.order_total'|trans }}:</strong>
                </td>
                <td colspan="2" id="sylius-summary-grand-total" class="right aligned">
                    {{ money.convertAndFormat(order.total) }}
                </td>
            </tr>
        </tfoot>
    </table>
</div>
{'fraction_non_alphanumeric': 0.16346736714487775, 'fraction_numerical': 0.0026267932915740554, 'mean_word_length': 1.6148969889064977, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 110, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3874338', 'n_tokens_mistral': 1561, 'n_tokens_neox': 1430, 'n_words': 262}