7      <tr class="listheading">
 
   8 [% IF is_type_credit_note %]
 
   9       <th colspan="6" class="listheading">[%- 'Payments' | $T8 %]</th>
 
  11       <th colspan="6" class="listheading">[%- 'Incoming Payments' | $T8 %]</th>
 
  17       <th>[%- 'Date' | $T8 %]</th>
 
  18       <th>[%- 'Source' | $T8 %]</th>
 
  19       <th>[%- 'Memo' | $T8 %]</th>
 
  20       <th>[%- 'Amount' | $T8 %]</th>
 
  22 [% IF show_exchangerate %]
 
  23       <th>[%- 'Exch' | $T8 %]</th>
 
  25       <th>[%- 'Account' | $T8 %]</th>
 
  29 [% FOREACH i = paid_indices %]
 
  30   [% SET changeable    = 'changeable_'    _ i %]
 
  31   [% SET acc_trans_id  = 'acc_trans_id_'  _ i %]
 
  32   [% SET p_gldate      = 'gldate_'        _ i %]
 
  33   [% SET datepaid      = 'datepaid_'      _ i %]
 
  34   [% SET source        = 'source_'        _ i %]
 
  35   [% SET memo          = 'memo_'          _ i %]
 
  36   [% SET paid          = 'paid_'          _ i %]
 
  37   [% SET AR_paid       = 'AR_paid_'       _ i %]
 
  38   [% SET selectAR_paid_ref = 'selectAR_paid_' _ i %]
 
  39      <tr style='display:none'>
 
  41          <input type=hidden name="acc_trans_id_[% i %]" value="[% $acc_trans_id %]">
 
  42          <input type=hidden name="gldate_[% i %]" value="[% $p_gldate %]">
 
  50          [% L.date_tag('datepaid_'_ i, $datepaid) %]
 
  52          [% L.date_tag('datepaid_'_ i, today) %]
 
  55        <input type="hidden" name="datepaid_[% i %]" value="[% $datepaid %]"> [% $datepaid %]
 
  61        <input name="source_[% i %]" size="11" value="[% $source %]">
 
  63        <input type="hidden" name="source_[% i %]" value="[% $source %]">[% $source %]
 
  68        <input name="memo_[% i %]" size="11" value="[% $memo %]">
 
  70        <input type="hidden" name="memo_[% i %]" value="[% $memo %]">[% $memo %]
 
  75        <input name="paid_[% i %]" size="11" data-validate="number" class="numeric" value="[% LxERP.format_amount($paid, 2, 1) %]">
 
  77        <input type="hidden" name="paid_[% i %]" value="[% LxERP.format_amount($paid, 2, 1) %]">
 
  78        [% LxERP.format_amount($paid, 2, 1) %]
 
  82        [% IF $changeable && loop.last && paid_missing > 0 %]
 
  83          <input type='button' id='is_set_to_paid_missing' value='[% 'Set to paid missing' | $T8 %]'>
 
  87 [% IF show_exchangerate %]
 
  89   [% SET forex        = 'forex_'        _ i %]
 
  90   [% SET exchangerate = 'exchangerate_' _ i %]
 
  92         <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5) %]">
 
  93         [% LxERP.format_amount($forex, 5) %]
 
  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="AR_paid_[% i %]">[% $selectAR_paid_ref %]</select>
 
 110        <input type="hidden" name="AR_paid_[% i %]" value="[% $AR_paid %]">[% $AR_paid %]
 
 120       <td align="center">[%- 'Total' | $T8 %]</td>
 
 121       <td align="center">[% LxERP.format_amount(totalpaid, 2) | html %]</td>
 
 126       <td align="center">[%- 'Missing amount' | $T8 %]</td>
 
 127       <td align="center">[% LxERP.format_amount(paid_missing, 2) | html %]</td>
 
 129     <tr style='display:none'>
 
 131      <input type="hidden" name="paidaccounts" value="[% paidaccounts %]">
 
 132      <input type="hidden" name="selectAR_paid" value="[% selectAR_paid %]">
 
 133      <input type="hidden" name="oldinvtotal" value="[% oldinvtotal %]">
 
 135      <input type="hidden" name="oldtotalpaid" value="[% totalpaid %]">
 
 142     <script type='text/javascript'>
 
 143      $('#is_set_to_paid_missing').click(function(){ $('input[name^="paid_"]:last').val("[% LxERP.format_amount(paid_missing, 2) %]") });