7 [%- INCLUDE 'generic/set_longdescription.html' %]
 
   9 <div id="ui-tabs-basic-data">
 
  15             <th align="right">[%- SELF.cv == "customer" ? LxERP.t8('Customer') : LxERP.t8('Vendor') -%]</th>
 
  16             [% SET cv_id = SELF.cv _ '_id' %]
 
  18               [% P.customer_vendor.picker("order.${SELF.cv}" _ '_id', SELF.order.$cv_id, type=SELF.cv, style='width: 300px') %]
 
  19               [% P.button_tag("kivi.DeliveryOrder.show_vc_details_dialog()", LxERP.t8("Details (one letter abbreviation)")) %]
 
  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',
 
  31                                 style='width: 300px') %]</td>
 
  35             <th align="right">[% 'Shipping Address' | $T8 %]</th>
 
  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 ;
 
  42                    L.select_tag('order.shipto_id',
 
  44                                  default=SELF.order.shipto_id,
 
  45                                  title_key='displayable_id',
 
  46                                  value_key='shipto_id',
 
  48                                  style='width: 300px') %]
 
  50               [% L.button_tag("kivi.DeliveryOrder.edit_custom_shipto()", LxERP.t8("Custom shipto")) %]
 
  54           [%- PROCESS delivery_order/tabs/_business_info_row.html SELF=SELF %]
 
  56 [%- IF SELF.all_languages.size %]
 
  58             <th align="right">[% 'Language' | $T8 %]</th>
 
  60               [% L.select_tag('order.language_id', SELF.all_languages, default=SELF.order.language_id, title_key='description', with_empty=1, style='width:300px') %]
 
  65 [%- IF SELF.all_departments.size %]
 
  67             <th align="right">[% 'Department' | $T8 %]</th>
 
  69               [% L.select_tag('order.department_id', SELF.all_departments, default=SELF.order.department_id, title_key='description', with_empty=1, style='width:300px') %]
 
  75             <th align="right">[% 'Shipping Point' | $T8 %]</th>
 
  76             <td>[% L.input_tag('order.shippingpoint', SELF.order.shippingpoint, style='width: 300px') %]</td>
 
  80             <th align="right">[% 'Ship via' | $T8 %]</th>
 
  81             <td>[% L.input_tag('order.shipvia', SELF.order.shipvia, style='width: 300px') %]</td>
 
  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>
 
  90             <th align="right">[% 'Project Number' | $T8 %]</th>
 
  91             <td>[% P.project.picker('order.globalproject_id', SELF.order.globalproject_id, style='width: 300px') %]</td>
 
 101             <td colspan="2" align="center" id="data-status-line">[% SELF.order.presenter.status_line %]</td>
 
 105             <th align="right">[% 'Employee' | $T8 %]</th>
 
 106             <td>[% L.select_tag('order.employee_id',
 
 108               default=(SELF.order.employee_id ? SELF.order.employee_id : SELF.current_employee_id),
 
 109               title_key='safe_name') %]</td>
 
 112           [% IF SELF.cv == 'customer' %]
 
 114             <th align="right">[% 'Salesman' | $T8 %]</th>
 
 115             <td>[% L.select_tag('order.salesman_id',
 
 117               default=(SELF.order.salesman_id ? SELF.order.salesman_id : SELF.current_employee_id),
 
 118               title_key='safe_name') %]</td>
 
 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>
 
 128             <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
 
 129             <td>[% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11) %]</td>
 
 133             <th width="70%" align="right" nowrap>[% IF SELF.type_data.properties('is_customer') %][% 'Customer Order Number' | $T8 %][% ELSE %][% 'Vendor Order Number' | $T8 %][% END %]</th>
 
 134             <td>[% L.input_tag('order.cusordnumber', SELF.order.cusordnumber, size = 11) %]</td>
 
 138             <th width="70%" align="right" nowrap>[% 'Delivery Order Date' | $T8 %]</th>
 
 139             <td>[% L.date_tag('order.transdate_as_date', SELF.order.transdate_as_date) %]</td>
 
 143             <th width="70%" align="right" nowrap>[% 'Reqdate' | $T8 %]</th>
 
 144             <td>[% L.date_tag('order.reqdate_as_date', SELF.order.reqdate_as_date, class=reqdate_class) %]</td>
 
 148             <th width="70%" align="right" nowrap>[% 'Insert Date' | $T8 %]</th>
 
 149             <td>[% SELF.order.itime_as_date %]</td>
 
 157   [%- PROCESS delivery_order/tabs/_item_input.html SELF=SELF %]
 
 159   [% L.button_tag('kivi.DeliveryOrder.open_multi_items_dialog()', LxERP.t8('Add multiple items')) %]
 
 164         [%- IF SELF.positions_scrollbar_height -%]
 
 165           [%- SET scroll_style = 'style="overflow-y: auto; height:' _ SELF.positions_scrollbar_height _ 'vh;"' -%]
 
 167           [%- SET scroll_style = '' -%]
 
 169         <div id="row_table_scroll_id" [%- scroll_style -%]>
 
 170           <table id="row_table_id" width="100%">
 
 172               <tr class="listheading">
 
 173                 <th class="listheading" style='text-align:center' nowrap width="1">
 
 174                   [%- IF MYCONFIG.show_form_details %]
 
 175                     [%- 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") %]
 
 177                     [%- L.img_tag(src="image/expand.svg", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all') %]
 
 180                 <th class="listheading" nowrap width="3" >[%- 'position'     | $T8 %] </th>
 
 181                 <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
 
 182                 <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
 
 183                 [%- IF SELF.show_update_button -%]
 
 184                 <th class="listheading" style='text-align:center' nowrap width="1">
 
 185                   [%- L.img_tag(src="image/rotate_cw.svg",
 
 186                                 alt=LxERP.t8('Update from master data'),
 
 187                                 title= LxERP.t8('Update from master data'),
 
 188                                 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();",
 
 189                                 id='update_from_master') %]
 
 192                 <th id="partnumber_header_id"   class="listheading" nowrap width="15"><a href='#' onClick='javascript:kivi.DeliveryOrder.reorder_items("partnumber")'> [%- 'Partnumber'  | $T8 %]</a></th>
 
 193                 [%- IF SELF.search_cvpartnumber -%]
 
 194                 <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>
 
 196                 <th id="partclass_header_id"    class="listheading" nowrap width="2">[%- 'Type'  | $T8 %]</th>
 
 197                 <th id="description_header_id"  class="listheading" nowrap           ><a href='#' onClick='javascript:kivi.DeliveryOrder.reorder_items("description")'>[%- 'Description' | $T8 %]</a></th>
 
 198                 [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
 
 199                 <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>
 
 201                 <th id="qty_header_id"          class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.DeliveryOrder.reorder_items("qty")'>        [%- 'Qty'         | $T8 %]</a></th>
 
 202                 <th class="listheading" nowrap width="5" >[%- 'Unit'         | $T8 %] </th>
 
 203                 [% IF in_out == 'in' %]
 
 204                 <th class="listheading" nowrap width="5" >[%- 'Transfer To Stock' | $T8 %] </th>
 
 206                 [% IF in_out == 'out' %]
 
 207                 <th class="listheading" nowrap width="5" >[%- 'Release From Stock' | $T8 %] </th>
 
 212             [%- FOREACH item = SELF.order.items_sorted %]
 
 213               [%- PROCESS delivery_order/tabs/_row.html ITEM=item ID=(item.id||item.new_fake_id)  -%]
 
 226       <td colspan="100%" width="100%">
 
 232                   <th align="left">[% 'Notes' | $T8 %]</th>
 
 233                   <th align="left">[% 'Internal Notes' | $T8 %]</th>
 
 237                     [% L.textarea_tag('order.notes', SELF.order.notes, wrap="soft", style="width: 350px; height: 150px", class="texteditor") %]
 
 240                     [% L.textarea_tag('order.intnotes', SELF.order.intnotes, wrap="soft", style="width: 350px; height: 150px") %]
 
 249                   <th align="right">[% 'Payment Terms' | $T8 %]</th>
 
 250                   <td>[% L.select_tag('order.payment_id',
 
 251                                       SELF.all_payment_terms,
 
 252                                       default = SELF.order.payment_id,
 
 254                                       title_key = 'description',
 
 255                                       style = 'width: 250px') %]</td>
 
 258                   <th align="right">[% 'Delivery Terms' | $T8 %]</th>
 
 259                   <td>[% L.select_tag('order.delivery_term_id',
 
 260                                       SELF.all_delivery_terms,
 
 261                                       default = SELF.order.delivery_term_id,
 
 263                                       title_key = 'description',
 
 264                                       style = 'width: 250px') %]</td>
 
 276   [% L.hidden_tag('order.taxzone_id', SELF.order.taxzone_id) %]
 
 280 [% L.sortable_element('#row_table_id') %]