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