6be226888acc5f0500d80176d46f60062f509e25
[kivitendo-erp.git] / templates / webpages / do / form_footer.html
1 [%- USE T8 %]
2 [% USE HTML %][% USE LxERP %]
3  [%- IF delivered %]
4  [%- SET RO = ' readonly' %]
5  [%- END %]
6
7     <tr>
8      <td>
9       <table>
10        <tr valign="bottom">
11         <th align="left">[% 'Notes' | $T8 %]</th>
12         <th align="left">[% 'Internal Notes' | $T8 %]</th>
13        </tr>
14
15        <tr valign="top">
16         <td><textarea name="notes" rows="[% LxERP.numtextrows(notes, 25, 8, 2) %]" cols="25" wrap="soft"[% RO %]>[% HTML.escape(notes) %]</textarea></td>
17         <td><textarea name="intnotes" rows="[% LxERP.numtextrows(intnotes, 35, 8, 2) %]" cols="35" wrap="soft"[% RO %]>[% HTML.escape(intnotes) %]</textarea></td>
18        </tr>
19       </table>
20
21      </td>
22     </tr>
23   <tr>
24     <td>
25       <table width="100%">
26         <tr valign="bottom">
27           <td align="right">
28             <table>
29             <tr>
30               <th  align="left">[% 'Total weight' | $T8 %]</th>
31               <td align="right">
32                 [% LxERP.format_amount(totalweight, 3) %] [% HTML.escape(weightunit) %]
33                 <input type="hidden" name="totalweight" value="[% HTML.escape(totalweight) %]">
34               </td>
35             </tr>
36             </table>
37           </td>
38         </tr>
39       </table>
40     </td>
41    </table>
42   </p>
43
44  </div>
45 [% PROCESS 'webdav/_list.html' %]
46  <div id="ui-tabs-1">
47   [%- LxERP.t8("Loading...") %]
48  </div>
49 </div>
50
51 <hr size="3" noshade>
52
53   <p>[% PRINT_OPTIONS %]</p>
54
55   <p>
56    [% 'Edit the Delivery Order' | $T8 %]<br>
57    <input type="hidden" name="action" value="dispatcher">
58    <input class="submit" type="submit" name="action_update" id="update_button" value="[% 'Update' | $T8 %]">
59    [%- UNLESS delivered %]
60    [%- IF vc == 'customer' %]
61    <input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]">
62    [%- END %]
63    [%- END %]
64    <input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]">
65    <input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]">
66    [%- UNLESS delivered %]
67    <input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]">
68    [%- IF vc == 'customer' %]
69    <input class="submit" type="submit" name="action_transfer_out" onclick="return check_transfer_qty()" value="[% 'Transfer out' | $T8 %]">
70    [%- ELSE %]
71    <input class="submit" type="submit" name="action_transfer_in"  onclick="return check_transfer_qty()" value="[% 'Transfer in' | $T8 %]">
72    [%- END %]
73    [%- END %]
74    [%- IF id %]
75      <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
76    [%- UNLESS closed %]
77    <input class="submit" type="submit" name="action_mark_closed" value="[% 'Mark closed' | $T8 %]">
78    [%- END %]
79    <input type="button" class="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="[% 'history' | $T8 %]">
80    [%- END %]
81   </p>
82
83   [%- IF id %]
84   <p>
85    [% 'Workflow Delivery Order' | $T8 %]<br>
86    <input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]">
87    [% UNLESS delivered || (vc == 'customer' && !INSTANCE_CONF.get_sales_delivery_order_show_delete) || (vc == 'vendor' && !INSTANCE_CONF.get_purchase_delivery_order_show_delete) %]
88      <input class="submit" type="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
89    [% END %]
90    <input class="submit" type="submit" name="action_invoice" value="[% 'Invoice' | $T8 %]">
91   </p>
92   [%- END %]
93
94   <input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
95   <input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
96
97  </form>
98 <script type='text/javascript'>
99   function check_transfer_qty() {
100     var all_match = true;
101     var rowcount = $('input[name=rowcount]').val();
102     for (var i = 1; i < rowcount; i++) {
103       if ($('#stock_in_out_qty_matches_' + i).val() != 1) {
104         all_match = false;
105       }
106     }
107
108     if (all_match) {
109       return true;
110     } else {
111       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 %]");
112     }
113   }
114 </script>