8 <tr class="listheading">
9 <th colspan="6" class="listheading">[% 'Payments' | $T8 %]</th>
12 <th>[% 'Date' | $T8 %]</th>
13 <th>[% 'Source' | $T8 %]</th>
14 <th>[% 'Memo' | $T8 %]</th>
15 <th>[% 'Amount' | $T8 %]</th>
17 [% IF show_exchangerate %]
18 <th>[% 'Exch' | $T8 %]</th>
20 <th>[% 'Account' | $T8 %]</th>
24 [% FOREACH i = paid_indices %]
25 [% SET changeable = 'changeable_' _ i %]
26 [% SET acc_trans_id = 'acc_trans_id_' _ i %]
27 [% SET p_gldate = 'gldate_' _ i %]
28 [% SET datepaid = 'datepaid_' _ i %]
29 [% SET source = 'source_' _ i %]
30 [% SET memo = 'memo_' _ i %]
31 [% SET paid = 'paid_' _ i %]
32 [% SET AP_paid = 'AP_paid_' _ i %]
33 [% SET selectAP_paid_ref = 'selectAP_paid_' _ i %]
35 <input type=hidden name="acc_trans_id_[% i %]" value=[% $acc_trans_id %]>
36 <input type=hidden name="gldate_[% i %]" value=[% $p_gldate %]>
43 [% L.date_tag('datepaid_'_ i, $datepaid) %]
45 [% L.date_tag('datepaid_'_ i, today) %]
48 <input type="hidden" name="datepaid_[% i %]" value="[% $datepaid %]">[% $datepaid %]
53 <input name="source_[% i %]" size="11" value="[% $source %]">
55 <input type="hidden" name="source_[% i %]" value="[% $source %]">[% $source %]
60 <input name="memo_[% i %]" size="11" value="[% $memo %]">
62 <input type="hidden" name="memo_[% i %]" value="[% $memo %]">[% $memo %]
67 <input name="paid_[% i %]" size="11" value="[% LxERP.format_amount($paid, 2, 1) %]">
69 <input type="hidden" name="paid_[% i %]" value="[% LxERP.format_amount($paid, 2, 1) %]">
70 [% LxERP.format_amount($paid, 2, 1) %]
74 [% IF $changeable && loop.last && paid_missing > 0 %]
75 <input type='button' id='is_set_to_paid_missing' value='[% 'Set to paid missing' | $T8 %]'>
79 [% IF show_exchangerate %]
81 [% SET forex = 'forex_' _ i %]
82 [% SET exchangerate = 'exchangerate_' _ i %]
83 [% SET defaultcurrency_paid = 'defaultcurrency_paid_' _ i %]
84 [% SET record_forex = 'record_forex_' _ i %]
85 [% SET fx_transaction = 'fx_transaction_' _ i %]
87 <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5) %]">
88 <input type="hidden" name="record_forex_[% i %]" value="[% $record_forex %]">
89 <input type="hidden" name="forex_[% i %]" value="[% $forex %]">
90 <input type="hidden" name="defaultcurrency_paid_[% i %]" value="[% $defaultcurrency_paid %]">
91 <input type="hidden" name="fx_transaction_[% i %]" value="1">
92 [% LxERP.format_amount($forex, 5) %] = [% LxERP.format_amount($defaultcurrency_paid, 5) %] [% defaultcurrency %] </br>
93 [% IF $record_forex %][% 'bank transaction exchange rate' | $T8 %][%- ELSE %][% 'default exchange rate' | $T8 %][%- END %]
96 <input name="exchangerate_[% i %]" size="10" value="[% LxERP.format_amount($exchangerate, 5, 1) %]">
98 <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5, 1) %]">
99 [% LxERP.format_amount($exchangerate, 5, 1) %]
102 <input type="hidden" name="forex_[% i %]" value="[% $forex %]">
108 <select name="AP_paid_[% i %]">[% $selectAP_paid_ref %]</select>
110 <input type="hidden" name="AP_paid_[% i %]" value="[% $AP_paid %]">[% $AP_paid %]
121 <td align="center">[%- 'Total' | $T8 %]</td>
122 <td align="center">[% LxERP.format_amount(totalpaid, 2) | html %] [% currency %]</td>
124 [% IF show_exchangerate %]
125 <td align="center">[% LxERP.format_amount(defaultcurrency_totalpaid, 2) | html %] [% defaultcurrency %]</td>
126 <input type="hidden" name="defaultcurrency_totalpaid" value="[% defaultcurrency_totalpaid %]">
129 [% UNLESS show_exchangerate %]
133 <td align="center">[%- 'Missing amount' | $T8 %]</td>
134 <td align="center">[% LxERP.format_amount(paid_missing, 2) | html %]</td>
138 <input type="hidden" name="paidaccounts" value="[% paidaccounts %]">
139 <input type="hidden" name="selectAP_paid" value="[% selectAP_paid %]">
140 <input type="hidden" name="oldinvtotal" value="[% oldinvtotal %]">
142 <input type="hidden" name="oldtotalpaid" value="[% totalpaid %]">
147 <script type='text/javascript'>
148 $('#is_set_to_paid_missing').click(function(){ $('input[name^="paid_"]:last').val("[% LxERP.format_amount(paid_missing, 2) %]") });