8 <tr class="listheading">
9 [% IF is_type_credit_note || vc == 'vendor' %]
10 <th colspan="6" class="listheading">[% 'Payments' | $T8 %]</th>
12 <th colspan="6" class="listheading">[% 'Incoming Payments' | $T8 %]</th>
18 <th>[% 'Date' | $T8 %]</th>
19 <th>[% 'Source' | $T8 %]</th>
20 <th>[% 'Memo' | $T8 %]</th>
21 <th>[% 'Amount' | $T8 %]</th>
23 [% IF show_exchangerate %]
24 <th>[% 'Exch' | $T8 %]</th>
26 <th>[% 'Account' | $T8 %]</th>
30 [% FOREACH i = paid_indices %]
31 [% SET changeable = 'changeable_' _ i %]
32 [% SET acc_trans_id = 'acc_trans_id_' _ i %]
33 [% SET p_gldate = 'gldate_' _ i %]
34 [% SET datepaid = 'datepaid_' _ i %]
35 [% SET source = 'source_' _ i %]
36 [% SET memo = 'memo_' _ i %]
37 [% SET paid = 'paid_' _ i %]
38 [% SET AP_paid = 'AP_paid_' _ i %]
39 [% SET selectAP_paid_ref = 'selectAP_paid_' _ i %]
41 <input type=hidden name="acc_trans_id_[% i %]" value=[% $acc_trans_id %]>
42 <input type=hidden name="gldate_[% i %]" value=[% $p_gldate %]>
49 [% L.date_tag('datepaid_'_ i, $datepaid) %]
51 [% L.date_tag('datepaid_'_ i, today) %]
54 <input type="hidden" name="datepaid_[% i %]" value="[% $datepaid %]">[% $datepaid %]
59 <input name="source_[% i %]" size="11" value="[% $source %]">
61 <input type="hidden" name="source_[% i %]" value="[% $source %]">[% $source %]
66 <input name="memo_[% i %]" size="11" value="[% $memo %]">
68 <input type="hidden" name="memo_[% i %]" value="[% $memo %]">[% $memo %]
73 <input name="paid_[% i %]" size="11" value="[% LxERP.format_amount($paid, 2, 1) %]">
75 <input type="hidden" name="paid_[% i %]" value="[% LxERP.format_amount($paid, 2, 1) %]">
76 [% LxERP.format_amount($paid, 2, 1) %]
80 [% IF $changeable && loop.last && paid_missing > 0 %]
81 <input type='button' id='is_set_to_paid_missing' value='[% 'Set to paid missing' | $T8 %]'>
85 [% IF show_exchangerate %]
87 [% SET forex = 'forex_' _ i %]
88 [% SET exchangerate = 'exchangerate_' _ i %]
90 <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 2) %]">
91 [% LxERP.format_amount($forex, 2) %]
94 <input name="exchangerate_[% i %]" size="10" value="[% LxERP.format_amount($exchangerate, 2, 1) %]">
96 <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 2, 1) %]">
97 [% LxERP.format_amount($exchangerate, 2, 1) %]
100 <input type="hidden" name="forex_[% i %]" value="[% $forex %]">
106 <select name="AP_paid_[% i %]">[% $selectAP_paid_ref %]</select>
108 <input type="hidden" name="AP_paid_[% i %]" value="[% $AP_paid %]">[% $AP_paid %]
119 <td align="center">[% 'Total' | $T8 %]</td>
120 <td align="center">[% LxERP.format_amount(totalpaid, 2) | html %]</td>
125 <td align="center">[% 'Missing amount' | $T8 %]</td>
126 <td align="center">[% LxERP.format_amount(paid_missing, 2) | html %]</td>
129 <input type="hidden" name="paidaccounts" value="[% paidaccounts %]">
130 <input type="hidden" name="selectAP_paid" value="[% selectAP_paid %]">
131 <input type="hidden" name="oldinvtotal" value="[% oldinvtotal %]">
133 <input type="hidden" name="oldtotalpaid" value="[% totalpaid %]">
138 <script type='text/javascript'>
139 $('#is_set_to_paid_missing').click(function(){ $('input[name^="paid_"]:last').val('[% LxERP.format_amount(paid_missing, 2) %]') });