1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
5 [%- INCLUDE 'common/flash.html' %]
7 [% IF SELF.problems.size %]
8 [% INCLUDE 'bank_transactions/_problems.html' %]
11 <p>[% HTML.escape(bank_account.name) %] [% HTML.escape(bank_account.iban) %], [% 'Bank code' | $T8 %] [% HTML.escape(bank_account.bank_code) %], [% 'Bank' | $T8 %] [% HTML.escape(bank_account.bank) %]</p>
13 [% IF FORM.filter.fromdate %] [% 'From' | $T8 %] [% FORM.filter.fromdate %] [% END %]
14 [% IF FORM.filter.todate %] [% 'to (date)' | $T8 %] [% FORM.filter.todate %][% END %]
17 <div id="bt_tabs" class="tabwidget">
19 <li><a href="#all">[% 'All transactions' | $T8 %]</a></li>
20 <li><a href="#automatic">[% 'Proposals' | $T8 %]</a></li>
23 <div id="all">[% PROCESS "bank_transactions/tabs/all.html" %]</div>
24 <div id="automatic">[% PROCESS "bank_transactions/tabs/automatic.html" %]</div>
28 <script type="text/javascript">
32 $('#check_all').checkall('INPUT[name^="proposal_ids"]');
36 $('.sort_link').each(function() {
37 var _href = $(this).attr("href");
38 $(this).attr("href", _href + "&filter.fromdate=" + "[% FORM.filter.fromdate %]" + "&filter.todate=" + "[% FORM.filter.todate %]");
42 function assign_invoice(bt_id) {
44 url: 'controller.pl?action=BankTransaction/assign_invoice',
45 data: '&bt_id=' + bt_id,
47 id: 'assign_invoice_window',
48 dialog: { title: kivi.t8('Assign invoice') }
53 function add_invoices(bt_id, prop_id, prop_invnumber) {
54 // prop_id is a proposed invoice_id
55 // remove the added invoice from all the other suggestions
56 var number_of_elements = document.getElementsByName(prop_id).length;
57 for( var i = 0; i < number_of_elements; i++ ) {
58 var node = document.getElementsByName(prop_id)[0];
59 node.parentNode.removeChild(node);
61 var invoices = document.getElementById('assigned_invoices_' + bt_id);
64 url: 'controller.pl?action=BankTransaction/ajax_payment_suggestion&bt_id=' + bt_id + '&prop_id=' + prop_id,
65 success: function(data) {
66 invoices.innerHTML += data.html;
71 function delete_invoice(bt_id, prop_id) {
72 $( "#" + bt_id + "\\." + prop_id ).remove();
75 function create_invoice(bt_id) {
77 url: 'controller.pl?action=BankTransaction/create_invoice',
78 data: '&bt_id=' + bt_id + "&filter.bank_account=[% FORM.filter.bank_account %]&filter.todate=[% FORM.filter.todate %]&filter.fromdate=[% FORM.filter.fromdate %]",
80 id: 'create_invoice_window',
81 dialog: { title: kivi.t8('Create invoice') }
86 $.cookie('jquery_ui_tab_bt_tabs', [% ui_tab %] );