Funktionalität für Mindesthaltbarkeitsdatum hinzugefügt.
[kivitendo-erp.git] / templates / webpages / do / form_header_en.html
1 [% USE HTML %][% USE LxERP %]<body onload="on_load()">
2
3  <script type="text/javascript" src="js/show_form_details.js"></script>
4  <script type="text/javascript" src="js/show_history.js"></script>
5  <script type="text/javascript" src="js/show_vc_details.js"></script>
6  <script type="text/javascript" src="js/common.js"></script>
7  <script type="text/javascript" src="js/delivery_customer_selection.js"></script>
8  <script type="text/javascript" src="js/vendor_selection.js"></script>
9  <script type="text/javascript" src="js/calculate_qty.js"></script>
10  <script type="text/javascript" src="js/stock_in_out.js"></script>
11
12  <script type="text/javascript">
13   <!--
14       function on_load() {
15         [% IF onload %][% onload %];[% END %]
16         setupDateFormat('[% myconfig_dateformat %]', 'Falsches Datumsformat!');
17         setupPoints('[% myconfig_numberformat %]', 'wrongformat');
18
19         [%- UNLESS delivered %]
20         Calendar.setup({ inputField : "transdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdate_trigger" });
21         [%- END %]
22       }
23     -->
24  </script>
25
26  <style type="text/css">
27   .fixed_width {
28     width: 250px;
29   }
30  </style>
31
32  [%- IF vc == 'customer' %]
33  [%- SET vc = 'customer' %]
34  [%- SET the_vc_id = customer_id %]
35  [%- SET the_vc = customer %]
36  [%- SET the_oldvc = oldcustomer %]
37  [%- SET is_customer = '1' %]
38  [%- ELSE %]
39  [%- SET vc = 'vendor' %]
40  [%- SET the_vc_id = vendor_id %]
41  [%- SET the_vc = vendor %]
42  [%- SET the_oldvc = oldvendor %]
43  [%- SET is_customer = '0' %]
44  [%- END %]
45  [%- IF delivered %]
46  [%- SET RO = ' readonly' %]
47  [%- SET DISABLED = ' disabled' %]
48  [%- END %]
49
50  <div class="listtop">[% title %]</div>
51
52  [%- IF ERRORS && ERRORS.size %]
53  <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
54  [%- END %]
55
56  <form method="post" name="do" action="do.pl">
57
58   <input type="hidden" name="action" value="[% HTML.escape(action) %]">
59   <input type="hidden" name="bcc" value="[% HTML.escape(bcc) %]">
60   <input type="hidden" name="business" value="[% HTML.escape(business) %]">
61   <input type="hidden" name="cc" value="[% HTML.escape(cc) %]">
62   <input type="hidden" name="closed" value="[% HTML.escape(closed) %]">
63   <input type="hidden" name="convert_from_oe_ids" value="[% HTML.escape(convert_from_oe_ids) %]">
64   <input type="hidden" name="curr" value="[% HTML.escape(curr) %]">
65   <input type="hidden" name="customer_klass" value="[% HTML.escape(customer_klass) %]">
66   <input type="hidden" name="discount" value="[% HTML.escape(discount) %]">
67   <input type="hidden" name="dunning_amount" value="[% HTML.escape(dunning_amount) %]">
68   <input type="hidden" name="email" value="[% HTML.escape(email) %]">
69   <input type="hidden" name="emailed" value="[% HTML.escape(emailed) %]">
70   <input type="hidden" name="format" value="[% HTML.escape(format) %]">
71   <input type="hidden" name="formname" value="[% HTML.escape(formname) %]">
72   <input type="hidden" name="id" value="[% HTML.escape(id) %]">
73   <input type="hidden" name="max_dunning_level" value="[% HTML.escape(max_dunning_level) %]">
74   <input type="hidden" name="media" value="[% HTML.escape(media) %]">
75   <input type="hidden" name="message" value="[% HTML.escape(message) %]">
76   <input type="hidden" name="printed" value="[% HTML.escape(printed) %]">
77   <input type="hidden" name="proforma" value="[% HTML.escape(proforma) %]">
78   <input type="hidden" name="queued" value="[% HTML.escape(queued) %]">
79   <input type="hidden" name="saved_donumber" value="[% HTML.escape(saved_donumber) %]">
80   <input type="hidden" name="shiptocity" value="[% HTML.escape(shiptocity) %]">
81   <input type="hidden" name="shiptocontact" value="[% HTML.escape(shiptocontact) %]">
82   <input type="hidden" name="shiptocountry" value="[% HTML.escape(shiptocountry) %]">
83   <input type="hidden" name="shiptodepartment_1" value="[% HTML.escape(shiptodepartment_1) %]">
84   <input type="hidden" name="shiptodepartment_2" value="[% HTML.escape(shiptodepartment_2) %]">
85   <input type="hidden" name="shiptoemail" value="[% HTML.escape(shiptoemail) %]">
86   <input type="hidden" name="shiptofax" value="[% HTML.escape(shiptofax) %]">
87   <input type="hidden" name="shiptoname" value="[% HTML.escape(shiptoname) %]">
88   <input type="hidden" name="shiptophone" value="[% HTML.escape(shiptophone) %]">
89   <input type="hidden" name="shiptostreet" value="[% HTML.escape(shiptostreet) %]">
90   <input type="hidden" name="shiptozipcode" value="[% HTML.escape(shiptozipcode) %]">
91   <input type="hidden" name="subject" value="[% HTML.escape(subject) %]">
92   <input type="hidden" name="taxincluded" value="[% HTML.escape(taxincluded) %]">
93   <input type="hidden" name="taxzone_id" value="[% HTML.escape(taxzone_id) %]">
94   <input type="hidden" name="terms" value="[% HTML.escape(terms) %]">
95   <input type="hidden" name="title" value="[% HTML.escape(title) %]">
96   <input type="hidden" name="type" value="[% HTML.escape(type) %]">
97   <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
98
99   <p>
100    <table width="100%">
101     <tr valign="top">
102      <td>
103       <table width="100%">
104        <tr>
105         <input type="hidden" name="[% vc %]_id" value="[% HTML.escape(the_vc_id) %]">
106         <input type="hidden" name="old[% vc %]" value="[% HTML.escape(the_oldvc) %]">
107         <th align="right">[% IF is_customer %]Customer[% ELSE %]Vendor[% END %]</th>
108         <td>
109          [%- UNLESS !delivered && SHOW_VC_DROP_DOWN %]
110          <input type="text" value="[% HTML.escape(oldvcname) %]" name="[% HTML.escape(vc) %]"[% RO %]>
111 [% INCLUDE 'generic/autocomplete.html', AUTOCOMPLETES => [
112   { script => 'ct.pl', column => 'name', selector => 'input[name="' _ vc _ '"]', params => { vc => vc } },
113 ]
114 %]
115          [%- ELSE %]
116          <select name="[% vc %]" class="fixed_width" onchange="document.do.update_button.click();"[% RO %]>
117           [%- FOREACH row = ALL_VC %]
118           <option value="[% HTML.escape(row.value) %]" [% IF the_oldvc == row.value %] selected[% END %]>[% HTML.escape(row.name) %]</option>
119           [%- END %]
120          </select>
121          <input type="hidden" name="select[% vc %]" value="1">
122          [%- END %]
123          <input type="button" value="Details (one letter abbreviation)" onclick="show_vc_details('[% vc %]')">
124         </td>
125
126         [%- IF ALL_CONTACTS.size %]
127         <tr>
128          <th align="right">Contact Person</th>
129          <td>
130           [%- IF delivered %]
131           <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
132           [%- IF cp_id == row.cp_id %]
133           [%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%]
134           [%- END %]
135           [%- ELSE %]
136           <select name="cp_id" class="fixed_width" >
137            <option></option>
138            [%- FOREACH row = ALL_CONTACTS %]
139            <option value="[% HTML.escape(row.cp_id) %]"[% IF cp_id == row.cp_id %] selected[% END %]>
140             [%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%]
141            </option>
142            [%- END %]
143           </select>
144           [%- END %]
145          </td>
146         </tr>
147         [%- END %]
148 [% INCLUDE 'generic/autocomplete.html', AUTOCOMPLETES => [
149   { script => 'ct.pl', column => 'name', selector => 'input[name="' _ vc _ '"]', params => { vc => vc } },
150 ]
151 %]
152
153         [%- IF ALL_SHIPTO.size %]
154         <tr>
155          <th align="right">Shipping Address</th>
156          <td>
157           [%- IF delivered %]
158           <input type="hidden" name="shipto_id" value="[% HTML.escape(shipto_id) %]">
159           [%- FOREACH row = ALL_SHIPTO %]
160           [%- IF shipto_id == row.shipto_id %]
161           [%- HTML.escape(row.shiptoname) -%]
162           [%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%]
163           [%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%]
164           [%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%]
165           [%- END %]
166           [%- END %]
167
168           [%- ELSE %]
169           <select name="shipto_id" class="fixed_width" >
170            <option></option>
171            [%- FOREACH row = ALL_SHIPTO %]
172            <option value="[% HTML.escape(row.shipto_id) %]"[% IF shipto_id == row.shipto_id %] selected[% END %]>
173             [%- HTML.escape(row.shiptoname) -%]
174             [%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%]
175             [%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%]
176             [%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%]
177            </option>
178            [%- END %]
179           </select>
180           [%- END %]
181          </td>
182         </tr>
183         [%- END %]
184
185         [%- IF business %]
186         <tr>
187          <th align="right">[% IF is_customer %]Customer type[% ELSE %]Vendor type[% END %]</th>
188          <td>[% HTML.escape(business) %]</td>
189         </tr>
190         [%- END %]
191
192         [%- IF max_dunning_level %]
193         <tr>
194          <th align="right">Max. Dunning Level</th>
195          <td>
196           <b>[% HTML.escape(max_dunning_level) %]</b>; Dunning Amount:
197           <b>[% HTML.escape(LxERP.format_amount(dunning_amount, 2)) %]</b>
198          </td>
199         </tr>
200         [%- END %]
201        </tr>
202
203        [%- IF ALL_DEPARTMENTS.size %]
204        <tr>
205         <th align="right" nowrap>Department</th>
206         <td colspan="3">
207          [%- IF delivered %]
208          <input type="hidden" name="department" value="[% HTML.escape(department) %]">
209          [%- FOREACH row = ALL_DEPARTMENTS %]
210          [% IF department == row.value %][% HTML.escape(row.description) %]--[% HTML.escape(row.id) %][% END %]
211          [%- END %]
212          [%- ELSE %]
213          <select name="department" class="fixed_width">
214           <option></option>
215           [%- FOREACH row = ALL_DEPARTMENTS %]
216           <option[% IF department == row.value %] selected[% END %]>[% HTML.escape(row.description) %]--[% HTML.escape(row.id) %]</option>
217           [%- END %]
218          </select>
219          [%- END %]
220         </td>
221        </tr>
222        [%- END %]
223
224        <tr>
225         <th align="right">Shipping Point</th>
226         <td colspan="3"><input name="shippingpoint" size="35" value="[% HTML.escape(shippingpoint) %]"[% RO %]></td>
227        </tr>
228
229        <tr>
230         <th align="right">Ship via</th>
231         <td colspan="3"><input name="shipvia" size="35" value="[% HTML.escape(shipvia) %]"[% RO %]></td>
232        </tr>
233
234        <tr>
235         <th align="right">Transaction description</th>
236         <td colspan="3"><input name="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"[% RO %]></td>
237        </tr>
238
239       </table>
240      </td>
241
242      <td align="right">
243       <table>
244
245        <tr>
246         <td colspan="2" align="center">
247          [%- IF delivered %]
248           [%- IF is_customer %]
249           transferred out
250           [%- ELSE %]
251           transferred in
252           [%- END %]
253          [%- ELSE %]
254           [%- IF is_customer %]
255           not transferred out yet
256           [%- ELSE %]
257           not transferred in yet
258           [%- END %]
259          [%- END %]
260          ;
261          [%- IF closed %]
262           Closed
263          [%- ELSE %]
264           Open
265          [%- END %]
266         </td>
267        </tr>
268
269        <input type="hidden" name="delivered" value="[% HTML.escape(delivered) %]">
270
271        <tr>
272         <th align="right">Employee</th>
273         <td>
274          [%- IF delivered %]
275          <input type="hidden" name="employee_id" value="[% HTML.escape(employee_id) %]">
276          [%- FOREACH row = ALL_EMPLOYEES %]
277          [% IF row.id == employee_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
278          [%- END %]
279          [%- ELSE %]
280          <select name="employee_id">
281           [%- FOREACH row = ALL_EMPLOYEES %]
282           <option value="[% HTML.escape(row.id) %]"[% IF row.id == employee_id %] selected[% END %]>
283            [%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %]
284           </option>
285           [%- END %]
286          </select>
287          [%- END %]
288         </td>
289        </tr>
290
291        [%- IF is_customer %]
292        [%- IF salesman_id %]
293        [%- SET the_salesman_id = salesman_id %]
294        [%- ELSE %]
295        [%- SET the_salesman_id = employee_id %]
296        [%- END %]
297        <tr>
298         <th align="right">Salesman</th>
299         <td>
300          [%- IF delivered %]
301          <input type="hidden" name="salesman_id" value="[% HTML.escape(salesman_id) %]">
302          [%- FOREACH row = ALL_SALESMEN %]
303          [% IF row.id == the_salesman_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
304          [%- END %]
305          [%- ELSE %]
306          <select name="salesman_id">
307           [%- FOREACH row = ALL_SALESMEN %]
308           <option value="[% HTML.escape(row.id) %]"[% IF row.id == the_salesman_id %] selected[% END %]>
309            [%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %]
310           </option>
311           [%- END %]
312          </select>
313          [%- END %]
314         </td>
315        </tr>
316        [%- END %]
317
318        <tr>
319         <th width="70%" align="right" nowrap>Delivery Order Number</th>
320         <td><input name="donumber" size="11" value="[% HTML.escape(donumber) %]"[% RO %]></td>
321        </tr>
322
323        <tr>
324         <th width="70%" align="right" nowrap>Order Number</th>
325         <td><input name="ordnumber" size="11" value="[% HTML.escape(ordnumber) %]"[% RO %]></td>
326        </tr>
327
328        <tr>
329         <th width="70%" align="right" nowrap>Customer Order Number</th>
330         <td><input name="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"[% RO %]></td>
331        </tr>
332
333        <tr>
334         <th align="right" nowrap>Delivery Order Date</th>
335         <td nowrap>
336          <input name="transdate" id="transdate" size="11" title="[% HTML.escape(myconfig_dateformat) %]" value="[% HTML.escape(transdate) %]"
337                 onBlur="check_right_date_format(this)"[% RO %]>
338          [% UNLESS delivered %]<input type="button" name="b_transdate" id="transdate_trigger" value="?">[% END %]
339         </td>
340        </tr>
341
342        <tr>
343         <th width="70%" align="right" nowrap>Project Number</th>
344         <td>
345          [%- IF delivered %]
346          <input type="hidden" name="globalproject_id" value="[% HTML.escape(globalproject_id) %]">
347          [%- FOREACH row = ALL_PROJECTS %]
348          [% IF globalproject_id == row.id %][% HTML.escape(row.projectnumber) %][% END %]
349          [%- END %]
350          [%- ELSE %]
351          <select name="globalproject_id">
352           <option></option>
353           [%- FOREACH row = ALL_PROJECTS %]
354           <option value="[% HTML.escape(row.id) %]"[% IF globalproject_id == row.id %] selected[% END %]>[% HTML.escape(row.projectnumber) %]</option>
355           [%- END %]
356          </select>
357          [%- END %]
358         </td>
359        </tr>
360       </table>
361      </td>
362     </tr>
363    </table>