8dd130a7dea4646082f9e5b38591f23f0dc9e7b3
[kivitendo-erp.git] / templates / webpages / gl / form_header.html
1 [%- USE HTML %]
2 [%- USE LxERP %]
3 [%- USE T8 %]
4 [%- USE L %]
5 <h1>[% title | html %]</h1>
6
7 [%- INCLUDE 'common/flash.html' %]
8
9 <script type="text/javascript">
10   <!--
11   function copy_debit_to_credit() {
12     var txt = document.getElementsByName('debit_1')[0].value;
13     document.getElementsByName('credit_2')[0].value = txt;
14   };
15   //-->
16   </script>
17   <script type="text/javascript" src="js/show_form_details.js"></script>
18 <script type="text/javascript" src="js/follow_up.js"></script>
19 <script type="text/javascript" src="js/kivi.Draft.js"></script>
20
21 <form method="post" name="gl" action="gl.pl" id="form">
22
23 [% FOREACH name IN [ 'id', 'closedto', 'locked', 'storno', 'storno_id', 'previous_id', 'previous_gldate' ] %]
24 [% L.hidden_tag(name, $name) %]
25 [%- END %]
26
27 <input type=hidden name=title value="[% hide_title | html %]">
28
29 <input type="hidden" name="follow_up_trans_id_1" value="[% id | html %]">
30 <input type="hidden" name="follow_up_trans_type_1" value="gl_transaction">
31 <input type="hidden" name="follow_up_trans_info_1" value="[% id | html %]">
32 <input type="hidden" name="follow_up_rowcount" value="1">
33
34 <div id="gl_tabs" class="tabwidget">
35  <ul>
36   <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
37 [%- IF INSTANCE_CONF.get_webdav %]
38   <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
39 [%- END %]
40 [%- IF id %]
41 [%- IF INSTANCE_CONF.get_doc_storage %]
42   <li><a href="#ui-tabs-docs">[% 'Documents' | $T8 %]</a></li>
43   <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=gl_transaction&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
44 [%- END %]
45   [%- IF AUTH.assert('record_links', 1) %]
46   <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=GLTransaction&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
47   [%- END %]
48 [%- END %]
49  </ul>
50
51 [%- IF INSTANCE_CONF.get_doc_storage %]
52   <div id="ui-tabs-docs"></div>
53 [%- END %]
54
55  <div id="ui-tabs-basic-data">
56
57 <table width=100%>
58 [%- IF saved_message %]
59   <tr>
60     <td>[% saved_message | html %]</th>
61   </tr>
62 [%- END %]
63
64   <tr height="5"></tr>
65   <tr>
66     <td>
67       <table>
68         <tr>
69           <td colspan="6" align="left">[% 'Previous transnumber text' | $T8 %] [% previous_id  %] . [% 'Previous transdate text' | $T8 %] [% previous_gldate %]</td>
70         </tr>
71         <tr>
72           <th align="right">[% 'Reference' | $T8 %]</th>
73           <td>[% L.input_tag('reference', reference,  style='width:330px', readonly=readonly) %]</td>
74           <th align="right">[% 'Transdate' | $T8 %]</th>
75           <td>[% L.date_tag('transdate', transdate, readonly=readonly) %]</td>
76         </tr>
77 [%- IF id %]
78         <tr>
79           <th align="right">[% 'ID' | $T8 %]</th>
80           <td>[% id %]</td>
81           <th align="right">[% 'Gldate' | $T8 %]</th>
82           <td>[% L.date_tag('gldate', gldate, readonly=1) %]<img class="ui-datepicker-trigger" src="image/calendar.png" alt="..." title="..." style='visibility:hidden'></td>
83         </tr>
84 [%- END %]
85
86         [% SET departments_style = "";
87            SET departments_style = "style='visibility:hidden'" IF ALL_DEPARTMENTS.size == 0 %]
88         <tr>
89           <th [%- departments_style -%]align="right">[% 'Department' | $T8 %]</th>
90           <td [%- departments_style -%]>[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, style = 'width:334px') %]</td>
91           <th align=right>[% 'Tax point' | $T8 %]</th>
92           <td>[% L.date_tag('tax_point', tax_point) %]</td>
93         </tr>
94         <tr>
95           <th align="right">[% 'Transaction description' | $T8 %]</th>
96           <td>[% L.input_tag("transaction_description", transaction_description, style='width:330px') %]</td>
97           <th align=right>[% 'Delivery Date' | $T8 %]</th>
98           <td>[% L.date_tag('deliverydate', deliverydate) %]</td>
99         </tr>
100         <tr>
101           <th align="right">[% 'Description' | $T8 %]</th>
102           <td>[% L.areainput_tag('description', description, cols=50, style='width:330px', readonly=readonly) %]</td>
103         </tr>
104         <tr>
105           <th align="right">[%- IF id %][% 'Mitarbeiter' | $T8 %][% END %]</th>
106           <td>[%- IF id %][% L.input_tag('employee', employee, size=20, readonly=readonly) %][% END %]</td>
107           <th align="right">[% 'MwSt. inkl.' | $T8 %]</th>
108           <td>[% L.checkbox_tag('taxincluded', checked=taxincluded) %]</td>
109         </tr>
110
111       <tr>
112        <td colspan=4>
113          [% 'OB Transaction' | $T8 %] [% L.checkbox_tag('ob_transaction' checked=ob_transaction) %]
114          [% 'CB Transaction' | $T8 %] [% L.checkbox_tag('cb_transaction' checked=cb_transaction) %]
115        </td>
116       </tr>
117       <tr>
118        <td width="1%" align="right" nowrap>[% 'Show details' | $T8 %]</td>
119        <td width="1%">[% L.checkbox_tag('show_details', checked=show_details, onclick='show_form_details();') %]</td>
120       </tr>
121
122       <tr>
123       <td colspan=4>
124           <table width=100%>
125            <tr class=listheading>
126           <th class=listheading style="width:15%">[% 'Account' | $T8 %]</th>
127           <th class=listheading style="width:10%">[% 'Chart balance' | $T8 %]</th>
128           <th class=listheading style="width:10%">[% 'Debit' | $T8 %]</th>
129           <th class=listheading style="width:10%">[% 'Credit' | $T8 %]</th>
130           <th class=listheading style="width:10%">[% 'Tax' | $T8 %]</th>
131           <th class=listheading style="width:5%">[% 'Taxkey' | $T8 %]</th>
132
133 [%- IF show_details %]
134           <th class=listheading style="width:20%">[% 'Source' | $T8 %]</th>
135           <th class=listheading style="width:20%">[% 'Memo' | $T8 %]</th>
136           <th class=listheading style="width:20%">[% 'Project Number' | $T8 %]</th>
137 [%- END %]
138
139         </tr>