1 [%- USE HTML %][%- USE L %][%- USE LxERP %][%- USE T8 %]
3 <form method="post" action="javascript:filter_invoices();">
6 <tr class="listheading">
7 <td>[%- LxERP.t8("ID") %]:</td>
8 <td>[%- LxERP.t8("Amount") %]:</td>
9 <td>[%- LxERP.t8("Remote bank code") %]:</td>
10 <td>[%- LxERP.t8("Remote account number") %]:</td>
11 <td>[%- LxERP.t8("Remote name") %]:</td>
12 <td>[%- LxERP.t8("Purpose") %]:</td>
13 <td>[%- LxERP.t8("Transdate") %]:</td>
17 <td>[% SELF.transaction.id %]</td>
18 <td>[% LxERP.format_amount(SELF.transaction.amount, 2) %]</td>
19 <td>[% SELF.transaction.remote_bank_code %]</td>
20 <td>[% SELF.transaction.remote_account_number %]</td>
21 <td>[% SELF.transaction.remote_name %]</td>
22 <td>[% SELF.transaction.purpose %]</td>
23 <td>[% SELF.transaction.transdate_as_date %]</td>
30 <th align="right">[%- LxERP.t8("Invoice number") %]</th>
31 <td>[% L.input_tag('invnumber', '', style=style) %]</td>
33 <th align="right">[%- LxERP.t8("Customer/Vendor name") %]</th>
34 <td>[% L.input_tag('vcname', '', style=style) %]</td>
38 <th align="right">[%- LxERP.t8("Amount") %]</th>
39 <td>[% L.input_tag('amount', '', style=style) %]</td>
41 <th align="right">[%- LxERP.t8("Customer/Vendor number") %]</th>
42 <td>[% L.input_tag('vcnumber', '', style=style) %]</td>
46 <th align="right">[%- LxERP.t8("Transdate from") %]</th>
47 <td>[% L.date_tag('transdatefrom') %]</td>
49 <th align="right">[%- LxERP.t8("to (date)") %]</th>
50 <td>[% L.date_tag('transdateto') %]</td>
55 [% L.submit_tag('', LxERP.t8("Search")) %]
56 [% L.button_tag('add_selected_invoices()', LxERP.t8("Add invoices"), id='add_selected_record_links_button') %]
57 <a href="#" onclick="assign_invoice_reset_form();">[%- LxERP.t8("Reset") %]</a>
58 <a href="#" onclick="$('#assign_invoice_window').dialog('close');">[% LxERP.t8("Cancel") %]</a>
63 <div id="record_list_filtered_list"></div>
67 <script type="text/javascript">
70 function filter_invoices() {
71 var url="controller.pl?action=BankTransaction/ajax_add_list&" + $("#assign_invoice_window form").serialize();
74 success: function(new_data) {
75 $("#record_list_filtered_list").html(new_data['html']);
80 function add_selected_invoices() {
81 var url="controller.pl?action=BankTransaction/ajax_accept_invoices&" + 'bt_id=[% SELF.transaction.id %]&' + $("#assign_invoice_window form").serialize();
84 success: function(new_html) {
85 var invoices = document.getElementById('assigned_invoices_[% SELF.transaction.id %]');
86 if (invoices.innerHTML == '') {
87 invoices.innerHTML = new_html;
89 invoices.innerHTML += '<br />' + new_html;
91 $('#assign_invoice_window').dialog('close');
96 function assign_invoice_reset_form() {
97 $('#assign_invoice_window form input[type=text]').val('');