]> wagnertech.de Git - mfinanz.git/blob - templates/webpages/delivery_order/tabs/basic_data.html
date error in mapping
[mfinanz.git] / templates / webpages / delivery_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 == "customer" ? LxERP.t8('Customer') : LxERP.t8('Vendor') -%]</th>
16             [% SET cv_id = SELF.cv _ '_id' %]
17             <td>
18               [% P.customer_vendor.picker("order.${SELF.cv}" _ '_id', SELF.order.$cv_id, type=SELF.cv, style='width: 300px',
19                    show_details="1") %]
20             </td>
21           </tr>
22
23           <tr id='cp_row' [%- IF !SELF.order.${SELF.cv}.contacts.size %]style='display:none'[%- END %]>
24             <th align="right">[% 'Contact Person' | $T8 %]</th>
25             <td>[% L.select_tag('order.cp_id',
26                                 SELF.order.${SELF.cv}.contacts,
27                                 default=SELF.order.cp_id,
28                                 title_key='full_name_dep',
29                                 value_key='cp_id',
30                                 with_empty=1,
31                                 style='width: 300px') %]</td>
32           </tr>
33
34           <tr>
35             <th align="right">[% 'Shipping Address' | $T8 %]</th>
36             <td>
37               <span id='shipto_selection' [%- IF !SELF.order.${SELF.cv}.shipto.size %]style='display:none'[%- END %]>
38                 [% shiptos = [ { shipto_id => "", displayable_id => LxERP.t8("No/individual shipping address") } ] ;
39                    FOREACH s = SELF.order.${SELF.cv}.shipto ;
40                      shiptos.push(s) ;
41                    END ;
42                    L.select_tag('order.shipto_id',
43                                  shiptos,
44                                  default=SELF.order.shipto_id,
45                                  title_key='displayable_id',
46                                  value_key='shipto_id',
47                                  with_empty=0,
48                                  style='width: 300px') %]
49               </span>
50               [% L.button_tag("kivi.DeliveryOrder.edit_custom_shipto()", LxERP.t8("Custom shipto")) %]
51             </td>
52           </tr>
53
54           [%- PROCESS delivery_order/tabs/_business_info_row.html SELF=SELF %]
55
56 [%- IF SELF.all_languages.size %]
57           <tr>
58             <th align="right">[% 'Language' | $T8 %]</th>
59             <td>
60               [% L.select_tag('order.language_id', SELF.all_languages, default=SELF.order.language_id, title_key='description', with_empty=1, style='width:300px') %]
61             </td>
62           </tr>
63 [%- END %]
64
65 [%- IF SELF.all_departments.size %]
66           <tr>
67             <th align="right">[% 'Department' | $T8 %]</th>
68             <td>
69               [% L.select_tag('order.department_id', SELF.all_departments, default=SELF.order.department_id, title_key='description', with_empty=1, style='width:300px') %]
70             </td>
71           </tr>
72 [%- END %]
73
74           <tr>
75             <th align="right">[% 'Shipping Point' | $T8 %]</th>
76             <td>[% L.input_tag('order.shippingpoint', SELF.order.shippingpoint, style='width: 300px') %]</td>
77           </tr>
78
79           <tr>
80             <th align="right">[% 'Ship via' | $T8 %]</th>
81             <td>[% L.input_tag('order.shipvia', SELF.order.shipvia, style='width: 300px') %]</td>
82           </tr>
83
84           <tr>
85             <th align="right">[% 'Transaction description' | $T8 %]</th>
86             <td>[% L.input_tag('order.transaction_description', SELF.order.transaction_description, 'data-validate'=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '', style='width: 300px') %]</td>
87           </tr>
88
89           <tr>
90             <th align="right">[% 'Project Number' | $T8 %]</th>
91             <td>[% P.project.picker('order.globalproject_id', SELF.order.globalproject_id, style='width: 300px') %]</td>
92           </tr>
93
94         </table>
95       </td>
96
97       <td align="right">
98         <table>
99
100           <tr>
101             <td colspan="2" align="center" id="data-status-line">[% SELF.order.presenter.status_line %]</td>
102           </tr>
103
104           <tr>
105             <th align="right">[% 'Employee' | $T8 %]</th>
106             <td>[% L.select_tag('order.employee_id',
107               SELF.all_employees,
108               default=(SELF.order.employee_id ? SELF.order.employee_id : SELF.current_employee_id),
109               title_key='safe_name') %]</td>
110           </tr>
111
112           [% IF SELF.cv == 'customer' %]
113           <tr>
114             <th align="right">[% 'Salesman' | $T8 %]</th>
115             <td>[% L.select_tag('order.salesman_id',
116               SELF.all_salesmen,
117               default=(SELF.order.salesman_id ? SELF.order.salesman_id : SELF.current_employee_id),
118               title_key='safe_name') %]</td>
119           </tr>
120           [% END %]
121
122           <tr>
123             <th width="70%" align="right" nowrap>[% 'Delivery Order Number' | $T8 %]</th>
124             <td>[% L.input_tag('order.donumber', SELF.order.donumber, size = 11, onchange='kivi.DeliveryOrder.set_number_in_title(this)') %]</td>
125           </tr>
126
127           <tr>
128             <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
129             <td>[% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11) %]</td>
130           </tr>
131
132           [%- IF SELF.type == 'purchase_delivery_order' %]
133           <tr>
134             <th width="70%" align="right" nowrap>[% 'Order Confirmation Number' | $T8 %]</th>
135             [%-
136               numbers = [];
137               FOREACH p = SELF.order.preceding_purchase_order_confirmations();
138                 numbers.push(HTML.escape(p.ordnumber));
139               END;
140             %]
141             <td>[% numbers.join(', ') %]</td>
142           </tr>
143
144           <tr>
145             <th width="70%" align="right" nowrap>[% 'Vendor Confirmation Number' | $T8 %]</th>
146             <td>[% L.input_tag('order.vendor_confirmation_number', SELF.order.vendor_confirmation_number, size = 11) %]</td>
147           </tr>
148           [%- END %]
149
150           <tr>
151             <th width="70%" align="right" nowrap>[% IF SELF.type_data.properties('is_customer') %][% 'Customer Order Number' | $T8 %][% ELSE %][% 'Vendor Order Number' | $T8 %][% END %]</th>
152             <td>[% L.input_tag('order.cusordnumber', SELF.order.cusordnumber, size = 11) %]</td>
153           </tr>
154
155           <tr>
156             <th width="70%" align="right" nowrap>[% 'Delivery Order Date' | $T8 %]</th>
157             <td>[% L.date_tag('order.transdate_as_date', SELF.order.transdate_as_date) %]</td>
158           </tr>
159
160           <tr>
161             <th width="70%" align="right" nowrap>[% 'Reqdate' | $T8 %]</th>
162             <td>[% L.date_tag('order.reqdate_as_date', SELF.order.reqdate_as_date, class=reqdate_class) %]</td>
163           </tr>
164
165           <tr>
166             <th width="70%" align="right" nowrap>[% 'Insert Date' | $T8 %]</th>
167             <td>[% SELF.order.itime_as_date %]</td>
168           </tr>
169         </table>
170
171       </td>
172     </tr>
173   </table>
174
175   [%- PROCESS delivery_order/tabs/_item_input.html SELF=SELF %]
176
177   [% L.button_tag('kivi.DeliveryOrder.open_multi_items_dialog()', LxERP.t8('Add multiple items')) %]
178
179   <table width="100%">
180     <tr>
181       <td>
182         [%- IF SELF.positions_scrollbar_height -%]
183           [%- SET scroll_style = 'style="overflow-y: auto; height:' _ SELF.positions_scrollbar_height _ 'vh;"' -%]
184         [%- ELSE -%]
185           [%- SET scroll_style = '' -%]
186         [%- END -%]
187         <div id="row_table_scroll_id" [%- scroll_style -%]>
188           <table id="row_table_id" width="100%">
189             <thead>
190               <tr class="listheading">
191                 <th class="listheading" style='text-align:center' nowrap width="1">
192                   [%- IF MYCONFIG.show_form_details %]
193                     [%- 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") %]
194                   [%- ELSE %]
195                     [%- L.img_tag(src="image/expand.svg", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all') %]
196                   [%- END %]
197                 </th>
198                 <th class="listheading" nowrap width="3" >[%- 'position'     | $T8 %] </th>
199                 <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
200                 <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
201                 [%- IF SELF.show_update_button -%]
202                 <th class="listheading" style='text-align:center' nowrap width="1">
203                   [%- L.img_tag(src="image/rotate_cw.svg",
204                                 alt=LxERP.t8('Update from master data'),
205                                 title= LxERP.t8('Update from master data'),
206                                 onclick="if (!confirm('" _ LxERP.t8("Are you sure to update all positions from master data?") _ "')) return false; kivi.DeliveryOrder.update_all_rows_from_master_data();",
207                                 id='update_from_master') %]
208                 </th>
209                 [%- END %]
210                 <th id="partnumber_header_id"   class="listheading" nowrap width="15"><a href='#' onClick='javascript:kivi.DeliveryOrder.reorder_items("partnumber")'> [%- 'Partnumber'  | $T8 %]</a></th>
211                 [%- IF SELF.search_cvpartnumber -%]
212                 <th id="cvpartnumber_header_id" class="listheading" nowrap width="15"><a href='#' onClick='javascript:kivi.DeliveryOrder.reorder_items("cvpartnumber")' > [%- SELF.cv == "customer" ? LxERP.t8('Customer Part Number') : LxERP.t8('Model') %]</a></th>
213                 [%- END -%]
214                 <th id="partclass_header_id"    class="listheading" nowrap width="2">[%- 'Type'  | $T8 %]</th>
215                 <th id="description_header_id"  class="listheading" nowrap           ><a href='#' onClick='javascript:kivi.DeliveryOrder.reorder_items("description")'>[%- 'Description' | $T8 %]</a></th>
216                 [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
217                 <th id="shipped_qty_header_id"  class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.DeliveryOrder.reorder_items("shipped_qty")'>[%- 'Delivered'   | $T8 %]</a></th>
218                 [%- END -%]
219                 <th id="qty_header_id"          class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.DeliveryOrder.reorder_items("qty")'>        [%- 'Qty'         | $T8 %]</a></th>
220                 <th class="listheading" nowrap width="5" >[%- 'Unit'         | $T8 %] </th>
221                 [% IF in_out == 'in' %]
222                 <th class="listheading" nowrap width="5" >[%- 'Transfer To Stock' | $T8 %] </th>
223                 [% END %]
224                 [% IF in_out == 'out' %]
225                 <th class="listheading" nowrap width="5" >[%- 'Release From Stock' | $T8 %] </th>
226                 [% END %]
227               </tr>
228             </thead>
229
230             [%- FOREACH item = SELF.order.items_sorted %]
231               [%- PROCESS delivery_order/tabs/_row.html ITEM=item ID=(item.id||item.new_fake_id)  -%]
232             [%- END %]
233
234           </table>
235         </div>
236
237       </td>
238     </tr>
239
240     <tr>
241     </tr>
242
243     <tr>
244       <td colspan="100%" width="100%">
245         <table width="100%">
246           <tr>
247             <td>
248               <table>
249                 <tr>
250                   <th align="left">[% 'Notes' | $T8 %]</th>
251                   <th align="left">[% 'Internal Notes' | $T8 %]</th>
252                 </tr>
253                 <tr valign="top">
254                   <td>
255                     [% L.textarea_tag('order.notes', SELF.order.notes, wrap="soft", style="width: 350px; height: 150px", class="texteditor") %]
256                   </td>
257                   <td>
258                     [% L.textarea_tag('order.intnotes', SELF.order.intnotes, wrap="soft", style="width: 350px; height: 150px") %]
259                   </td>
260                 </tr>
261               </table>
262             </td>
263
264             <td>
265               <table>
266                 <tr>
267                   <th align="right">[% 'Payment Terms' | $T8 %]</th>
268                   <td>[% L.select_tag('order.payment_id',
269                                       SELF.all_payment_terms,
270                                       default = SELF.order.payment_id,
271                                       with_empty = 1,
272                                       title_key = 'description',
273                                       style = 'width: 250px') %]</td>
274                 </tr>
275                 <tr>
276                   <th align="right">[% 'Delivery Terms' | $T8 %]</th>
277                   <td>[% L.select_tag('order.delivery_term_id',
278                                       SELF.all_delivery_terms,
279                                       default = SELF.order.delivery_term_id,
280                                       with_empty = 1,
281                                       title_key = 'description',
282                                       style = 'width: 250px') %]</td>
283                 </tr>
284               </table>
285             </td>
286
287           </tr>
288         </table>
289       </td>
290     </tr>
291
292   </table>
293
294   [% L.hidden_tag('order.currency_id', SELF.order.currency_id) %]
295   [% L.hidden_tag('order.taxzone_id', SELF.order.taxzone_id) %]
296   [% L.hidden_tag('order.taxincluded', SELF.order.taxincluded) %]
297
298 </div>
299
300 [% L.sortable_element('#row_table_id') %]