1 [%- USE HTML %][%- USE L %][%- USE LxERP %][%- USE T8 %]
 
   5 <form method="post" action="javascript:filter_invoices();">
 
   6   <b>[%- LxERP.t8("Bank transaction") %]:</b>
 
   8    <tr class="listheading">
 
   9     [% IF debug %]<td>[%- LxERP.t8("ID") %]:</td>[% END %]
 
  10     <td>[%- LxERP.t8("Transdate") %]:</td>
 
  11     <td>[%- LxERP.t8("Amount") %]:</td>
 
  12     <td>[%- LxERP.t8("Remote name") %]:</td>
 
  13     <td>[%- LxERP.t8("Purpose") %]:</td>
 
  14     <td>[%- LxERP.t8("Remote account number") %]:</td>
 
  15     <td>[%- LxERP.t8("Remote bank code") %]:</td>
 
  19     [% IF debug %]<td>[% SELF.transaction.id %]</td>[% END %]
 
  20     <td>[% SELF.transaction.transdate_as_date %]</td>
 
  21     <td>[% LxERP.format_amount(SELF.transaction.amount, 2) %]</td>
 
  22     <td>[% SELF.transaction.remote_name %]</td>
 
  23     <td>[% SELF.transaction.purpose %]</td>
 
  24     <td>[% SELF.transaction.remote_account_number %]</td>
 
  25     <td>[% SELF.transaction.remote_bank_code %]</td>
 
  29   <b>[%- LxERP.t8("Invoice filter") %]:</b>
 
  32     <th align="right">[%- LxERP.t8("Invoice number") %]</th>
 
  33     <td>[% L.input_tag('invnumber', '', style=style) %]</td>
 
  35     <th align="right">[%- LxERP.t8("Customer/Vendor name") %]</th>
 
  36     <td>[% L.input_tag('vcname', '', style=style) %]</td>
 
  40     <th align="right">[%- LxERP.t8("Amount") %]</th>
 
  41     <td>[% L.input_tag('amount', '', style=style) %]</td>
 
  43     <th align="right">[%- LxERP.t8("Customer/Vendor number") %]</th>
 
  44     <td>[% L.input_tag('vcnumber', '', style=style) %]</td>
 
  48     <th align="right">[%- LxERP.t8("Invdate from") %]</th>
 
  49     <td>[% L.date_tag('transdatefrom') %]</td>
 
  51     <th align="right">[%- LxERP.t8("to (date)") %]</th>
 
  52     <td>[% L.date_tag('transdateto') %]</td>
 
  57    [% L.submit_tag('', LxERP.t8("Search")) %]
 
  58    [% L.button_tag('add_selected_invoices()', LxERP.t8("Add invoices"), id='add_selected_record_links_button') %]
 
  59    <a href="#" onclick="assign_invoice_reset_form();">[%- LxERP.t8("Reset") %]</a>
 
  60    <a href="#" onclick="$('#assign_invoice_window').dialog('close');">[% LxERP.t8("Cancel") %]</a>
 
  65   <div id="record_list_filtered_list"></div>
 
  69 <script type="text/javascript">
 
  72 function filter_invoices() {
 
  73   var url="controller.pl?action=BankTransaction/ajax_add_list&" + $("#assign_invoice_window form").serialize();
 
  76     success: function(new_data) {
 
  77       $("#record_list_filtered_list").html(new_data['html']);
 
  82 function add_selected_invoices() {
 
  83   var url="controller.pl?action=BankTransaction/ajax_accept_invoices&" + 'bt_id=[% SELF.transaction.id %]&' + $("#assign_invoice_window form").serialize();
 
  86     success: function(new_html) {
 
  87       var invoices = document.getElementById('assigned_invoices_[% SELF.transaction.id %]');
 
  88       if (invoices.innerHTML == '') {
 
  89         invoices.innerHTML = new_html;
 
  91         invoices.innerHTML += '<br />' + new_html;
 
  93       $('#assign_invoice_window').dialog('close');
 
  98 function assign_invoice_reset_form() {
 
  99   $('#assign_invoice_window form input[type=text]').val('');