9f0b6db3ab25274f90f74b5bcc15f9aa946e5732
[kivitendo-erp.git] / templates / webpages / oe / form_footer.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5 [%- IF is_req_quo || is_pur_ord %]
6   [%- SET allow_invoice=1 %]
7 [%- ELSIF is_sales_quo && INSTANCE_CONF.get_allow_sales_invoice_from_sales_quotation %]
8   [%- SET allow_invoice=1 %]
9 [%- ELSIF is_sales_ord && INSTANCE_CONF.get_allow_sales_invoice_from_sales_order %]
10   [%- SET allow_invoice=1 %]
11 [%- ELSE %]
12   [%- SET allow_invoice=0 %]
13 [%- END %]
14   <tr>
15     <td>
16       <table width="100%">
17         <tr valign="bottom">
18           <td>
19             <table>
20               <tr>
21                 <th align="left">[% 'Notes' | $T8 %]</th>
22                 <th align="left">[% 'Internal Notes' | $T8 %]</th>
23               </tr>
24               <tr valign="top">
25                 <td>[% notes %]</td>
26                 <td>[% intnotes %]</td>
27               </tr>
28               <tr>
29                 <th align="right">[% 'Payment Terms' | $T8 %]</th>
30                 <td>
31                       [%- INCLUDE 'generic/multibox.html'
32                            name       = 'payment_id',
33                            style      = 'width: 250px',
34                            DATA       = ALL_PAYMENTS,
35                            id_key     = 'id',
36                            label_key  = 'description',
37                            show_empty = 1 -%]
38                 </td>
39               </tr>
40               <tr>
41                 <th align="right">[% 'Delivery Terms' | $T8 %]</th>
42                 <td>[% L.select_tag('delivery_term_id', ALL_DELIVERY_TERMS, default = delivery_term_id, with_empty = 1, title_key = 'description', style = 'width: 250px') %]</td>
43               </tr>
44
45 [%- IF is_sales_ord %]
46             <tr>
47              <th align="right">[%- LxERP.t8('Periodic Invoices') %]</th>
48              <td>
49               [% L.button_tag("edit_periodic_invoices_config(); return false;", LxERP.t8('Configure')) %]
50               ([% HTML.escape(periodic_invoices_status) %])
51               [% L.hidden_tag("periodic_invoices_config", periodic_invoices_config) %]
52               <a href="doc/html/ch03.html#features.periodic-invoices.variables" target="_blank">?</a>
53              </td>
54             </tr>
55 [%- END %]
56
57       [%- IF id && num_follow_ups %]
58       <tr>
59        <td colspan="2">[% LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', num_follow_ups, num_due_follow_ups) %]</td>
60       </tr>
61       [%- END %]
62       </table>
63           </td>
64       [%- IF show_weight %]
65           <td>
66             <table>
67             <tr>
68               <th  align="left">[% 'Total weight' | $T8 %]</th>
69               <td align="right">
70                 [% LxERP.format_amount(totalweight, 3) %] [% HTML.escape(weightunit) %]
71               </td>
72             </tr>
73             </table>
74           </td>
75       [%- END %]
76 [%- IF is_sales %]
77           <td>
78             <table>
79
80             <tr>
81               <th  align="left">[% 'Ertrag' | $T8 %]</th>
82               <td align="right">
83                 [% LxERP.format_amount(marge_total, 2) %]
84                 <input type="hidden" name="marge_total" value="[% HTML.escape(marge_total) %]">
85               </td>
86             </tr>
87             <tr>
88               <th  align="left">[% 'Ertrag prozentual' | $T8 %]</th>
89               <td align="right">
90                 [% LxERP.format_amount(marge_percent, 2) %]
91                 <input type="hidden" name="marge_percent" value="[% HTML.escape(marge_percent) %]">
92               </td>
93               <td>%</td>
94             </tr>
95             </table>
96           </td>
97 [%- END %]
98           <td align="right">
99
100 [%- IF taxaccounts %]
101             <input type="hidden" name="taxincluded_changed_by_user" id="taxincluded_changed_by_user" value="[% taxincluded_changed_by_user ? '1' : '0' %]">
102             <input name="taxincluded" class="checkbox" onclick="document.getElementById('taxincluded_changed_by_user').value = '1';" type="checkbox" value="1"[% IF taxincluded %] checked[% END %]><b>[% 'Tax Included' | $T8 %]</b><br><br>
103 [%- END %]
104             <table>
105 [%- IF NOT taxincluded %]
106               <tr>
107                 <th align='right'>[% 'Subtotal' | $T8 %]</th>
108                 <td align='right'>[% LxERP.format_amount(invsubtotal, 2) %]</td>
109               </tr>
110 [%- END %]
111               [% tax %]
112               <tr>
113                 <th align="right">[% 'Total' | $T8 %]</th>
114                 <td align="right">[% LxERP.format_amount(invtotal, 2) %]
115                   <input type="hidden" name="oldinvtotal" value="[% HTML.escape(oldinvtotal) %]">
116                   <input type="hidden" name="oldtotalpaid" value="[% HTML.escape(totalpaid) %]">
117                 </td>
118               </tr>
119             </table>
120           </td>
121         </tr>
122       </table>
123     </td>
124   </tr>
125 </table>
126
127 </div>
128 [%- PROCESS 'webdav/_list.html' %]
129 <div id="ui-tabs-1">
130  [%- LxERP.t8("Loading...") %]
131 </div>
132 </div>
133
134 <hr size="3" noshade>
135
136 <p>[% print_options %]</p>
137
138 [% label_edit %]<br>
139 <input class="submit" type="submit" name="action_update" id="update_button" value="[% 'Update' | $T8 %]">
140 <input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]">
141 <input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
142 <input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
143
144 [% IF not tpca_reminder %]
145   <input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]"[% IF warn_save_active_periodic_invoice %] data-warn-save-active-periodic-invoice="1"[% END %] data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
146   <input class="submit" type="submit" name="action_save_and_close" value="[% 'Save and Close' | $T8 %]"[% IF warn_save_active_periodic_invoice %] data-warn-save-active-periodic-invoice="1"[% END %] data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
147 [% ELSE %]
148   [% IF warn_save_active_periodic_invoice  %] [% warn_save_active_periodic_invoice=1 %] [% END %]
149     [% L.submit_tag('action_save', LxERP.t8('Save'), confirm=LxERP.t8('Missing transport cost: #1  Are you sure?', tpca_reminder), 'data-require-transaction-description'=INSTANCE_CONF.get_require_transaction_description_ps, 'data-warn-save-active-periodic-invoice'=warn_save_active_periodic_invoice) %]
150     [% L.submit_tag('action_save_and_close', LxERP.t8('Save and close'), confirm=LxERP.t8('Missing transport cost: #1  Are you sure?', tpca_reminder), 'data-require-transaction-description'=INSTANCE_CONF.get_require_transaction_description_ps, 'data-warn-save-active-periodic-invoice'=warn_save_active_periodic_invoice) %]
151 [% END %]
152
153 [%- IF id %]
154   <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
155   <input type="button" class="submit" onclick="set_history_window([% HTML.escape(id) %], 'id')" name="history" id="history" value="[% 'history' | $T8 %]">
156
157   <br>[% label_workflow %]<br>
158   <input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
159
160   [%- UNLESS (is_sales_ord && !INSTANCE_CONF.get_sales_order_show_delete) || (is_pur_ord && !INSTANCE_CONF.get_purchase_order_show_delete) %]
161     [% L.submit_tag('action_delete', LxERP.t8('Delete'), confirm=LxERP.t8('Are you sure?')) %]
162   [%- END %]
163
164   [%- IF is_sales_quo %]
165     <input class="submit" type="submit" name="action_sales_order" value="[% 'Sales Order' | $T8 %]">
166   [%- END %]
167
168   [%- IF is_req_quo %]
169     <input class="submit" type="submit" name="action_purchase_order" value="[% 'Purchase Order' | $T8 %]">
170   [%- END %]
171
172   [%- IF is_sales_ord || is_pur_ord %]
173     <input class="submit" type="submit" name="action_delivery_order" value="[% 'Delivery Order' | $T8 %]">
174   [%- END %]
175
176   [%- IF allow_invoice %]
177   <input class="submit" type="submit" name="action_invoice" value="[% 'Invoice' | $T8 %]">
178   [%- END %]
179
180   [%- IF is_sales_ord || is_pur_ord %]
181     <br>[% heading %] als neue Vorlage verwenden f&uuml;r<br>
182     [%- IF is_sales_ord %]
183       <input class="submit" type="submit" name="action_purchase_order" value="[% 'Purchase Order' | $T8 %]">
184      <input class="submit" type="submit" name="action_quotation" value="[% 'Quotation' | $T8 %]">
185     [%- ELSE %]
186     [%- IF is_pur_ord %]
187       <input class="submit" type="submit" name="action_sales_order" value="[% 'Sales Order' | $T8 %]">
188      <input class="submit" type="submit" name="action_request_for_quotation" value="[% 'Request for Quotation' | $T8 %]">
189     [%- END %]
190     [%- END %]
191   [%- END %]
192 [%- END %]
193 <input type="hidden" name="action" value="dispatcher">
194 <input type="hidden" name="saved_xyznumber" value="[% HTML.escape(saved_xyznumber) %]">
195 <input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
196 <input type="hidden" name="callback" value="[% callback | html %]">
197 [% IF vc == 'customer' %]
198   <input type="hidden" name="customer_discount" value="[% HTML.escape(customer_discount) %]">
199 [% ELSE %]
200   <input type="hidden" name="vendor_discount" value="[% HTML.escape(vendor_discount) %]">
201 [% END %]
202
203 </form>
204 <script type='text/javascript'>
205  $(kivi.SalesPurchase.init_on_submit_checks);
206 </script>