SL::DB::Object: Methode update_collections für One-To-Many-Relationships
[kivitendo-erp.git] / templates / webpages / reconciliation / _linked_transactions.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE L %]
4 [%- USE LxERP %]
5
6 [% SET debug = 0 %]
7
8 [% IF !SELF.LINKED_TRANSACTIONS.size %]
9   <tbody class="listrow">
10     <td colspan="11"><p class="message_hint">[% 'No data was found.' | $T8 %]</p></td>
11   </tbody>
12 [% ELSE %]
13   [% FOREACH link = SELF.LINKED_TRANSACTIONS %]
14     [% IF link.type == 'Link' %]
15       <tbody class="listrow">
16         [% FOREACH bt = link.BT %]
17           <tr>
18             [% IF loop.count == 1 %]
19               <td rowspan=[% link.BT.size + link.BB.size %] style="valign:center;">
20                 [% L.button_tag('delete_reconciliation(' _ link.rec_group  _ ')', LxERP.t8("X")) %]
21               </td>
22             [% END %]
23
24             <td><img width="16px" height="16px" src="image/bank-building.jpg"></td>
25             <td>[% 'Bank Transaction' | $T8 %]</td>
26             [% IF debug %]<td>[% HTML.escape(bt.id) %]</td>[% END %]
27             <td align="right" class="[% HTML.escape(bt.class) %]">[% HTML.escape(bt.transdate_as_date) %]</td>
28             <td align="right" class="[% HTML.escape(bt.class) %]">[% HTML.escape(bt.amount_as_number) %]</td>
29             <td></td>
30             <td>[% HTML.escape(bt.remote_name) %]</td>
31             <td>[% HTML.escape(bt.purpose) %]</td>
32             <td>[% HTML.escape(bt.remote_account_number) %]</td>
33             <td>[% HTML.escape(bt.remote_bank_code) %]</td>
34             <td></td>
35           </tr>
36         [% END %]
37         [% FOREACH bb = link.BB %]
38           <tr>
39             <td><div class="icon16 general-ledger--reports--journal"></div></td>
40             <td>[% 'Acc Transaction' | $T8 %]</td>
41             [% IF debug %]<td>[% HTML.escape(bb.acc_trans_id) %]</td>[% END %]
42             <td align="right" class="[% HTML.escape(bb.class) %]">[% HTML.escape(bb.transdate_as_date) %]</td>
43             <td></td>
44             <td align="right" class="[% HTML.escape(bb.class) %]">[% LxERP.format_amount(-1 * bb.amount, 2) %]</td>
45             <td>[% HTML.escape(bb.record.customer.name) %][% HTML.escape(bb.record.vendor.name) %][% HTML.escape(bb.record.description) %]</td>
46             <td>[% bb.record.link %] [% HTML.escape(bb.source) %] [% HTML.escape(bb.memo) %]</td>
47             <td></td>
48             <td></td>
49             <td>[% HTML.escape(bb.source) %]</td>
50           </tr>
51         [% END %]
52       </tbody>
53     [% ELSE %]
54       <tbody class="listrow_error">
55         [% FOREACH bt = link.BT %]
56           <tr>
57             <td>
58               [%- L.checkbox_tag('bt_ids[]', value=link.id, onchange='update_reconciliation_table();')     %]
59             </td>
60
61             <td><img width="16px" height="16px" src="image/bank-building.jpg"></td>
62             <td>[% 'Bank Transaction' | $T8 %]</td>
63             [% IF debug %]<td>[% HTML.escape(bt.id) %]</td>[% END %]
64             <td align="right">[% HTML.escape(bt.transdate_as_date) %]</td>
65             <td align="right">[% HTML.escape(bt.amount_as_number) %]</td>
66             <td></td>
67             <td>[% HTML.escape(bt.remote_name) %]</td>
68             <td>[% HTML.escape(bt.purpose) %]</td>
69             <td>[% HTML.escape(bt.remote_account_number) %]</td>
70             <td>[% HTML.escape(bt.remote_bank_code) %]</td>
71             <td></td>
72           </tr>
73         [% END %]
74         [% FOREACH bb = link.BB %]
75           <tr>
76             <td>
77               [%- L.checkbox_tag('bb_ids[]', value=link.id, onchange='update_reconciliation_table();')     %]
78             </td>
79
80             <td><div class="icon16 general-ledger--reports--journal"></div></td>
81             <td>[% 'Acc Transaction' | $T8 %]</td>
82             [% IF debug %]<td>[% HTML.escape(bb.acc_trans_id) %]</td>[% END %]
83             <td align="right">[% HTML.escape(bb.transdate_as_date) %]</td>
84             <td></td>
85             <td align="right">[% LxERP.format_amount(-1 * bb.amount, 2) %]</td>
86             <td>[% HTML.escape(bb.record.customer.name) %][% HTML.escape(bb.record.vendor.name) %][% HTML.escape(bb.record.description) %]</td>
87             <td>[% bb.record.link %] [% HTML.escape(bb.source) %] [% HTML.escape(bb.memo) %]</td>
88             <td></td>
89             <td></td>
90             <td>[% HTML.escape(bb.source) %]</td>
91           </tr>
92         [% END %]
93       </tbody>
94     [% END %]
95   [% END %]
96 [% END %]