1195f287e2ec71c54840faa9775cfc73bb73b7ef
[kivitendo-erp.git] / templates / webpages / acctranscorrections / assistant_for_wrong_taxes.html
1 [%- USE T8 %]
2 [% USE HTML %][% USE LxERP %]
3 <body>
4
5  <p><div class="listtop">[% title %]</div></p>
6
7  <p>
8   [% 'The following transaction contains wrong taxes:' | $T8 %]
9   <a href="[% problem.link %]">
10    [%- IF problem.data.module == 'ar' %]
11    [% 'AR Transaction' | $T8 %]
12    [%- ELSIF problem.data.module == 'ap' %]
13    [% 'AP Transaction' | $T8 %]
14    [%- ELSE %]
15    [% 'General Ledger Transaction' | $T8 %]
16    [%- END %]
17    [% HTML.escape(problem.data.reference) %]
18   </a>
19  </p>
20
21  <p>[% 'At the moment the transaction looks like this:' | $T8 %]</p>
22
23  <p>
24   <table>
25    <tr>
26     <th class="listheading">[% 'Account' | $T8 %]</th>
27     <th class="listheading">[% 'Debit' | $T8 %]</th>
28     <th class="listheading">[% 'Credit' | $T8 %]</th>
29     <th class="listheading">[% 'Taxkey' | $T8 %]</th>
30     <th class="listheading">[% 'Recorded Tax' | $T8 %]</th>
31     <th class="listheading">[% 'Expected Tax' | $T8 %]</th>
32     <th class="listheading"></th>
33    </tr>
34
35    [%- SET curr_row = 0 %]
36    [%- IF problem.acc_trans.credit.entries.size > problem.acc_trans.debit.entries.size %]
37     [%- SET order = [ 'credit', 'debit' ] %]
38     [%- SET other_side = 'debit' %]
39    [%- ELSE %]
40     [%- SET order = [ 'debit', 'credit' ] %]
41     [%- SET other_side = 'credit' %]
42    [%- END %]
43
44    [%- FOREACH idx = order %]
45     [%- FOREACH row = problem.acc_trans.$idx.entries %]
46      [%- SET curr_row = curr_row + 1 %]
47      <tr class="listrow[% curr_row % 2 %]">
48       <td>[% HTML.escape(row.accno) %]--[% HTML.escape(row.chartdescription) %]</td>
49       <td align="right">
50        [%- IF idx == 'debit' %]
51         [% LxERP.format_amount(row.display_amount, 2) %]
52        [%- END %]
53       </td>
54       <td align="right">
55        [%- IF idx == 'credit' %]
56         [% LxERP.format_amount(row.display_amount, 2) %]
57        [%- END %]
58       </td>
59       <td>[% IF idx != other_side %][% HTML.escape(row.taxdescription) %][% END %]</td>
60       <td align="right">[% IF row.actual_tax %][% LxERP.format_amount(row.actual_tax, 2) %][% END %]</td>
61       <td align="right">[% IF row.expected_tax %][% LxERP.format_amount(row.expected_tax, 2) %][% END %]</td>
62       <td align="center" valign="center"><img src="image/[% IF row.tax_error %]error[% ELSE %]ok[% END %].png"></td>
63      </tr>
64     [%- END %]
65    [%- END %]
66
67   </table>
68  </p>
69  <hr>
70
71  <form method="post" action="acctranscorrections.pl">
72   <p>
73    <input type="hidden" name="action" value="delete_transaction">
74    <input type="hidden" name="trans_id" value="[% HTML.escape(problem.data.trans_id) %]">
75    <input type="submit" class="submit" value="[% 'Delete transaction' | $T8 %]">
76    <input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]">
77   </p>
78  </form>
79
80 </body>
81 </html>