JSlip  1.0
user_journal_tax.tmplt
Go to the documentation of this file.
1 <?php
2 /**
3  * @link https://datagram.co.jp/source/bksj for the canonical source repository
4  * @copyright Copyright (c) 2006-2019 Datagram Ltd. (https://datagram.co.jp)
5  * @license https://datagram.co.jp/source/bksj/license.txt
6  */
7 
8 $view = $ctrl->view;
9 $ans = $ctrl->ans;
10 $val = number_format($ans['val']);
11 $rname = $view->str($ans['rname']);
12 ?>
13 <table class="my_table">
14  <tr><th>金額</th><td><?= $val ?></td></tr>
15  <tr><th>まるめ方式</th><td><?= $rname ?></td></tr>
16  <tr>
17  <th>外税</th>
18  <td>
19  <table class="my_table">
20  <tr>
21  <th>方式</th><th>税抜金額</th><th>消費税</th><th>外税金額</th>
22  </tr>
23 <?php
24 foreach ($ans['otax'] as $k => $d) {
25  $n = $view->str($d['name']);
26  $t = number_format($d['tax']);
27  $v = number_format($ans['val']);
28  $a = number_format($ans['val'] + $d['tax']);
29 ?>
30  <tr>
31  <td><?= $n ?></td>
32  <td style="text-align: right;"><?= $v ?></td>
33  <td style="text-align: right;"><?= $t ?></td>
34  <td style="text-align: right;"><?= $a ?></td>
35  </tr>
36 <?php
37 }
38 ?>
39  </table>
40  </td>
41  </tr>
42  <tr>
43  <th>内税</th>
44  <td>
45  <table class="my_table">
46  <tr>
47  <th>方式</th><th>税抜金額</th><th>消費税</th><th>内税金額</th>
48  </tr>
49 <?php
50 foreach ($ans['itax'] as $k => $d) {
51  $n = $view->str($d['name']);
52  $t = number_format($d['tax']);
53  $v = number_format($ans['val'] - $d['tax']);
54  $a = number_format($ans['val']);
55 ?>
56  <tr>
57  <td><?= $n ?></td>
58  <td style="text-align: right;"><?= $v ?></td>
59  <td style="text-align: right;"><?= $t ?></td>
60  <td style="text-align: right;"><?= $a ?></td>
61  </tr>
62 <?php
63 }
64 ?>
65  </table>
66  </td>
67  </tr>
68 </table>
69 <br>
70 
71 </table>
72 <br>