7  <script type="text/javascript" src="js/show_form_details.js"></script>
 
   8  <script type="text/javascript" src="js/show_history.js"></script>
 
   9  <script type="text/javascript" src="js/show_vc_details.js"></script>
 
  10  <script type="text/javascript" src="js/common.js"></script>
 
  11  <script type="text/javascript" src="js/delivery_customer_selection.js"></script>
 
  12  <script type="text/javascript" src="js/vendor_selection.js"></script>
 
  13  <script type="text/javascript" src="js/calculate_qty.js"></script>
 
  14  <script type="text/javascript" src="js/stock_in_out.js"></script>
 
  15  <script type="text/javascript" src="js/follow_up.js"></script>
 
  16  <script type="text/javascript" src="js/kivi.SalesPurchase.js"></script>
 
  18  <style type="text/css">
 
  24  [%- IF vc == 'customer' %]
 
  25  [%- SET vc = 'customer' %]
 
  26  [%- SET the_vc_id = customer_id %]
 
  27  [%- SET the_vc = customer %]
 
  28  [%- SET the_oldvc = oldcustomer %]
 
  29  [%- SET is_customer = '1' %]
 
  31  [%- SET vc = 'vendor' %]
 
  32  [%- SET the_vc_id = vendor_id %]
 
  33  [%- SET the_vc = vendor %]
 
  34  [%- SET the_oldvc = oldvendor %]
 
  35  [%- SET is_customer = '0' %]
 
  38  [%- SET DISABLED = ' disabled' %]
 
  41 [%- INCLUDE 'common/flash.html' %]
 
  42 [%- INCLUDE 'generic/set_longdescription.html' %]
 
  44  [%- IF ERRORS && ERRORS.size %]
 
  45  <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
 
  48  <form method="post" name="do" action="do.pl">
 
  50  <div id="do_tabs" class="tabwidget">
 
  52    <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
 
  53 [%- IF INSTANCE_CONF.get_webdav %]
 
  54    <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
 
  57    <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=DeliveryOrder&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
 
  61   <div id="ui-tabs-basic-data">
 
  63   <input type="hidden" name="follow_up_trans_id_1" value="[% HTML.escape(id) %]">
 
  64   <input type="hidden" name="follow_up_trans_type_1" value="[% HTML.escape(type) %]">
 
  65   <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
 
  66   <input type="hidden" name="follow_up_rowcount" value="1">
 
  69   <input type="hidden" name="action" value="[% HTML.escape(action) %]">
 
  70   <input type="hidden" name="bcc" value="[% HTML.escape(bcc) %]">
 
  71   <input type="hidden" name="business" value="[% HTML.escape(business) %]">
 
  72   <input type="hidden" name="cc" value="[% HTML.escape(cc) %]">
 
  73   <input type="hidden" name="closed" value="[% HTML.escape(closed) %]">
 
  74   <input type="hidden" name="convert_from_oe_ids" value="[% HTML.escape(convert_from_oe_ids) %]">
 
  75   <input type="hidden" name="currency" value="[% HTML.escape(currency) %]">
 
  76   <input type="hidden" name="customer_klass" value="[% HTML.escape(customer_klass) %]">
 
  77   <input type="hidden" name="discount" value="[% HTML.escape(discount) %]">
 
  78   <input type="hidden" name="dunning_amount" value="[% HTML.escape(dunning_amount) %]">
 
  79   <input type="hidden" name="email" value="[% HTML.escape(email) %]">
 
  80   <input type="hidden" name="emailed" value="[% HTML.escape(emailed) %]">
 
  81   <input type="hidden" name="format" value="[% HTML.escape(format) %]">
 
  82   <input type="hidden" name="formname" value="[% HTML.escape(formname) %]">
 
  83   <input type="hidden" name="id" value="[% HTML.escape(id) %]">
 
  84   <input type="hidden" name="max_dunning_level" value="[% HTML.escape(max_dunning_level) %]">
 
  85   <input type="hidden" name="media" value="[% HTML.escape(media) %]">
 
  86   <input type="hidden" name="message" value="[% HTML.escape(message) %]">
 
  87   <input type="hidden" name="printed" value="[% HTML.escape(printed) %]">
 
  88   <input type="hidden" name="proforma" value="[% HTML.escape(proforma) %]">
 
  89   <input type="hidden" name="queued" value="[% HTML.escape(queued) %]">
 
  90   <input type="hidden" name="saved_donumber" value="[% HTML.escape(saved_donumber) %]">
 
  91   <input type="hidden" name="shiptocity" value="[% HTML.escape(shiptocity) %]">
 
  92   <input type="hidden" name="shiptocontact" value="[% HTML.escape(shiptocontact) %]">
 
  93   <input type="hidden" name="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]">
 
  94   <input type="hidden" name="shiptocountry" value="[% HTML.escape(shiptocountry) %]">
 
  95   <input type="hidden" name="shiptogln" value="[% HTML.escape(shiptogln) %]">
 
  96   <input type="hidden" name="shiptodepartment_1" value="[% HTML.escape(shiptodepartment_1) %]">
 
  97   <input type="hidden" name="shiptodepartment_2" value="[% HTML.escape(shiptodepartment_2) %]">
 
  98   <input type="hidden" name="shiptoemail" value="[% HTML.escape(shiptoemail) %]">
 
  99   <input type="hidden" name="shiptofax" value="[% HTML.escape(shiptofax) %]">
 
 100   <input type="hidden" name="shiptoname" value="[% HTML.escape(shiptoname) %]">
 
 101   <input type="hidden" name="shiptophone" value="[% HTML.escape(shiptophone) %]">
 
 102   <input type="hidden" name="shiptostreet" value="[% HTML.escape(shiptostreet) %]">
 
 103   <input type="hidden" name="shiptozipcode" value="[% HTML.escape(shiptozipcode) %]">
 
 104   <input type="hidden" name="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]">
 
 105   <input type="hidden" name="show_details" value="[% HTML.escape(show_details) %]">
 
 106   <input type="hidden" name="subject" value="[% HTML.escape(subject) %]">
 
 107   <input type="hidden" name="taxincluded" value="[% HTML.escape(taxincluded) %]">
 
 108   <input type="hidden" name="taxzone_id" value="[% HTML.escape(taxzone_id) %]">
 
 109   <input type="hidden" name="title" value="[% HTML.escape(title) %]">
 
 110   <input type="hidden" name="type" value="[% HTML.escape(type) %]">
 
 111   <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
 
 112   <input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
 
 120         <input type="hidden" name="[% vc %]_id" value="[% HTML.escape(the_vc_id) %]">
 
 121         <input type="hidden" name="old[% vc %]" value="[% HTML.escape(the_oldvc) %]">
 
 122         <input type="hidden" name="tradediscount" value="[% HTML.escape(tradediscount) %]">
 
 123         <th align="right">[% IF is_customer %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</th>
 
 125          [%- UNLESS !delivered && SHOW_VC_DROP_DOWN %]
 
 126          <input type="text" value="[% HTML.escape(oldvcname) %]" name="[% HTML.escape(vc) %]"[% RO %]>
 
 128          <select name="[% vc %]" class="fixed_width" onchange="document.do.update_button.click();"[% RO %]>
 
 129           [%- FOREACH row = ALL_VC %]
 
 130           <option value="[% HTML.escape(row.value) %]" [% IF the_oldvc == row.value %] selected[% END %]>[% HTML.escape(row.name) %]</option>
 
 133          <input type="hidden" name="select[% vc %]" value="1">
 
 135          <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('[% vc %]')">
 
 138         [%- IF ALL_CONTACTS.size %]
 
 140          <th align="right">[% 'Contact Person' | $T8 %]</th>
 
 143           <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
 
 144           [%- IF cp_id == row.cp_id %]
 
 145           [%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%]
 
 148             [% L.select_tag('cp_id', ALL_CONTACTS, default = cp_id, value_key = 'cp_id', title_key = 'full_name_dep', with_empty = 1, style='width: 250px') %]
 
 154         [%- IF ALL_SHIPTO.size %]
 
 156          <th align="right">[% 'Shipping Address' | $T8 %]</th>
 
 159           <input type="hidden" name="shipto_id" value="[% HTML.escape(shipto_id) %]">
 
 160           [%- FOREACH row = ALL_SHIPTO %]
 
 161           [%- IF shipto_id == row.shipto_id %]
 
 162           [%- HTML.escape(row.shiptoname) -%]
 
 163           [%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%]
 
 164           [%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%]
 
 165           [%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%]
 
 170             [% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ;
 
 171                L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', style='width: 250px') %]
 
 179          <th align="right">[% IF is_customer %][% 'Customer type' | $T8 %][% ELSE %][% 'Vendor type' | $T8 %][% END %]</th>
 
 180          <td>[% HTML.escape(business) %]</td>
 
 184         [%- IF max_dunning_level %]
 
 186          <th align="right">[% 'Max. Dunning Level' | $T8 %]</th>
 
 188           <b>[% HTML.escape(max_dunning_level) %]</b>; [% 'Dunning Amount' | $T8 %]:
 
 189           <b>[% HTML.escape(LxERP.format_amount(dunning_amount, 2)) %]</b>
 
 195        [%- IF ALL_DEPARTMENTS.size %]
 
 197         <th align="right" nowrap>[% 'Department' | $T8 %]</th>
 
 199           [% IF ( delivered ) %]
 
 200             [% L.hidden_tag('department_id', department_id) %]
 
 202           [% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, style = 'width: 250px', disabled = delivered )%]
 
 208         <th align="right">[% 'Shipping Point' | $T8 %]</th>
 
 209         <td colspan="3"><input name="shippingpoint" size="35" value="[% HTML.escape(shippingpoint) %]"[% RO %]></td>
 
 213         <th align="right">[% 'Ship via' | $T8 %]</th>
 
 214         <td colspan="3"><input name="shipvia" size="35" value="[% HTML.escape(shipvia) %]"[% RO %]></td>
 
 218         <th align="right">[% 'Transaction description' | $T8 %]</th>
 
 219         <td colspan="3"><input name="transaction_description" id="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"[% RO %]></td>
 
 229         <td colspan="2" align="center">
 
 231           [%- IF is_customer %]
 
 232           [% 'transferred out' | $T8 %]
 
 234           [% 'transferred in' | $T8 %]
 
 237           [%- IF is_customer %]
 
 238           [% 'not transferred out yet' | $T8 %]
 
 240           [% 'not transferred in yet' | $T8 %]
 
 252        <input type="hidden" name="delivered" value="[% HTML.escape(delivered) %]">
 
 255         <th align="right">[% 'Employee' | $T8 %]</th>
 
 258          <input type="hidden" name="employee_id" value="[% HTML.escape(employee_id) %]">
 
 259          [%- FOREACH row = ALL_EMPLOYEES %]
 
 260          [% IF row.id == employee_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
 
 263            [% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %]
 
 268        [%- IF is_customer %]
 
 269        [%- IF salesman_id %]
 
 270        [%- SET the_salesman_id = salesman_id %]
 
 272        [%- SET the_salesman_id = employee_id %]
 
 275         <th align="right">[% 'Salesman' | $T8 %]</th>
 
 278          <input type="hidden" name="salesman_id" value="[% HTML.escape(salesman_id) %]">
 
 279          [%- FOREACH row = ALL_SALESMEN %]
 
 280          [% IF row.id == the_salesman_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
 
 283           [% L.select_tag('salesman_id', ALL_SALESMEN, default = (salesman_id ? salesman_id : employee_id), title_key = 'safe_name') %]
 
 290         <th width="70%" align="right" nowrap>[% 'Delivery Order Number' | $T8 %]</th>
 
 291         <td><input name="donumber" size="11" value="[% HTML.escape(donumber) %]"[% RO %]></td>
 
 295         <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
 
 296         <td><input name="ordnumber" size="11" value="[% HTML.escape(ordnumber) %]"[% RO %]></td>
 
 300         <th width="70%" align="right" nowrap>[% IF is_customer %][% 'Customer Order Number' | $T8 %][% ELSE %][% 'Vendor Order Number' | $T8 %][% END %]</th>
 
 301         <td><input name="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"[% RO %]></td>
 
 305         <th align="right" nowrap>[% 'Delivery Order Date' | $T8 %]</th>
 
 307          [% L.date_tag('transdate', transdate, readonly => delivered) %]
 
 312         <th align="right" nowrap>[% 'Reqdate' | $T8 %]</th>
 
 314          [% L.date_tag('reqdate', reqdate, readonly => delivered) %]
 
 318        [%- IF is_customer %]
 
 320         <th align="right" nowrap>[% 'Insert Date' | $T8 %]</th>
 
 321         <td>[% insertdate %]</td>
 
 326         <th width="70%" align="right" nowrap>[% 'Project Number' | $T8 %]</th>
 
 329          <input type="hidden" name="globalproject_id" value="[% HTML.escape(globalproject_id) %]">
 
 330          [%- FOREACH row = ALL_PROJECTS %]
 
 331          [% IF globalproject_id == row.id %][% HTML.escape(row.projectnumber) %][% END %]
 
 334          <select name="globalproject_id">
 
 336           [%- FOREACH row = ALL_PROJECTS %]
 
 337           <option value="[% HTML.escape(row.id) %]"[% IF globalproject_id == row.id %] selected[% END %]>[% HTML.escape(row.projectnumber) %]</option>