7 [% # Determine which shipping address to show if the delivery order has been shipped already. %]
11 FOREACH row = ALL_SHIPTO ;
12 IF row.shipto_id == shipto_id ;
13 SET shipto_label = [ row.shiptoname, row.shiptodepartment_1, row.shiptostreet, row.shiptocity ] ;
17 SET shipto_label = [ shiptoname, shiptodepartment_1, shiptostreet, shiptocity ] ;
20 SET shipto_label = shipto_label.grep('.') ;
21 IF !shipto_label.size ;
22 shipto_label = [ LxERP.t8('no shipping address') ] ;
28 <script type="text/javascript" src="js/show_form_details.js"></script>
29 <script type="text/javascript" src="js/show_history.js"></script>
30 <script type="text/javascript" src="js/show_vc_details.js"></script>
31 <script type="text/javascript" src="js/delivery_customer_selection.js"></script>
32 <script type="text/javascript" src="js/calculate_qty.js"></script>
33 <script type="text/javascript" src="js/stock_in_out.js"></script>
34 <script type="text/javascript" src="js/follow_up.js"></script>
35 <script type="text/javascript" src="js/kivi.SalesPurchase.js"></script>
38 [% IF vc == 'customer' %]
39 [% SET is_customer = '1' %]
41 [% SET vc = 'vendor' %]
42 [% SET is_customer = '0' %]
44 [% SET vc_id = vc _ "_id" %]
46 [% SET DISABLED = ' disabled' %]
49 [% INCLUDE 'common/flash.html' %]
50 [% INCLUDE 'generic/set_longdescription.html' %]
52 [% IF ERRORS && ERRORS.size %]
53 <p class="message message_error">[% ERRORS.join('<br>') %]</p>
56 <form id="form" method="post" name="do" action="do.pl">
58 <div id="do_tabs" class="tabwidget">
60 <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
61 [% IF INSTANCE_CONF.get_webdav %]
62 <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
64 [% IF id AND INSTANCE_CONF.get_doc_storage %]
65 <li><a href="controller.pl?action=File/list&file_type=document&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
66 <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
68 [% IF id AND AUTH.assert('record_links', 1) %]
69 <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=DeliveryOrder&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
73 <div id="ui-tabs-basic-data">
74 <div class="wrapper" id="wrapper-1">
75 [% INCLUDE 'generic/toggle_wrapper.html' %]
77 <input type="hidden" name="follow_up_trans_id_1" id="follow_up_trans_id_1" value="[% HTML.escape(id) %]">
78 <input type="hidden" name="follow_up_trans_type_1" id="follow_up_trans_type_1" value="[% HTML.escape(type) %]">
79 <input type="hidden" name="follow_up_trans_info_1" id="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
80 <input type="hidden" name="follow_up_rowcount" id="follow_up_rowcount" value="1">
82 <input type="hidden" name="business" id="business" value="[% HTML.escape(business) %]">
83 <input type="hidden" name="closed" id="closed" value="[% HTML.escape(closed) %]">
84 <input type="hidden" name="convert_from_oe_ids" id="convert_from_oe_ids" value="[% HTML.escape(convert_from_oe_ids) %]">
85 <input type="hidden" name="currency" id="currency" value="[% HTML.escape(currency) %]">
86 <input type="hidden" name="customer_pricegroup_id" id="customer_pricegroup_id" value="[% HTML.escape(customer_pricegroup_id) %]">
87 <input type="hidden" name="discount" id="discount" value="[% HTML.escape(discount) %]">
88 <input type="hidden" name="dunning_amount" id="dunning_amount" value="[% HTML.escape(dunning_amount) %]">
89 <input type="hidden" name="emailed" id="emailed" value="[% HTML.escape(emailed) %]">
90 <input type="hidden" name="id" id="id" value="[% HTML.escape(id) %]">
91 <input type="hidden" name="max_dunning_level" id="max_dunning_level" value="[% HTML.escape(max_dunning_level) %]">
92 <input type="hidden" name="printed" id="printed" value="[% HTML.escape(printed) %]">
93 <input type="hidden" name="proforma" id="proforma" value="[% HTML.escape(proforma) %]">
94 <input type="hidden" name="queued" id="queued" value="[% HTML.escape(queued) %]">
95 <input type="hidden" name="saved_donumber" id="saved_donumber" value="[% HTML.escape(saved_donumber) %]">
97 <input type="hidden" name="shipto_id" id="shipto_id" value="[% HTML.escape(shipto_id) %]">
98 <input type="hidden" name="shiptocity" id="shiptocity" value="[% HTML.escape(shiptocity) %]">
99 <input type="hidden" name="shiptocontact" id="shiptocontact" value="[% HTML.escape(shiptocontact) %]">
100 <input type="hidden" name="shiptocp_gender" id="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]">
101 <input type="hidden" name="shiptocountry" id="shiptocountry" value="[% HTML.escape(shiptocountry) %]">
102 <input type="hidden" name="shiptogln" id="shiptogln" value="[% HTML.escape(shiptogln) %]">
103 <input type="hidden" name="shiptodepartment_1" id="shiptodepartment_1" value="[% HTML.escape(shiptodepartment_1) %]">
104 <input type="hidden" name="shiptodepartment_2" id="shiptodepartment_2" value="[% HTML.escape(shiptodepartment_2) %]">
105 <input type="hidden" name="shiptoemail" id="shiptoemail" value="[% HTML.escape(shiptoemail) %]">
106 <input type="hidden" name="shiptofax" id="shiptofax" value="[% HTML.escape(shiptofax) %]">
107 <input type="hidden" name="shiptoname" id="shiptoname" value="[% HTML.escape(shiptoname) %]">
108 <input type="hidden" name="shiptophone" id="shiptophone" value="[% HTML.escape(shiptophone) %]">
109 <input type="hidden" name="shiptostreet" id="shiptostreet" value="[% HTML.escape(shiptostreet) %]">
110 <input type="hidden" name="shiptozipcode" id="shiptozipcode" value="[% HTML.escape(shiptozipcode) %]">
111 <input type="hidden" name="shiptocp_gender" id="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]">
113 <input type="hidden" name="show_details" id="show_details" value="[% HTML.escape(show_details) %]">
114 <input type="hidden" name="taxincluded" id="taxincluded" value="[% HTML.escape(taxincluded) %]">
115 <input type="hidden" name="taxzone_id" id="taxzone_id" value="[% HTML.escape(taxzone_id) %]">
116 <input type="hidden" name="title" id="title" value="[% HTML.escape(title) %]">
117 <input type="hidden" name="type" id="type" value="[% HTML.escape(type) %]">
118 <input type="hidden" name="vc" id="vc" value="[% HTML.escape(vc) %]">
119 <input type="hidden" name="lastmtime" id="lastmtime" value="[% HTML.escape(lastmtime) %]">
120 <input type="hidden" name="tax_point" id="tax_point" value="[% HTML.escape(tax_point) %]">
123 [% L.hidden_tag('form_validity_token', form_validity_token) %]
126 [% IF delivered %][% SET RO=' readonly' %][% END %]
128 <table class="tbl-horizontal col">
129 <caption>[% 'Customer & Order Information' | $T8 %]</caption>
130 <colgroup><col class="wi-mediumsmall"><col class="wi-wide"></colgroup>
133 <th>[% IF is_customer %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</th>
136 [% P.hidden_tag(vc_id, $vc_id) %]
137 [% HTML.escape(VC_OBJ.name) %]
139 [% P.customer_vendor.picker(vc_id, $vc_id, type=vc, class="wi-wide tooltipstered", onchange="\$('#update_button').click()", title=VC_OBJ.name ) %]
141 [% #P.button_tag("show_vc_details('" _ HTML.escape(vc) _ "')", LxERP.t8("Details (one letter abbreviation)"), class="wi-tiny neutral", title=LxERP.t8('Detailed information about this contact') ) %]
142 <a href="javascript:show_vc_details('[% HTML.escape(vc) %]');" title="[% 'Show detail informationen' | $T8 %]" class="button-image info"><img src="image/detail.png"></a>
143 [% P.hidden_tag("previous_" _ vc_id, $vc_id) %]
146 [% IF ALL_CONTACTS.size %]
148 <th>[% 'Contact Person' | $T8 %]</th>
151 <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
152 [% IF cp_id == row.cp_id %]
153 <span class="data wi-wide">[% HTML.escape(row.cp_name) %][% IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%]</span>
156 [% L.select_tag('cp_id', ALL_CONTACTS, default = cp_id, value_key = 'cp_id', title_key = 'full_name_dep', with_empty = 1, class='wi-wide') %]
162 <th>[% 'Shipping Address' | $T8 %]</th>
165 <span class="data wi-wide">[% HTML.escape(shipto_label.join('; ')) %]</span>
167 [% IF ALL_SHIPTO.size %]
168 [% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ;
169 L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', class='wi-wide') %]
171 [% L.button_tag("kivi.SalesPurchase.edit_custom_shipto()", LxERP.t8("Custom shipto"), class='button neutral below wi-wide') %]
175 [% IF (vc == 'customer') && VC_OBJ.additional_billing_addresses.as_list.size %]
177 <th>[% 'Custom Billing Address' | $T8 %]</th>
179 [% L.select_tag('billing_address_id', VC_OBJ.additional_billing_addresses,
180 with_empty=1, default=billing_address_id, value_key='id', title_key='displayable_id', class='wi-wide') %]
186 <th>[% IF is_customer %][% 'Customer type' | $T8 %][% ELSE %][% 'Vendor type' | $T8 %][% END %]</th>
187 <td><span class="data wi-wide">[% HTML.escape(business) %]</span><!-- PENDENT: Behandlung von Text in Formular-Tabellen --> </td>
190 [% IF max_dunning_level %]
192 <th>[% 'Max. Dunning Level' | $T8 %]</th>
194 <b>[% HTML.escape(max_dunning_level) %]</b>, [% 'Dunning Amount' | $T8 %]:
195 <b>[% HTML.escape(LxERP.format_amount(dunning_amount, 2)) %]</b>
199 [% IF ALL_LANGUAGES.size %]
201 <th>[% 'Language' | $T8 %]</th>
203 [% L.select_tag('language_id', ALL_LANGUAGES, default = language_id, title_key = 'description', with_empty = 1, style = 'width: 250px' )%]
207 [% IF ALL_DEPARTMENTS.size %]
209 <th>[% 'Department' | $T8 %]</th>
211 [% IF ( delivered ) %]
212 [% L.hidden_tag('department_id', department_id) %]
214 [% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, class='wi-wide', disabled = delivered )%]
220 <th>[% 'Shipping Point' | $T8 %]</th>
221 <td><input type="text" name="shippingpoint" class="wi-wide" value="[% HTML.escape(shippingpoint) %]"[% RO %]></td>
224 <th>[% 'Ship via' | $T8 %]</th>
225 <td><input type="text" name="shipvia" class="wi-wide" value="[% HTML.escape(shipvia) %]"[% RO %]></td>
228 <th>[% 'Transaction description' | $T8 %]</th>
229 <td>[% L.input_tag("transaction_description", transaction_description, class="wi-wide", "data-validate"=(INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : ''), readonly=delivered) %]</td>
236 <table class="tbl-horizontal col">
237 <caption>[% 'Delivery Terms' | $T8 %]</caption>
238 <colgroup><col class="wi-wide"></colgroup>
241 <td>[% L.select_tag('delivery_term_id', ALL_DELIVERY_TERMS, default=delivery_term_id, with_empty=1, title_key='description', class='wi-wide') %]</td>
244 <th class="caption"> [% 'Notes' | $T8 %] </th>
249 [% L.hidden_tag("notes", notes) %]
250 <div class="fake-textarea fake-wi-wide">[% P.restricted_html(notes) %]</div>
252 [% L.textarea_tag("notes", notes, rows=3, cols=10, class="texteditor wi-wide") %]
258 <span class="label above">[% 'Internal Notes' | $T8 %]</span>
259 [% L.textarea_tag("intnotes", intnotes, class="wi-wide") %]
266 <table class="tbl-horizontal">
267 <caption>[% 'Status & Handling' | $T8 %]</caption>
270 <th>[% 'Transfer Status' | $T8 %]</th>
272 <span class="data wi-normal">[% IF delivered %]
274 [% 'transferred out' | $T8 %]
276 [% 'transferred in' | $T8 %]
280 [% 'not transferred out yet' | $T8 %]
282 [% 'not transferred in yet' | $T8 %]
288 <th>[% 'Status' | $T8 %]</th>
290 <span class="data wi-normal">[% IF closed %][% 'Closed' | $T8 %][% ELSE %][% 'Open' | $T8 %][% END %]</span>
291 <input type="hidden" name="delivered" value="[% HTML.escape(delivered) %]">
295 <th>[% 'Employee' | $T8 %]</th>
298 <input type="hidden" name="employee_id" value="[% HTML.escape(employee_id) %]">
299 [% FOREACH row = ALL_EMPLOYEES %]
300 [% IF row.id == employee_id %]
302 <span class="data wi-normal">[% HTML.escape(row.name) %]</span>
304 <span class="data wi-normal">[% HTML.escape(row.login) %]</span>
309 [% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name', class='wi-normal') %]
315 [% SET the_salesman_id = salesman_id %]
317 [% SET the_salesman_id = employee_id %]
320 <th>[% 'Salesman' | $T8 %]</th>
323 <input type="hidden" name="salesman_id" value="[% HTML.escape(salesman_id) %]">
324 [% FOREACH row = ALL_SALESMEN %]
325 [% IF row.id == the_salesman_id %]
327 <span class="data wi-normal">[% HTML.escape(row.name) %][% ELSE %][% HTML.escape(row.login) %]</span>
332 [% L.select_tag('salesman_id', ALL_SALESMEN, default = (salesman_id ? salesman_id : employee_id), title_key = 'safe_name', class='wi-normal') %]
338 <th class="caption" colspan="2">[% 'IDs & Dates' | $T8 %]</th>
341 <th>[% 'Delivery Order Number' | $T8 %]</th>
343 [% IF !is_customer || INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %]
344 [% L.input_tag("donumber", donumber, readonly=delivered, class="wi-mediumsmall") %]
346 [% HTML.escape(donumber) %]
347 [% L.hidden_tag("donumber", donumber) %]
349 [% LxERP.t8("will be set upon saving") %]
354 <th>[% 'Order Number' | $T8 %]</th>
355 <td><input type="text" name="ordnumber" id="ordnumber" class="wi-mediumsmall" value="[% HTML.escape(ordnumber) %]"[% RO %]></td>
358 <th>[% IF is_customer %][% 'Customer Order Number' | $T8 %][% ELSE %][% 'Vendor Order Number' | $T8 %][% END %]</th>
359 <td><input type="text" name="cusordnumber" id="cusordnumber" class="wi-mediumsmall" value="[% HTML.escape(cusordnumber) %]"[% RO %]></td>
362 <th>[% 'Project Number' | $T8 %]</th>
365 <input type="hidden" name="globalproject_id" value="[% HTML.escape(globalproject_id) %]">
366 [% FOREACH row = ALL_PROJECTS %]
367 [% IF globalproject_id == row.id %][% HTML.escape(row.projectnumber) %][% END %]
370 <select name="globalproject_id" class="wi-mediumsmall">
372 [% FOREACH row = ALL_PROJECTS %]
373 <option value="[% HTML.escape(row.id) %]"[% IF globalproject_id == row.id %] selected[% END %]>[% HTML.escape(row.projectnumber) %]</option>
380 <th>[% 'Delivery Order Date' | $T8 %]</th>
381 <td> [% L.date_tag('transdate', transdate, readonly => delivered, class='wi-small') %] </td>
384 <th>[% 'Reqdate' | $T8 %]</th>
385 <td> [% L.date_tag('reqdate', reqdate, readonly => delivered, class='wi-small') %] </td>
389 <th>[% 'Insert Date' | $T8 %]</th>
390 <td><span class="data wi-small">[% insertdate %]</span></td>
396 </div><!-- /.wrapper -->