5 <table class="tbl-list">
7 [% IF is_type_credit_note %]
10 [% 'Incoming Payments' | $T8 %]
15 <th>[% 'Date' | $T8 %]</th>
16 <th>[% 'Source' | $T8 %]</th>
17 <th>[% 'Memo' | $T8 %]</th>
18 <th>[% 'Amount' | $T8 %]</th>
20 [% IF show_exchangerate %]
21 <th>[% 'Exch' | $T8 %]</th>
23 <th>[% 'Account' | $T8 %]</th>
27 [% FOREACH i = paid_indices %]
28 [% SET changeable = 'changeable_' _ i %]
29 [% SET acc_trans_id = 'acc_trans_id_' _ i %]
30 [% SET p_gldate = 'gldate_' _ i %]
31 [% SET datepaid = 'datepaid_' _ i %]
32 [% SET source = 'source_' _ i %]
33 [% SET memo = 'memo_' _ i %]
34 [% SET paid = 'paid_' _ i %]
35 [% SET AR_paid = 'AR_paid_' _ i %]
36 [% SET selectAR_paid_ref = 'selectAR_paid_' _ i %]
37 <!-- PENDENT: anders lösen -->
38 <tr style='display:none'>
40 <input type=hidden name="acc_trans_id_[% i %]" value="[% $acc_trans_id %]">
41 <input type=hidden name="gldate_[% i %]" value="[% $p_gldate %]">
48 [% L.date_tag('datepaid_'_ i, $datepaid) %]
50 [% L.date_tag('datepaid_'_ i, today) %]
53 <input type="hidden" name="datepaid_[% i %]" value="[% $datepaid %]"> [% $datepaid %]
58 <input type="text" name="source_[% i %]" size="11" value="[% $source %]">
60 <input type="hidden" name="source_[% i %]" value="[% $source %]">[% $source %]
65 <input type="text" name="memo_[% i %]" size="11" value="[% $memo %]">
67 <input type="hidden" name="memo_[% i %]" value="[% $memo %]">[% $memo %]
72 <input name="paid_[% i %]" size="11" data-validate="number" class="numeric" value="[% LxERP.format_amount($paid, 2, 1) %]">
74 <input type="hidden" name="paid_[% i %]" value="[% LxERP.format_amount($paid, 2, 1) %]">
75 [% LxERP.format_amount($paid, 2, 1) %] [% defaultcurrency %]
79 [% IF $changeable && loop.last && paid_missing > 0 %]
80 <input type="button" id="is_set_to_paid_missing" value="[% 'Set to paid missing' | $T8 %]">
83 [% IF show_exchangerate %]
85 [% SET forex = 'forex_' _ i %]
86 [% SET exchangerate = 'exchangerate_' _ i %]
87 [% SET defaultcurrency_paid = 'defaultcurrency_paid_' _ i %]
88 [% SET record_forex = 'record_forex_' _ i %]
90 <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5) %]">
91 [% LxERP.format_amount($forex, 5) %] = [% LxERP.format_amount($defaultcurrency_paid, 5) %] [% defaultcurrency %] </br>
92 [% IF $record_forex %][% 'bank transaction exchange rate' | $T8 %][%- ELSE %][% 'default exchange rate' | $T8 %][%- END %]
95 <input type="text" name="exchangerate_[% i %]" size="10" value="[% LxERP.format_amount($exchangerate, 5, 1) %]">
97 <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5, 1) %]">
98 [% LxERP.format_amount($exchangerate, 5, 1) %]
101 <input type="hidden" name="forex_[% i %]" value="[% $forex %]">
106 <select name="AR_paid_[% i %]">[% $selectAR_paid_ref %]</select>
108 <input type="hidden" name="AR_paid_[% i %]" value="[% $AR_paid %]">[% $AR_paid %]
116 <td colspan="2"></td>
117 <td class="right">[% 'Total' | $T8 %]</td>
118 <td align="numeric">[% LxERP.format_amount(totalpaid, 2) | html %] [% currency %]</td>
120 [% IF show_exchangerate %]
121 <td align="numeric">[% LxERP.format_amount(defaultcurrency_totalpaid, 2) | html %] [% defaultcurrency %]</td>
127 <td colspan="2"></td>
128 <td class="right">[% 'Missing amount' | $T8 %]</td>
129 <td align="numeric">[% LxERP.format_amount(paid_missing, 2) | html %] [% currency %]</td>
135 <input type="hidden" name="paidaccounts" value="[% paidaccounts %]">
136 <input type="hidden" name="selectAR_paid" value="[% selectAR_paid %]">
137 <input type="hidden" name="oldinvtotal" value="[% oldinvtotal %]">
138 <input type="hidden" name="oldtotalpaid" value="[% totalpaid %]">
140 <script type='text/javascript'>
141 $('#is_set_to_paid_missing').click(function(){ $('input[name^="paid_"]:last').val("[% LxERP.format_amount(paid_missing, 2) %]") });