Auftrags-Controller: Anzeige mit Infos über den Kunden-/Lieferantentyp
[kivitendo-erp.git] / templates / webpages / order / tabs / basic_data.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5 [%- USE P %]
6
7 [%- INCLUDE 'generic/set_longdescription.html' %]
8
9 <div id="ui-tabs-basic-data">
10   <table width="100%">
11     <tr valign="top">
12       <td>
13         <table width="100%">
14           <tr>
15             <th align="right">[% SELF.cv | $T8 %]</th>
16             [% SET cv_id = SELF.cv _ '_id' %]
17             <td>[% P.customer_vendor.picker("order.${SELF.cv}" _ '_id', SELF.order.$cv_id, type=SELF.cv, style='width: 300px') %]</td>
18           </tr>
19
20           <tr id='cp_row' [%- IF !SELF.order.${SELF.cv}.contacts.size %]style='display:none'[%- END %]>
21             <th align="right">[% 'Contact Person' | $T8 %]</th>
22             <td>[% L.select_tag('order.cp_id',
23                                 SELF.order.${SELF.cv}.contacts,
24                                 default=SELF.order.cp_id,
25                                 title_key='full_name_dep',
26                                 value_key='cp_id',
27                                 with_empty=1,
28                                 style='width: 300px') %]</td>
29           </tr>
30
31           <tr id='shipto_row' [%- IF !SELF.order.${SELF.cv}.shipto.size %]style='display:none'[%- END %]>
32             <th align="right">[% 'Shipping Address' | $T8 %]</th>
33             <td>[% L.select_tag('order.shipto_id',
34                                 SELF.order.${SELF.cv}.shipto,
35                                 default=SELF.order.shipto_id,
36                                 title_key='displayable_id',
37                                 value_key='shipto_id',
38                                 with_empty=1,
39                                 style='width: 300px') %]</td>
40           </tr>
41
42           [%- PROCESS order/tabs/_business_info_row.html SELF=SELF %]
43
44           <tr>
45             <th align="right">[% 'Steuersatz' | $T8 %]</th>
46             <td>[% L.select_tag('order.taxzone_id', SELF.all_taxzones, default=SELF.order.taxzone_id, title_key='description', style='width: 300px', class='recalc') %]</td>
47           </tr>
48
49 [%- IF SELF.all_departments.size %]
50           <tr>
51             <th align="right">[% 'Department' | $T8 %]</th>
52             <td>
53               [% L.select_tag('order.department_id', SELF.all_departments, default=SELF.order.department_id, title_key='description', with_empty=1, style='width:300px') %]
54             </td>
55           </tr>
56 [%- END %]
57
58           <tr>
59             <th align="right">[% 'Shipping Point' | $T8 %]</th>
60             <td>[% L.input_tag('order.shippingpoint', SELF.order.shippingpoint, style='width: 300px') %]</td>
61           </tr>
62
63           <tr>
64             <th align="right">[% 'Ship via' | $T8 %]</th>
65             <td>[% L.input_tag('order.shipvia', SELF.order.shipvia, style='width: 300px') %]</td>
66           </tr>
67
68           <tr>
69             <th align="right">[% 'Transaction description' | $T8 %]</th>
70             <td>[% L.input_tag('order.transaction_description', SELF.order.transaction_description, style='width: 300px') %]</td>
71           </tr>
72
73           <tr>
74             <th align="right">[% 'Project Number' | $T8 %]</th>
75             <td>[% P.project.picker('order.globalproject_id', SELF.order.globalproject_id, style='width: 300px') %]</td>
76           </tr>
77
78         </table>
79       </td>
80
81       <td align="right">
82         <table>
83
84           <tr>
85             <td colspan="2" align="center">
86               [%- IF SELF.order.id %]
87                 <label for="order.delivered">[% 'Delivery Order(s) for full qty created' | $T8 %]</label>
88                 [% L.yes_no_tag('order.delivered', SELF.order.delivered) %]
89                 <label for="order.closed">[% 'Closed' | $T8 %]</label>
90                 [% L.yes_no_tag('order.closed', SELF.order.closed) %]
91               [%- END %]
92             </td>
93           </tr>
94
95           <tr>
96             <th align="right">[% 'Employee' | $T8 %]</th>
97             <td>[% L.select_tag('order.employee_id',
98               SELF.all_employees,
99               default=(SELF.order.employee_id ? SELF.order.employee_id : SELF.current_employee_id),
100               title_key='safe_name') %]</td>
101           </tr>
102
103           [% IF SELF.cv == 'customer' %]
104           <tr>
105             <th align="right">[% 'Salesman' | $T8 %]</th>
106             <td>[% L.select_tag('order.salesman_id',
107               SELF.all_salesmen,
108               default=(SELF.order.salesman_id ? SELF.order.salesman_id : SELF.current_employee_id),
109               title_key='safe_name') %]</td>
110           </tr>
111           [% END %]
112
113           [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
114           <tr>
115             <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
116             <td>[% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]</td>
117           </tr>
118           [%- END -%]
119
120           [%- IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
121             [%- SET quo_nr_txt = 'Quotation Number' -%]
122           [%- ELSE -%]
123             [%- SET quo_nr_txt = 'RFQ Number' -%]
124           [%- END -%]
125           <tr>
126             <th width="70%" align="right" nowrap>[% quo_nr_txt | $T8 %]</th>
127             [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
128               <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11) %]</td>
129             [%- ELSE -%]
130               <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]</td>
131             [%- END -%]
132           </tr>
133
134           [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
135           <tr>
136             <th width="70%" align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
137             <td>[% L.input_tag('order.cusordnumber', SELF.order.cusordnumber, size = 11) %]</td>
138           </tr>
139           [%- END -%]
140
141           [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
142             [%- SET transdate_txt = 'Order Date' -%]
143           [%- ELSIF SELF.type == "sales_quotation" -%]
144             [%- SET transdate_txt = 'Quotation Date' -%]
145           [%- ELSE -%]
146             [%- SET transdate_txt = 'RFQ Date' -%]
147           [%- END -%]
148           <tr>
149             <th width="70%" align="right" nowrap>[% transdate_txt | $T8 %]</th>
150             <td>[% L.date_tag('order.transdate', SELF.order.transdate) %]</td>
151           </tr>
152
153           [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
154             [%- SET reqdate_txt = 'Reqdate' -%]
155           [%- ELSIF SELF.type == "sales_quotation" -%]
156             [%- SET reqdate_txt = 'Valid until' -%]
157           [%- ELSE -%]
158             [%- SET reqdate_txt = 'Required by' -%]
159           [%- END -%]
160           <tr>
161             <th width="70%" align="right" nowrap>[% reqdate_txt | $T8 %]</th>
162             <td>[% L.date_tag('order.reqdate', SELF.order.reqdate) %]</td>
163           </tr>
164
165           [%- IF SELF.type == "sales_quotation" -%]
166           <tr>
167             <th width="70%" align="right" nowrap>[% 'Order probability' | $T8 %]</th>
168             <td>[%- L.select_tag('order.order_probability', SELF.order_probabilities, title='title', default=SELF.order.order_probability) %]%</td>
169           </tr>
170           <tr>
171             <th width="70%" align="right" nowrap>[% 'Expected billing date' | $T8 %]</th>
172             <td>[%- L.date_tag('order.expected_billing_date', SELF.order.expected_billing_date) %]</td>
173           </tr>
174           [%- END %]
175
176           <tr>
177             <th width="70%" align="right" nowrap>[% 'Insert Date' | $T8 %]</th>
178             <td>[% SELF.order.itime_as_date %]</td>
179           </tr>
180
181         </table>
182
183       </td>
184     </tr>
185   </table>
186
187   [%- PROCESS order/tabs/_item_input.html %]
188
189   [% L.button_tag('kivi.Order.show_multi_items_dialog()', LxERP.t8('Add multiple items')) %]
190
191   <table width="100%">
192     <tr>
193       <td>
194
195         <div id="row_table_scroll_id" style="overflow-y: auto; height: 25vh">
196           <table id="row_table_id" width="100%">
197             <thead>
198               <tr class="listheading">
199                 <th class="listheading" style='text-align:center' nowrap width="1">
200                   [%- IF MYCONFIG.show_form_details %]
201                     [%- L.img_tag(src="image/collapse.svg", alt=LxERP.t8('Hide all details'), title=LxERP.t8('Hide all details'), id='expand_all', "data-expanded"="1") %]
202                   [%- ELSE %]
203                     [%- L.img_tag(src="image/expand.svg", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all') %]
204                   [%- END %]
205                 </th>
206                 <th class="listheading" nowrap width="3" >[%- 'position'     | $T8 %] </th>
207                 <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
208                 <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
209                 <th id="partnumber_header_id"  class="listheading" nowrap width="15"><a href='#' onClick='javascript:kivi.Order.reorder_items("partnumber")'> [%- 'Partnumber'  | $T8 %]</a></th>
210                 <th id="partclass_header_id"   class="listheading" nowrap width="2">[%- 'Type'  | $T8 %]</th>
211                 <th id="description_header_id" class="listheading" nowrap           ><a href='#' onClick='javascript:kivi.Order.reorder_items("description")'>[%- 'Description' | $T8 %]</a></th>
212                 <th id="qty_header_id"         class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.Order.reorder_items("qty")'>        [%- 'Qty'         | $T8 %]</a></th>
213                 <th class="listheading" nowrap width="5" >[%- 'Price Factor' | $T8 %] </th>
214                 <th class="listheading" nowrap width="5" >[%- 'Unit'         | $T8 %] </th>
215                 <th class="listheading" nowrap width="5" >[%- 'Price Source' | $T8 %] </th>
216                 <th id="sellprice_header_id"   class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.Order.reorder_items("sellprice")'> [%- 'Price'       | $T8 %]</a></th>
217                 <th id="discount_header_id"    class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.Order.reorder_items("discount")'>  [%- 'Discount'    | $T8 %]</a></th>
218                 <th class="listheading" nowrap width="10">[%- 'Extended'     | $T8 %] </th>
219               </tr>
220             </thead>
221
222             [%- FOREACH item = SELF.order.items_sorted %]
223               [%- PROCESS order/tabs/_row.html ITEM=item ID=item.id TYPE=SELF.type ALL_PRICE_FACTORS=SELF.all_price_factors %]
224             [%- END %]
225
226           </table>
227         </div>
228
229       </td>
230     </tr>
231
232     <tr>
233     </tr>
234
235     <tr>
236       <td colspan="100%" width="100%">
237         <table width="100%">
238           <tr>
239             <td>
240               <table>
241                 <tr>
242                   <th align="left">[% 'Notes' | $T8 %]</th>
243                   <th align="left">[% 'Internal Notes' | $T8 %]</th>
244                 </tr>
245                 <tr valign="top">
246                   <td>
247                     [% L.textarea_tag('order.notes', SELF.order.notes, wrap="soft", style="width: 350px; height: 150px", class="texteditor") %]
248                   </td>
249                   <td>
250                     [% L.textarea_tag('order.intnotes', SELF.order.intnotes, wrap="soft", style="width: 350px; height: 150px") %]
251                   </td>
252                 </tr>
253               </table>
254             </td>
255
256             <td>
257               <table>
258                 <tr>
259                   <th align="right">[% 'Payment Terms' | $T8 %]</th>
260                   <td>[% L.select_tag('order.payment_id',
261                                       SELF.all_payment_terms,
262                                       default = SELF.order.payment_id,
263                                       with_empty = 1,
264                                       title_key = 'description',
265                                       style = 'width: 250px') %]</td>
266                 </tr>
267                 <tr>
268                   <th align="right">[% 'Delivery Terms' | $T8 %]</th>
269                   <td>[% L.select_tag('order.delivery_term_id',
270                                       SELF.all_delivery_terms,
271                                       default = SELF.order.delivery_term_id,
272                                       with_empty = 1,
273                                       title_key = 'description',
274                                       style = 'width: 250px') %]</td>
275                 </tr>
276                 [%- IF SELF.type == "sales_order" %]
277                 <tr>
278                   <th align="right">[%- 'Periodic Invoices' | $T8 %]</th>
279                   <td>[% L.button_tag('kivi.Order.show_periodic_invoices_config_dialog()', LxERP.t8('Configure')) %]
280                     (<span id='periodic_invoices_status'>[%- SELF.periodic_invoices_status -%]</span>)
281                     <a href="doc/html/ch03.html#features.periodic-invoices.variables" target="_blank">?</a>
282                   </td>
283                 </tr>
284                 [%- END %]
285               </table>
286             </td>
287
288             <td align="right">
289               <table>
290                 <tr id="taxincluded_row_id" [%- IF !SELF.taxes.size %]style="display:none"[%- END %]>
291                   <td align=right colspan="2">
292                     <label for="order.taxincluded"><b>[% 'Tax Included' | $T8 %]</b></label>
293                     [% L.yes_no_tag('order.taxincluded', SELF.order.taxincluded, class='recalc') %]
294                   </td>
295                 </tr>
296
297                 <tr id="subtotal_row_id" [%- IF SELF.order.taxincluded %]style="display:none"[%- END %]>
298                   <th align="right">[%- 'Subtotal' | $T8 %]</th>
299                   <td align="right">
300                     [%- L.div_tag(SELF.order.netamount_as_number, id='netamount_id') %]
301                   </td>
302                 </tr>
303                 [%- FOREACH tax = SELF.taxes %]
304                   [%- PROCESS order/tabs/_tax_row.html TAX=tax TAXINCLUDED=SELF.order.taxincluded %]
305                 [%- END %]
306                 <tr id="amount_row_id">
307                   <th align="right">[%- 'Total' | $T8 %]</th>
308                   <td align="right">
309                     [%- L.div_tag(SELF.order.amount_as_number, id='amount_id') %]
310                   </td>
311                 </tr>
312               </table>
313             </td>
314
315           </tr>
316         </table>
317       </td>
318     </tr>
319
320   </table>
321
322 </div>
323
324 [% L.sortable_element('#row_table_id') %]