<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/**
 * @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Subtotal
 * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
 * @see \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Subtotal
 */
?>
<?php if ($block->displayBoth()): ?>
<tr id="subtotal-exclude-tax" class="row-totals">
    <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
        <?= $block->escapeHtml(__('Subtotal (Excl. Tax)')) ?>
    </td>
    <td class="admin__total-amount">
        <?= /* @noEscape */ $block->formatPrice($block->getTotal()->getValueExclTax()) ?>
    </td>
</tr>
    <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
            $block->escapeHtmlAttr($block->getStyle()),
            'tr#subtotal-exclude-tax td.admin__total-mark'
        ) ?>
        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
            $block->escapeHtmlAttr($block->getStyle()),
            'tr#subtotal-exclude-tax td.admin__total-amount'
        ) ?>
    <?php endif; ?>
<tr id="subtotal-include-tax" class="row-totals">
    <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
        <?= $block->escapeHtml(__('Subtotal (Incl. Tax)')) ?>
    </td>
    <td class="admin__total-amount">
        <?= /* @noEscape */ $block->formatPrice($block->getTotal()->getValueInclTax()) ?>
    </td>
</tr>
    <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
            $block->escapeHtmlAttr($block->getStyle()),
            'tr#subtotal-include-tax td.admin__total-mark'
        ) ?>
        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
            $block->escapeHtmlAttr($block->getStyle()),
            'tr#subtotal-include-tax td.admin__total-amount'
        ) ?>
    <?php endif; ?>
<?php else: ?>
<tr id="subtotal-total" class="row-totals">
    <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
        <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
    </td>
    <td class="admin__total-amount">
        <?= /* @noEscape */ $block->formatPrice($block->getTotal()->getValue()) ?>
    </td>
</tr>
    <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
            $block->escapeHtmlAttr($block->getStyle()),
            'tr#subtotal-total td.admin__total-mark'
        ) ?>
        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
            $block->escapeHtmlAttr($block->getStyle()),
            'tr#subtotal-total td.admin__total-amount'
        ) ?>
    <?php endif; ?>
<?php endif;?>
