[%- USE T8 %]
-[% USE HTML %][% USE LxERP %]
+[% USE HTML %][% USE LxERP %][%- USE L -%][%- USE P -%]
[%- IF delivered %]
[%- SET RO = ' readonly' %]
[%- END %]
</tr>
<tr valign="top">
- <td><textarea name="notes" rows="[% LxERP.numtextrows(notes, 25, 8, 2) %]" cols="25" wrap="soft"[% RO %]>[% HTML.escape(notes) %]</textarea></td>
+ <td>
+ [% IF delivered %]
+ [% L.hidden_tag("notes", notes) %]
+ <div style="width: 350px; height: 150px; border: 1px solid black">[% P.restricted_html(notes) %]</div>
+ [% ELSE %]
+ [% L.textarea_tag("notes", notes, wrap="soft", style="width: 350px; height: 150px", class="texteditor") %]
+ [% END %]
+ </td>
<td><textarea name="intnotes" rows="[% LxERP.numtextrows(intnotes, 35, 8, 2) %]" cols="35" wrap="soft"[% RO %]>[% HTML.escape(intnotes) %]</textarea></td>
</tr>
+
+ <tr>
+ <th align="right">[% 'Delivery Terms' | $T8 %]</th>
+ <td>[% L.select_tag('delivery_term_id', ALL_DELIVERY_TERMS, default = delivery_term_id, with_empty = 1, title_key = 'description') %]</td>
+ </tr>
</table>
</td>
</tr>
+[%- IF show_weight %]
+ <tr>
+ <td>
+ <table width="100%">
+ <tr valign="bottom">
+ <td align="right">
+ <table>
+ <tr>
+ <th align="left">[% 'Total weight' | $T8 %]</th>
+ <td align="right">
+ [% LxERP.format_amount(totalweight, 3) %] [% HTML.escape(weightunit) %]
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+[%- END %]
</table>
</p>
- <hr size="3" noshade>
-
- [%- IF conf_webdav %]
- <div class="listtop" align="left">[% 'Documents in the WebDAV repository' | $T8 %]</div>
-
- <p>
- <table width="100%">
- <tr>
- <td align="left" width="30%"><b>[% 'File name' | $T8 %]</b></td>
- <td align="left" width="70%"><b>[% 'WebDAV link' | $T8 %]</b></td>
- </tr>
-
- [%- FOREACH file = WEBDAV %]
- <tr>
- <td align="left">[% HTML.escape(file.name) %]</td>
- <td align="left"><a href="[% HTML.escape(file.link) %]">[% HTML.escape(file.type) %]</a></td>
- </tr>
- [%- END %]
-
- </table>
- </p>
-
- <hr size="3" noshade>
- [%- END %]
-
- <p>[% PRINT_OPTIONS %]</p>
-
- <p>
- [% 'Edit the Delivery Order' | $T8 %]<br>
- <input type="hidden" name="action" value="dispatcher">
- <input class="submit" type="submit" name="action_update" id="update_button" value="[% 'Update' | $T8 %]">
- [%- UNLESS delivered %]
- [%- IF vc == 'customer' %]
- <input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]">
- [%- END %]
- [%- END %]
- <input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]">
- <input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]">
- [%- UNLESS delivered %]
- <input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]">
- [%- IF vc == 'customer' %]
- <input class="submit" type="submit" name="action_transfer_out" onclick="return check_transfer_qty()" value="[% 'Transfer out' | $T8 %]">
- [%- ELSE %]
- <input class="submit" type="submit" name="action_transfer_in" onclick="return check_transfer_qty()" value="[% 'Transfer in' | $T8 %]">
- [%- END %]
- [%- END %]
- [%- IF id %]
- <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
- [%- UNLESS closed %]
- <input class="submit" type="submit" name="action_mark_closed" value="[% 'Mark closed' | $T8 %]">
- [%- END %]
- <input type="button" class="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="[% 'history' | $T8 %]">
- [%- END %]
- </p>
-
- [%- IF id %]
- <p>
- [% 'Workflow Delivery Order' | $T8 %]<br>
- <input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]">
- [% UNLESS delivered %]
- <input class="submit" type="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
- [% END %]
- <input class="submit" type="submit" name="action_invoice" value="[% 'Invoice' | $T8 %]">
- </p>
- [%- END %]
+ </div>
+[% PROCESS 'webdav/_list.html' %]
+ <div id="ui-tabs-1">
+ [%- LxERP.t8("Loading...") %]
+ </div>
+</div>
<input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
<input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
+ [%- IF !delivered %]
+ <div id="shipto_inputs" class="hidden">
+ [%- PROCESS 'common/_ship_to_dialog.html' vc_obj=VC_OBJ %]
+ </div>
+ [%- END %]
+
+ <div id="email_inputs" class="hidden"></div>
+
+ <div id="print_options" class="hidden">
+ [% PRINT_OPTIONS %]
+ </div>
</form>
<script type='text/javascript'>
- function check_transfer_qty() {
- var all_match = true;
- var rowcount = $('input[name=rowcount]').val();
- for (var i = 1; i < rowcount; i++) {
- if ($('#stock_in_out_qty_matches_' + i).val() != 1) {
- all_match = false;
- }
- }
-
- if (all_match) {
- return true;
- } else {
- return confirm("[% 'There are still transfers not matching the qty of the delivery order. Stock operations can not be changed later. Do you really want to proceed?' | $T8 %]");
- }
- }
+ $(kivi.SalesPurchase.init_on_submit_checks);
</script>
+
+[%- IF !delivered %]
+ <div id="shipto_dialog" class="hidden"></div>
+[%- END %]
+<div id="print_dialog" class="hidden">
+ [%- PROCESS 'common/_print_dialog.html' %]
+</div>