364367b9225f1341afa2e48646d9829c274984e9
[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    </table>
24   </p>
25
26   <hr size="3" noshade>
27
28   [%- IF conf_webdav %]
29   <div class="listtop" align="left">[% 'Documents in the WebDAV repository' | $T8 %]</div>
30
31   <p>
32    <table width="100%">
33     <tr>
34      <td align="left" width="30%"><b>[% 'File name' | $T8 %]</b></td>
35      <td align="left" width="70%"><b>[% 'WebDAV link' | $T8 %]</b></td>
36     </tr>
37
38     [%- FOREACH file = WEBDAV %]
39     <tr>
40      <td align="left">[% HTML.escape(file.name) %]</td>
41      <td align="left"><a href="[% HTML.escape(file.link) %]">[% HTML.escape(file.type) %]</a></td>
42     </tr>
43     [%- END %]
44
45    </table>
46   </p>
47
48   <hr size="3" noshade>
49   [%- END %]
50
51   <p>[% PRINT_OPTIONS %]</p>
52
53   <p>
54    [% 'Edit the Delivery Order' | $T8 %]<br>
55    <input type="hidden" name="action" value="dispatcher">
56    <input class="submit" type="submit" name="action_update" id="update_button" value="[% 'Update' | $T8 %]">
57    [%- UNLESS delivered %]
58    [%- IF vc == 'customer' %]
59    <input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]">
60    [%- END %]
61    [%- END %]
62    <input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]">
63    <input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]">
64    [%- UNLESS delivered %]
65    <input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]">
66    [%- IF vc == 'customer' %]
67    <input class="submit" type="submit" name="action_transfer_out" onclick="return check_transfer_qty()" value="[% 'Transfer out' | $T8 %]">
68    [%- ELSE %]
69    <input class="submit" type="submit" name="action_transfer_in"  onclick="return check_transfer_qty()" value="[% 'Transfer in' | $T8 %]">
70    [%- END %]
71    [%- END %]
72    [%- IF id %]
73      <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
74    [%- UNLESS closed %]
75    <input class="submit" type="submit" name="action_mark_closed" value="[% 'Mark closed' | $T8 %]">
76    [%- END %]
77    <input type="button" class="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="[% 'history' | $T8 %]">
78    [%- END %]
79   </p>
80
81   [%- IF id %]
82   <p>
83    [% 'Workflow Delivery Order' | $T8 %]<br>
84    <input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]">
85    [% UNLESS delivered || (vc == 'customer' && !INSTANCE_CONF.get_sales_delivery_order_show_delete) || (vc == 'vendor' && !INSTANCE_CONF.get_purchase_delivery_order_show_delete) %]
86      <input class="submit" type="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
87    [% END %]
88    <input class="submit" type="submit" name="action_invoice" value="[% 'Invoice' | $T8 %]">
89   </p>
90   [%- END %]
91
92   <input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
93   <input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
94
95  </form>
96 <script type='text/javascript'>
97   function check_transfer_qty() {
98     var all_match = true;
99     var rowcount = $('input[name=rowcount]').val();
100     for (var i = 1; i < rowcount; i++) {
101       if ($('#stock_in_out_qty_matches_' + i).val() != 1) {
102         all_match = false;
103       }
104     }
105
106     if (all_match) {
107       return true;
108     } else {
109       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 %]");
110     }
111   }
112 </script>