[%- USE T8 %]
[%- USE LxERP %]
[%- USE L %]
+[%- USE HTML %]
<tr>
<td>
<table width="100%">
<tr class="listheading">
-[% IF is_type_credit_note || vc == 'vendor' %]
<th colspan="6" class="listheading">[% 'Payments' | $T8 %]</th>
-[% ELSE %]
- <th colspan="6" class="listheading">[% 'Incoming Payments' | $T8 %]</th>
-[%- END %]
</tr>
-
-
<tr>
<th>[% 'Date' | $T8 %]</th>
<th>[% 'Source' | $T8 %]</th>
<th>[% 'Memo' | $T8 %]</th>
<th>[% 'Amount' | $T8 %]</th>
+ <th></th>
[% IF show_exchangerate %]
<th>[% 'Exch' | $T8 %]</th>
[% END %]
<td align="center">
[% IF $changeable %]
- [% L.date_tag('datepaid_'_ i, $datepaid) %]
+ [% IF $datepaid %]
+ [% L.date_tag('datepaid_'_ i, $datepaid) %]
+ [% ELSE %]
+ [% L.date_tag('datepaid_'_ i, today) %]
+ [% END %]
[% ELSE %]
<input type="hidden" name="datepaid_[% i %]" value="[% $datepaid %]">[% $datepaid %]
[% END %]
[% LxERP.format_amount($paid, 2, 1) %]
[% END %]
</td>
+ <td>
+ [% IF $changeable && loop.last && paid_missing > 0 %]
+ <input type='button' id='is_set_to_paid_missing' value='[% 'Set to paid missing' | $T8 %]'>
+ [% END %]
+ </td>
[% IF show_exchangerate %]
<td align="center">
[% SET forex = 'forex_' _ i %]
[% SET exchangerate = 'exchangerate_' _ i %]
[% IF $forex %]
- <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 2) %]">
- [% LxERP.format_amount($forex, 2) %]
+ <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5) %]">
+ [% LxERP.format_amount($forex, 5) %]
[% ELSE %]
[% IF $changeable %]
- <input name="exchangerate_[% i %]" size="10" value="[% LxERP.format_amount($exchangerate, 2, 1) %]">
+ <input name="exchangerate_[% i %]" size="10" value="[% LxERP.format_amount($exchangerate, 5, 1) %]">
[% ELSE %]
- <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 2, 1) %]">
- [% LxERP.format_amount($exchangerate, 2, 1) %]
+ <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5, 1) %]">
+ [% LxERP.format_amount($exchangerate, 5, 1) %]
[% END %]
[% END %]
<input type="hidden" name="forex_[% i %]" value="[% $forex %]">
<td></td>
<td></td>
<td align="center">[% 'Total' | $T8 %]</td>
- <td align="center">[% LxERP.foramt_amount(totalpaid, 2) | html %]</td>
+ <td align="center">[% LxERP.format_amount(totalpaid, 2) | html %]</td>
</tr>
<tr>
<td></td>
</td>
</tr>
+ <script type='text/javascript'>
+ $('#is_set_to_paid_missing').click(function(){ $('input[name^="paid_"]:last').val('[% LxERP.format_amount(paid_missing, 2) %]') });
+ </script>