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