Dateimanagement: Integration in Masken und Controller
[kivitendo-erp.git] / templates / webpages / do / form_header.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %][%- USE P -%]
5 <h1>[% title %]</h1>
6
7  <script type="text/javascript" src="js/show_form_details.js"></script>
8  <script type="text/javascript" src="js/show_history.js"></script>
9  <script type="text/javascript" src="js/show_vc_details.js"></script>
10  <script type="text/javascript" src="js/delivery_customer_selection.js"></script>
11  <script type="text/javascript" src="js/calculate_qty.js"></script>
12  <script type="text/javascript" src="js/stock_in_out.js"></script>
13  <script type="text/javascript" src="js/follow_up.js"></script>
14  <script type="text/javascript" src="js/kivi.SalesPurchase.js"></script>
15
16  <style type="text/css">
17   .fixed_width {
18     width: 250px;
19   }
20  </style>
21
22  [%- IF vc == 'customer' %]
23  [%- SET is_customer = '1' %]
24  [%- ELSE %]
25  [%- SET vc = 'vendor' %]
26  [%- SET is_customer = '0' %]
27  [%- END %]
28  [%- SET vc_id = vc _ "_id" %]
29  [%- IF delivered %]
30  [%- SET DISABLED = ' disabled' %]
31  [%- END %]
32
33 [%- INCLUDE 'common/flash.html' %]
34 [%- INCLUDE 'generic/set_longdescription.html' %]
35
36  [%- IF ERRORS && ERRORS.size %]
37  <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
38  [%- END %]
39
40  <form method="post" name="do" action="do.pl">
41
42  <div id="do_tabs" class="tabwidget">
43   <ul>
44    <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
45 [%- IF INSTANCE_CONF.get_webdav %]
46    <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
47 [%- END %]
48 [%- IF id AND INSTANCE_CONF.get_doc_storage %]
49       <li><a href="controller.pl?action=File/list&file_type=document&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
50       <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
51 [%- END %]
52 [%- IF id AND AUTH.assert('record_links', 1) %]
53    <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=DeliveryOrder&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
54 [%- END %]
55   </ul>
56
57   <div id="ui-tabs-basic-data">
58
59   <input type="hidden" name="follow_up_trans_id_1" value="[% HTML.escape(id) %]">
60   <input type="hidden" name="follow_up_trans_type_1" value="[% HTML.escape(type) %]">
61   <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
62   <input type="hidden" name="follow_up_rowcount" value="1">
63
64
65   <input type="hidden" name="action" value="[% HTML.escape(action) %]">
66   <input type="hidden" name="bcc" value="[% HTML.escape(bcc) %]">
67   <input type="hidden" name="business" value="[% HTML.escape(business) %]">
68   <input type="hidden" name="cc" value="[% HTML.escape(cc) %]">
69   <input type="hidden" name="closed" value="[% HTML.escape(closed) %]">
70   <input type="hidden" name="convert_from_oe_ids" value="[% HTML.escape(convert_from_oe_ids) %]">
71   <input type="hidden" name="currency" value="[% HTML.escape(currency) %]">
72   <input type="hidden" name="customer_pricegroup_id" value="[% HTML.escape(customer_pricegroup_id) %]">
73   <input type="hidden" name="discount" value="[% HTML.escape(discount) %]">
74   <input type="hidden" name="dunning_amount" value="[% HTML.escape(dunning_amount) %]">
75   <input type="hidden" name="email" value="[% HTML.escape(email) %]">
76   <input type="hidden" name="emailed" value="[% HTML.escape(emailed) %]">
77   <input type="hidden" name="format" value="[% HTML.escape(format) %]">
78   <input type="hidden" name="formname" value="[% HTML.escape(formname) %]">
79   <input type="hidden" name="id" value="[% HTML.escape(id) %]">
80   <input type="hidden" name="max_dunning_level" value="[% HTML.escape(max_dunning_level) %]">
81   <input type="hidden" name="media" value="[% HTML.escape(media) %]">
82   <input type="hidden" name="message" value="[% HTML.escape(message) %]">
83   <input type="hidden" name="printed" value="[% HTML.escape(printed) %]">
84   <input type="hidden" name="proforma" value="[% HTML.escape(proforma) %]">
85   <input type="hidden" name="queued" value="[% HTML.escape(queued) %]">
86   <input type="hidden" name="saved_donumber" value="[% HTML.escape(saved_donumber) %]">
87   <input type="hidden" name="shiptocity" value="[% HTML.escape(shiptocity) %]">
88   <input type="hidden" name="shiptocontact" value="[% HTML.escape(shiptocontact) %]">
89   <input type="hidden" name="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]">
90   <input type="hidden" name="shiptocountry" value="[% HTML.escape(shiptocountry) %]">
91   <input type="hidden" name="shiptogln" value="[% HTML.escape(shiptogln) %]">
92   <input type="hidden" name="shiptodepartment_1" value="[% HTML.escape(shiptodepartment_1) %]">
93   <input type="hidden" name="shiptodepartment_2" value="[% HTML.escape(shiptodepartment_2) %]">
94   <input type="hidden" name="shiptoemail" value="[% HTML.escape(shiptoemail) %]">
95   <input type="hidden" name="shiptofax" value="[% HTML.escape(shiptofax) %]">
96   <input type="hidden" name="shiptoname" value="[% HTML.escape(shiptoname) %]">
97   <input type="hidden" name="shiptophone" value="[% HTML.escape(shiptophone) %]">
98   <input type="hidden" name="shiptostreet" value="[% HTML.escape(shiptostreet) %]">
99   <input type="hidden" name="shiptozipcode" value="[% HTML.escape(shiptozipcode) %]">
100   <input type="hidden" name="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]">
101   <input type="hidden" name="show_details" value="[% HTML.escape(show_details) %]">
102   <input type="hidden" name="subject" value="[% HTML.escape(subject) %]">
103   <input type="hidden" name="taxincluded" value="[% HTML.escape(taxincluded) %]">
104   <input type="hidden" name="taxzone_id" value="[% HTML.escape(taxzone_id) %]">
105   <input type="hidden" name="title" value="[% HTML.escape(title) %]">
106   <input type="hidden" name="type" value="[% HTML.escape(type) %]">
107   <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
108   <input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
109 [%- FOREACH row = HIDDENS %]
110    [% L.hidden_tag(row.name, row.value) %]
111 [%- END %]
112
113   <p>
114    <table width="100%">
115     <tr valign="top">
116      <td>
117       <table width="100%">
118        <tr>
119         <th align="right">[% IF is_customer %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</th>
120         <td>
121          [% IF RO %]
122           [% P.hidden_tag(vc_id, $vc_id) %]
123           [% HTML.escape(VC_OBJ.name) %]
124          [% ELSE %]
125           [% P.customer_vendor_picker(vc_id, $vc_id, type=vc, class="fixed_width") %]
126          [% END %]
127          [% P.hidden_tag("previous_" _ vc_id, $vc_id) %]
128          [% P.button_tag("show_vc_details('" _ HTML.escape(vc) _ "')", LxERP.t8("Details (one letter abbreviation)")) %]
129         </td>
130
131         [%- IF ALL_CONTACTS.size %]
132         <tr>
133          <th align="right">[% 'Contact Person' | $T8 %]</th>
134          <td>
135           [%- IF delivered %]
136           <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
137           [%- IF cp_id == row.cp_id %]
138           [%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%]
139           [%- END %]
140           [%- ELSE %]
141             [% L.select_tag('cp_id', ALL_CONTACTS, default = cp_id, value_key = 'cp_id', title_key = 'full_name_dep', with_empty = 1, style='width: 250px') %]
142           [%- END %]
143          </td>
144         </tr>
145         [%- END %]
146
147         [%- IF ALL_SHIPTO.size %]
148         <tr>
149          <th align="right">[% 'Shipping Address' | $T8 %]</th>
150          <td>
151           [%- IF delivered %]
152           <input type="hidden" name="shipto_id" value="[% HTML.escape(shipto_id) %]">
153           [%- FOREACH row = ALL_SHIPTO %]
154           [%- IF shipto_id == row.shipto_id %]
155           [%- HTML.escape(row.shiptoname) -%]
156           [%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%]
157           [%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%]
158           [%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%]
159           [%- END %]
160           [%- END %]
161
162           [%- ELSE %]
163             [% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ;
164                L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', style='width: 250px') %]
165           [%- END %]
166          </td>
167         </tr>
168         [%- END %]
169
170         [%- IF business %]
171         <tr>
172          <th align="right">[% IF is_customer %][% 'Customer type' | $T8 %][% ELSE %][% 'Vendor type' | $T8 %][% END %]</th>
173          <td>[% HTML.escape(business) %]</td>
174         </tr>
175         [%- END %]
176
177         [%- IF max_dunning_level %]
178         <tr>
179          <th align="right">[% 'Max. Dunning Level' | $T8 %]</th>
180          <td>
181           <b>[% HTML.escape(max_dunning_level) %]</b>; [% 'Dunning Amount' | $T8 %]:
182           <b>[% HTML.escape(LxERP.format_amount(dunning_amount, 2)) %]</b>
183          </td>
184         </tr>
185         [%- END %]
186        </tr>
187
188        [%- IF ALL_DEPARTMENTS.size %]
189        <tr>
190         <th align="right" nowrap>[% 'Department' | $T8 %]</th>
191         <td colspan="3">
192           [% IF ( delivered ) %]
193             [% L.hidden_tag('department_id', department_id) %]
194           [% ELSE %]
195             [% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, style = 'width: 250px', disabled = delivered )%]
196           [% END %]
197        </td>
198        </tr>
199        [%- END %]
200
201        <tr>
202         <th align="right">[% 'Shipping Point' | $T8 %]</th>
203         <td colspan="3"><input name="shippingpoint" size="35" value="[% HTML.escape(shippingpoint) %]"[% RO %]></td>
204        </tr>
205
206        <tr>
207         <th align="right">[% 'Ship via' | $T8 %]</th>
208         <td colspan="3"><input name="shipvia" size="35" value="[% HTML.escape(shipvia) %]"[% RO %]></td>
209        </tr>
210
211        <tr>
212         <th align="right">[% 'Transaction description' | $T8 %]</th>
213         <td colspan="3"><input name="transaction_description" id="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"[% RO %]></td>
214        </tr>
215
216       </table>
217      </td>
218
219      <td align="right">
220       <table>
221
222        <tr>
223         <td colspan="2" align="center">
224          [%- IF delivered %]
225           [%- IF is_customer %]
226           [% 'transferred out' | $T8 %]
227           [%- ELSE %]
228           [% 'transferred in' | $T8 %]
229           [%- END %]
230          [%- ELSE %]
231           [%- IF is_customer %]
232           [% 'not transferred out yet' | $T8 %]
233           [%- ELSE %]
234           [% 'not transferred in yet' | $T8 %]
235           [%- END %]
236          [%- END %]
237          ;
238          [%- IF closed %]
239           [% 'Closed' | $T8 %]
240          [%- ELSE %]
241           [% 'Open' | $T8 %]
242          [%- END %]
243         </td>
244        </tr>
245
246        <input type="hidden" name="delivered" value="[% HTML.escape(delivered) %]">
247
248        <tr>
249         <th align="right">[% 'Employee' | $T8 %]</th>
250         <td>
251          [%- IF delivered %]
252          <input type="hidden" name="employee_id" value="[% HTML.escape(employee_id) %]">
253          [%- FOREACH row = ALL_EMPLOYEES %]
254          [% IF row.id == employee_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
255          [%- END %]
256          [%- ELSE %]
257            [% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %]
258          [%- END %]
259         </td>
260        </tr>
261
262        [%- IF is_customer %]
263        [%- IF salesman_id %]
264        [%- SET the_salesman_id = salesman_id %]
265        [%- ELSE %]
266        [%- SET the_salesman_id = employee_id %]
267        [%- END %]
268        <tr>
269         <th align="right">[% 'Salesman' | $T8 %]</th>
270         <td>
271          [%- IF delivered %]
272          <input type="hidden" name="salesman_id" value="[% HTML.escape(salesman_id) %]">
273          [%- FOREACH row = ALL_SALESMEN %]
274          [% IF row.id == the_salesman_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
275          [%- END %]
276          [%- ELSE %]
277           [% L.select_tag('salesman_id', ALL_SALESMEN, default = (salesman_id ? salesman_id : employee_id), title_key = 'safe_name') %]
278          [%- END %]
279         </td>
280        </tr>
281        [%- END %]
282
283        <tr>
284         <th width="70%" align="right" nowrap>[% 'Delivery Order Number' | $T8 %]</th>
285         <td><input name="donumber" size="11" value="[% HTML.escape(donumber) %]"[% RO %]></td>
286        </tr>
287
288        <tr>
289         <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
290         <td><input name="ordnumber" size="11" value="[% HTML.escape(ordnumber) %]"[% RO %]></td>
291        </tr>
292
293        <tr>
294         <th width="70%" align="right" nowrap>[% IF is_customer %][% 'Customer Order Number' | $T8 %][% ELSE %][% 'Vendor Order Number' | $T8 %][% END %]</th>
295         <td><input name="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"[% RO %]></td>
296        </tr>
297
298        <tr>
299         <th align="right" nowrap>[% 'Delivery Order Date' | $T8 %]</th>
300         <td nowrap>
301          [% L.date_tag('transdate', transdate, readonly => delivered) %]
302         </td>
303        </tr>
304
305        <tr>
306         <th align="right" nowrap>[% 'Reqdate' | $T8 %]</th>
307         <td nowrap>
308          [% L.date_tag('reqdate', reqdate, readonly => delivered) %]
309         </td>
310        </tr>
311
312        [%- IF is_customer %]
313        <tr>
314         <th align="right" nowrap>[% 'Insert Date' | $T8 %]</th>
315         <td>[% insertdate %]</td>
316        </tr>
317        [%- END %]
318
319        <tr>
320         <th width="70%" align="right" nowrap>[% 'Project Number' | $T8 %]</th>
321         <td>
322          [%- IF delivered %]
323          <input type="hidden" name="globalproject_id" value="[% HTML.escape(globalproject_id) %]">
324          [%- FOREACH row = ALL_PROJECTS %]
325          [% IF globalproject_id == row.id %][% HTML.escape(row.projectnumber) %][% END %]
326          [%- END %]
327          [%- ELSE %]
328          <select name="globalproject_id">
329           <option></option>
330           [%- FOREACH row = ALL_PROJECTS %]
331           <option value="[% HTML.escape(row.id) %]"[% IF globalproject_id == row.id %] selected[% END %]>[% HTML.escape(row.projectnumber) %]</option>
332           [%- END %]
333          </select>
334          [%- END %]
335         </td>
336        </tr>
337       </table>
338      </td>
339     </tr>
340    </table>