df7b2441b9db11515247d2d13b71d2a2cb9976a6
[kivitendo-erp.git] / templates / webpages / ir / form_header.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- SET follow_up_trans_info = invnumber _ ' (' _ vendor_name _ ')' %]
5 <body>
6 <script type="text/javascript" src="js/common.js"></script>
7 <script type="text/javascript" src="js/vendor_selection.js"></script>
8 <script type="text/javascript" src="js/calculate_qty.js"></script>
9 <script type="text/javascript" src="js/follow_up.js"></script>
10 <script type="text/javascript" src="js/customer_or_vendor_selection.js"></script>
11
12 <form method="post" name="invoice" action="[% script %]">
13
14 <p>[% saved_message %]</p>
15
16 [%- FOREACH key = HIDDENS %]
17 <input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key)  %]">
18 [%- END %]
19 <input type="hidden" name="follow_up_trans_id_1" value="[% id %]">
20 <input type="hidden" name="follow_up_trans_type_1" value="sales_invoice">
21 <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
22 <input type="hidden" name="follow_up_rowcount" value="1">
23
24 <p><div class="listtop" width="100%">[% title %]</div></p>
25
26 [%- INCLUDE 'common/flash.html' %]
27
28 <table width="100%">
29   <tr>
30     <td valign="top">
31       <table>
32         <tr>
33           <th align="right">[% 'Vendor' | $T8 %]</th>
34           <td>
35             [%- INCLUDE 'generic/multibox.html'
36                  name          = 'vendor',
37                  style         = 'width: 250px',
38                  DATA          = ALL_VENDORS,
39                  id_sub        = 'vc_keys',
40                  label_key     = 'name',
41                  select        = vc_select,
42                  limit         = vclimit,
43                  allow_textbox = 1,
44                  onChange      = "document.getElementById('update_button').click();" -%]
45             <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('[% vc | html %]')">
46           </td>
47           <input type="hidden" name="vendor_klass" value="[% HTML.escape(vendor_klass) %]">
48           <input type="hidden" name="vendor_id" value="[% HTML.escape(vendor_id) %]">
49           <input type="hidden" name="oldvendor" value="[% HTML.escape(oldvendor) %]">
50           <input type="hidden" name="selectvendor" value="[% HTML.escape(selectvendor) %]">
51         </tr>
52 [%- IF ALL_CONTACTS.size %]
53         <tr>
54           <th align="right">[% 'Contact Person' | $T8 %]</th>
55           <td>
56             [%- INCLUDE 'generic/multibox.html'
57                  name       = 'cp_id',
58                  style      = 'width: 250px',
59                  DATA       = ALL_CONTACTS,
60                  id_key     = 'cp_id',
61                  label_sub  = 'contact_labels',
62                  show_empty = 1 -%]
63           </td>
64         </tr>
65 [%- END %]
66         <tr>
67           <td align="right">[% 'Credit Limit' | $T8 %]</td>
68           <td>
69             [% LxERP.format_amount(creditlimit, 0, '0') %]; [% 'Remaining' | $T8 %]
70             <span class="plus[% IF is_credit_remaining_negativ %]0[% ELSE %]1[% END %]">[% LxERP.format_amount(creditremaining,0 ,'0') %]</span>
71           </td>
72         </tr>
73         <tr>
74           <th align="right" nowrap>[% 'Record in' | $T8 %]</th>
75           <td colspan="3"><select name="AP" style="width:250px;">[% selectAP %]</select></td>
76           <input type="hidden" name="selectAP" value="[% selectAP %]">
77         </tr>
78         <tr>
79           <th align="right">[% 'Steuersatz' | $T8 %]</th>
80           <td>
81             [%- INCLUDE 'generic/multibox.html'
82                  name       = 'taxzone_id'
83                  style      = 'width: 250px'
84                  DATA       = ALL_TAXZONES
85                  id_key     = 'id'
86                  readonly   = (id ? 1 : 0)
87                  label_key  = 'description' -%]
88           </td>
89   [%- IF id %]
90           <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
91   [%- END %]
92         </tr>
93 [%- IF all_departments %]
94         <tr>
95           <th align="right" nowrap>[% 'Department' | $T8 %]</th>
96           <td colspan="3">
97             [%- INCLUDE 'generic/multibox.html'
98                  name       = 'department_id',
99                  style      = 'width: 250px',
100                  DATA       = all_departments,
101                  id_key     = 'id',
102                  label_sub  = 'department_labels',
103                  show_empty = 1 -%]
104           </td>
105         </tr>
106 [%- END %]
107 [%- IF currencies %]
108         <tr>
109           <th align="right">[% 'Currency' | $T8 %]</th>
110           <td>[% currencies %]</td>
111         </tr>
112 [%- END %]
113         <input type="hidden" name="fxgain_accno" value="[% fxgain_accno %]">
114         <input type="hidden" name="fxloss_accno" value="[% fxloss_accno %]">
115 [%- IF show_exchangerate %]
116         <tr>
117           <th align="right">[% 'Exchangerate' | $T8 %]</th>
118           <td>
119            [%- IF forex %]
120             [% LxERP.format_amount(exchangerate, 2) %]
121            [%- ELSE %]
122             <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
123            [%- END %]
124           </td>
125         </tr>
126 [%- END %]
127       </table>
128     </td>
129     <td align="right" valign="top">
130       <table>
131         <tr>
132           <th align="right">[% 'Employee' | $T8 %]</th>
133           <td>
134             [%- INCLUDE 'generic/multibox.html'
135                  name       = 'employee_id',
136                  DATA       = ALL_EMPLOYEES,
137                  id_key     = 'id',
138                  label_sub  = 'sales_employee_labels' -%]
139           </td>
140         </tr>
141
142 [%- IF is_type_credit_note %]
143         <tr>
144           <th align="right" nowrap>[% 'Credit Note Number' | $T8 %]</th>
145           <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
146         </tr>
147         <tr>
148           <th align="right">[% 'Credit Note Date' | $T8 %]</th>
149           <td nowrap>
150             <input name="invdate" id="invdate" size="11" title="[% dateformat %]" value="[% invdate %]" onBlur="check_right_date_format(this)">
151             <input type="button" name="invdate_button" id="trigger1" value="[% 'button' | $T8 %]">
152           </td>
153         </tr>
154 [%- ELSE %]
155         <tr>
156           <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
157           <td colspan="3"><input size='11' name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
158         </tr>
159         <tr>
160           <th align="right">[% 'Invoice Date' | $T8 %]</th>
161           <td nowrap>
162             <input name="invdate" id="invdate" size="11" title="[% dateformat %]" value="[% invdate %]" onBlur="check_right_date_format(this)">
163             <input type="button" name="invdate_button" id="trigger1" value="[% 'button' | $T8 %]">
164           </td>
165         </tr>
166         <tr>
167           <th align="right">[% 'Due Date' | $T8 %]</th>
168           <td width="13">
169             <input name="duedate" id="duedate" size="11" title="[% dateformat %]" value="[% duedate %]" onBlur="check_right_date_format(this)">
170             <input type="button" name="duedate_button" id="trigger2" value="[% 'button' | $T8 %]">
171           </td>
172         </tr>
173 [%- END %]
174
175         <tr>
176           <th align="right" nowrap>[% 'Order Number' | $T8 %]</th>
177           <td colspan="3"><input size='11' name="ordnumber" value="[% HTML.escape(ordnumber) %]"></td>
178         </tr>
179         <tr>
180           <th align="right" nowrap>[% 'Order Date' | $T8 %]</th>
181           <td><input name="orddate" id="orddate" size="11" title="[% dateformat %]" value="[% orddate %]" onBlur="check_right_date_format(this)">
182           <input type="button" name="b_orddate" id="trigger_orddate" value="?"></td>
183         </tr>
184         <tr>
185           <th align="right" nowrap>[% 'Quotation Date' | $T8 %]</th>
186           <td><input name="quodate" id="quodate" size="11" title="[% dateformat %]" value="[% quodate %]" onBlur="check_right_date_format(this)">
187            <input type="button" name="b_quodate" id="trigger_quodate" value="?"></td>
188         </tr>
189         <tr>
190           <th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
191           <td>
192             [%- INCLUDE 'generic/multibox.html'
193                  name       = 'globalproject_id',
194                  DATA       = ALL_PROJECTS,
195                  id_key     = 'id',
196                  label_key  = 'projectnumber',
197                  show_empty = 1,
198                  onChange   = "document.getElementById('update_button').click();" -%]
199           </td>
200         </tr>
201       </table>
202     </td>
203   </tr>
204 </table>
205     </td>
206   </tr>
207   <tr>
208     <td>
209     </td>
210   </tr>
211   <script type="text/javascript" src="js/show_form_details.js"></script>
212   <script type="text/javascript" src="js/show_vc_details.js"></script>
213   <script type="text/javascript" src="js/show_history.js"></script>
214   <script type="text/javascript">
215    <!--
216      Calendar.setup({ inputField : "invdate",      ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger1" });
217      Calendar.setup({ inputField : "duedate",      ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" });
218      Calendar.setup({ inputField : "orddate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_orddate" });
219      Calendar.setup({ inputField : "quodate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_quodate" });
220      $('document').ready(function(){
221 [% IF creditwarning != '' %]
222        alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
223 [% ELSE %]
224        focus();
225 [% END %]
226        setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
227        setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
228      });
229    //-->
230   </script>
231
232   <input type="hidden" name="webdav" value="[% webdav %]">