Auftrags-Controller: Einkaufspreis in zweiter Zeile
[kivitendo-erp.git] / templates / webpages / bank_transactions / list.html
1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
2
3 <h1>[% title %]</h1>
4
5 [%- INCLUDE 'common/flash.html' %]
6
7 [% IF SELF.problems.size %]
8  [% INCLUDE 'bank_transactions/_problems.html' %]
9 [% END %]
10
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>
12 <p>
13 [% IF FORM.filter.fromdate %] [% 'From' | $T8 %] [% FORM.filter.fromdate %] [% END %]
14 [% IF FORM.filter.todate %]   [% 'to (date)' | $T8 %] [% FORM.filter.todate %][% END %]
15 </p>
16
17 <div id="bt_tabs" class="tabwidget">
18   <ul>
19     <li><a href="#all">[% 'All transactions' | $T8 %]</a></li>
20     <li><a href="#automatic">[% 'Proposals' | $T8 %]</a></li>
21   </ul>
22
23   <div id="all">[% PROCESS "bank_transactions/tabs/all.html" %]</div>
24   <div id="automatic">[% PROCESS "bank_transactions/tabs/automatic.html" %]</div>
25 </div>
26
27
28 <script type="text/javascript">
29 <!--
30
31 $(function() {
32   $('#check_all').checkall('INPUT[name^="proposal_ids"]');
33 });
34
35 $(function() {
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 %]");
39   });
40 });
41
42 function assign_invoice(bt_id) {
43   kivi.popup_dialog({
44     url:    'controller.pl?action=BankTransaction/assign_invoice',
45     data:   '&bt_id=' + bt_id,
46     type:   'POST',
47     id:     'assign_invoice_window',
48     dialog: { title: kivi.t8('Assign invoice') }
49   });
50   return true;
51 }
52
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);
60   }
61   var invoices = document.getElementById('assigned_invoices_' + bt_id);
62
63   $.ajax({
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;
67     }
68   });
69 }
70
71 function delete_invoice(bt_id, prop_id) {
72   $( "#" + bt_id + "\\." + prop_id ).remove();
73 }
74
75 function create_invoice(bt_id) {
76   kivi.popup_dialog({
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 %]",
79     type:   'POST',
80     id:     'create_invoice_window',
81     dialog: { title: kivi.t8('Create invoice') }
82   });
83   return true;
84 }
85
86 $.cookie('jquery_ui_tab_bt_tabs', [% ui_tab %] );
87 //-->
88 </script>