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