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