Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
tax.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php
11  $_order = $block->getOrder();
12  $_source = $block->getSource();
13  $_fullInfo = $this->helper('Magento\Tax\Helper\Data')->getCalculatedTaxes($_source);
14  global $taxIter; $taxIter++;
15 ?>
16 
17 <?php if ($_fullInfo && $block->displayFullSummary()): ?>
18  <?php foreach ($_fullInfo as $info): ?>
19  <?php
20  $percent = $info['percent'];
21  $amount = $info['tax_amount'];
22  $baseAmount = $info['base_tax_amount'];
23  $title = $info['title'];
24  ?>
25  <tr class="totals tax details details-<?= /* @escapeNotVerified */ $taxIter ?> <?= ($block->getIsPlaneMode()) ? ' plane' : '' ?>">
26  <td <?= /* @escapeNotVerified */ $block->getLabelProperties() ?>>
27  <?= $block->escapeHtml($title) ?>
28  <?php if (!is_null($percent)): ?>
29  (<?= (float)$percent ?>%)
30  <?php endif; ?>
31  <br />
32  </td>
33  <td <?= /* @escapeNotVerified */ $block->getValueProperties() ?> rowspan="1">
34  <?= /* @escapeNotVerified */ $_order->formatPrice($amount) ?>
35  </td>
36  </tr>
37  <?php endforeach; ?>
38 <?php endif;?>
39 
40 <?php if ($block->displayFullSummary() && $_fullInfo && !$block->getIsPlaneMode()): ?>
41 <tr class="totals-tax-summary">
42 <?php elseif ($block->displayFullSummary() && $_fullInfo && $block->getIsPlaneMode()): ?>
43 <tr class="totals-tax-summary plane">
44 <?php else: ?>
45 <tr class="totals-tax">
46 <?php endif; ?>
47  <th <?= /* @escapeNotVerified */ $block->getLabelProperties() ?> scope="row">
48  <?php if ($block->displayFullSummary()): ?>
49  <div class="detailed"><?= /* @escapeNotVerified */ __('Tax') ?></div>
50  <?php else: ?>
51  <?= /* @escapeNotVerified */ __('Tax') ?>
52  <?php endif;?>
53  </th>
54  <td <?= /* @escapeNotVerified */ $block->getValueProperties() ?> data-th="<?= $block->escapeHtml(__('Tax')) ?>">
55  <?= /* @escapeNotVerified */ $_order->formatPrice($_source->getTaxAmount()) ?>
56  </td>
57 </tr>
if($this->helper('Magento\Tax\Helper\Data') ->displayFullSummary()) foreach( $block->getTotal() ->getFullInfo() as $info)(isset($info['hidden']) && $info['hidden']) $percent
Definition: tax.phtml:33
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$amount
Definition: tax.phtml:34
__()
Definition: __.php:13
$block
Definition: block.php:8
$baseAmount
Definition: tax.phtml:46
$_order
Definition: tax.phtml:14
$title
Definition: tax.phtml:23
$_source
Definition: tax.phtml:13
$_fullInfo
Definition: tax.phtml:15
endforeach
Definition: tax.phtml:55
foreach( $rates as $rate)($isTop) endif
Definition: tax.phtml:38
foreach( $_productCollection as $_product)() ?>" class $info
Definition: listing.phtml:52
if(($taxAmount==0 && $this->helper('Magento\Tax\Helper\Data') ->displayZeroTax())||($taxAmount > 0)) $taxIter
Definition: tax.phtml:11