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 
10 ?>
11 <?php
13 $_source = $block->getSource();
14 $_order = $block->getOrder();
15 $_fullInfo = $block->getFullTaxInfo();
16 ?>
17 
18 <?php if ($block->displayFullSummary() && $_fullInfo): ?>
19 <tr class="summary-total" onclick="expandDetails(this, '.summary-details')">
20 <?php else: ?>
21 <tr>
22  <?php endif; ?>
23  <td class="label">
24  <div class="summary-collapse" tabindex="0">
25  <?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary()): ?>
26  <?= /* @escapeNotVerified */ __('Total Tax') ?>
27  <?php else: ?>
28  <?= /* @escapeNotVerified */ __('Tax') ?>
29  <?php endif;?>
30  </div>
31  </td>
32  <td>
33  <?= /* @escapeNotVerified */ $block->displayAmount($_source->getTaxAmount(), $_source->getBaseTaxAmount()) ?>
34  </td>
35 </tr>
36 <?php if ($block->displayFullSummary()): ?>
37  <?php $isTop = 1; ?>
38  <?php if (isset($_fullInfo[0]['rates'])): ?>
39  <?php foreach ($_fullInfo as $info): ?>
40  <?php if (isset($info['hidden']) && $info['hidden']) {
41  continue;
42  } ?>
43  <?php
44  $percent = $info['percent'];
45  $amount = $info['amount'];
46  $baseAmount = $info['base_amount'];
47  $rates = $info['rates'];
48  $isFirst = 1;
49  ?>
50 
51  <?php foreach ($rates as $rate): ?>
52  <tr class="summary-details<?php if ($isTop): echo ' summary-details-first'; endif; ?>" style="display:none;">
53  <?php if (!is_null($rate['percent'])): ?>
54  <td class="admin__total-mark"><?= /* @escapeNotVerified */ $rate['title'] ?> (<?= (float)$rate['percent'] ?>%)<br /></td>
55  <?php else: ?>
56  <td class="admin__total-mark"><?= /* @escapeNotVerified */ $rate['title'] ?><br /></td>
57  <?php endif; ?>
58  <?php if ($isFirst): ?>
59  <td rowspan="<?= count($rates) ?>"><?= /* @escapeNotVerified */ $block->displayAmount($amount, $baseAmount) ?></td>
60  <?php endif; ?>
61  </tr>
62  <?php
63  $isFirst = 0;
64  $isTop = 0;
65  ?>
66  <?php endforeach; ?>
67  <?php endforeach; ?>
68  <?php else: ?>
69  <?php foreach ($_fullInfo as $info): ?>
70  <?php
71  $percent = $info['percent'];
72  $amount = $info['tax_amount'];
73  $baseAmount = $info['base_tax_amount'];
74  $isFirst = 1;
75  ?>
76 
77  <tr class="summary-details<?php if ($isTop): echo ' summary-details-first'; endif; ?>" style="display:none;">
78  <?php if (!is_null($info['percent'])): ?>
79  <td class="admin__total-mark"><?= $block->escapeHtml($info['title']) ?> (<?= (float)$info['percent'] ?>%)<br /></td>
80  <?php else: ?>
81  <td class="admin__total-mark"><?= $block->escapeHtml($info['title']) ?><br /></td>
82  <?php endif; ?>
83  <td><?= /* @escapeNotVerified */ $block->displayAmount($amount, $baseAmount) ?></td>
84  </tr>
85  <?php
86  $isFirst = 0;
87  $isTop = 0;
88  ?>
89  <?php endforeach; ?>
90  <?php endif; ?>
91 <?php endif;?>
92 
if($this->helper('Magento\Tax\Helper\Data') ->displayFullSummary()) foreach( $block->getTotal() ->getFullInfo() as $info)(isset($info['hidden']) && $info['hidden']) $percent
Definition: tax.phtml:33
$amount
Definition: tax.phtml:34
__()
Definition: __.php:13
$rates
Definition: tax.phtml:35
$block
Definition: block.php:8
$baseAmount
Definition: tax.phtml:46
$_order
Definition: tax.phtml:14
$isTop
Definition: tax.phtml:54
$_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
$isFirst
Definition: tax.phtml:36