Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / oe / form_footer.html
index 8e4ad3c..14f2954 100644 (file)
@@ -2,6 +2,15 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE L %]
+[%- IF is_req_quo || is_pur_ord %]
+  [%- SET allow_invoice=1 %]
+[%- ELSIF is_sales_quo && INSTANCE_CONF.get_allow_sales_invoice_from_sales_quotation %]
+  [%- SET allow_invoice=1 %]
+[%- ELSIF is_sales_ord && INSTANCE_CONF.get_allow_sales_invoice_from_sales_order %]
+  [%- SET allow_invoice=1 %]
+[%- ELSE %]
+  [%- SET allow_invoice=0 %]
+[%- END %]
   <tr>
     <td>
       <table width="100%">
                 <th align="left">[% 'Internal Notes' | $T8 %]</th>
               </tr>
               <tr valign="top">
-                <td>[% notes %]</td>
-                <td>[% intnotes %]</td>
+                <td>[% L.textarea_tag('notes',    notes,    style="width: 350px; height: 150px", class="texteditor") %]</td>
+                <td>[% L.textarea_tag('intnotes', intnotes, style="width: 350px; height: 150px") %]</td>
               </tr>
               <tr>
                 <th align="right">[% 'Payment Terms' | $T8 %]</th>
-                <td>
-                      [%- INCLUDE 'generic/multibox.html'
-                           name       = 'payment_id',
-                           style      = 'width: 250px',
-                           DATA       = ALL_PAYMENTS,
-                           id_key     = 'id',
-                           label_key  = 'description',
-                           show_empty = 1 -%]
-                </td>
-            </tr>
+                <td>[% L.select_tag('payment_id', ALL_PAYMENTS, default = payment_id, title_key = 'description', with_empty = 1, style="width: 250px") %]</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', style = 'width: 250px') %]</td>
+              </tr>
 
 [%- IF is_sales_ord %]
             <tr>
@@ -36,6 +41,7 @@
               [% L.button_tag("edit_periodic_invoices_config(); return false;", LxERP.t8('Configure')) %]
               ([% HTML.escape(periodic_invoices_status) %])
               [% L.hidden_tag("periodic_invoices_config", periodic_invoices_config) %]
+              <a href="doc/html/ch03.html#features.periodic-invoices.variables" target="_blank">?</a>
              </td>
             </tr>
 [%- END %]
               </tr>
 [%- END %]
               [% tax %]
+[%- IF rounding %]
+              <tr>
+                <th align='right'>[% 'Rounding' | $T8 %]</th>
+                <td align='right'>[% LxERP.format_amount(rounding, 2) %]</td>
+              </tr>
+[%- END %]
               <tr>
                 <th align="right">[% 'Total' | $T8 %]</th>
                 <td align="right">[% LxERP.format_amount(invtotal, 2) %]
 </div>
 </div>
 
-<hr size="3" noshade>
-
-<p>[% print_options %]</p>
-
-[% label_edit %]<br>
-<input class="submit" type="submit" name="action_update" id="update_button" value="[% 'Update' | $T8 %]">
-<input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]">
-<input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]">
-<input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]">
-<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]">
-<input class="submit" type="submit" name="action_save_and_close" value="[% 'Save and Close' | $T8 %]">
-
-[%- IF id %]
-  <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
-  <input type="button" class="submit" onclick="set_history_window([% HTML.escape(id) %])" name="history" id="history" value="[% 'history' | $T8 %]">
-
-  <br>[% label_workflow %]<br>
-  <input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]">
-
-  [%- UNLESS (is_sales_ord && !INSTANCE_CONF.get_sales_order_show_delete) || (is_pur_ord && !INSTANCE_CONF.get_purchase_order_show_delete) %]
-    <input class="submit" type="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
-  [%- END %]
-
-  [%- IF is_sales_quo %]
-    <input class="submit" type="submit" name="action_sales_order" value="[% 'Sales Order' | $T8 %]">
-  [%- END %]
-
-  [%- IF is_req_quo %]
-    <input class="submit" type="submit" name="action_purchase_order" value="[% 'Purchase Order' | $T8 %]">
-  [%- END %]
-
-  [%- IF is_sales_ord || is_pur_ord %]
-    <input class="submit" type="submit" name="action_delivery_order" value="[% 'Delivery Order' | $T8 %]">
-  [%- END %]
-
-  <input class="submit" type="submit" name="action_invoice" value="[% 'Invoice' | $T8 %]">
-
-  [%- IF is_sales_ord || is_pur_ord %]
-    <br>[% heading %] als neue Vorlage verwenden f&uuml;r<br>
-    [%- IF is_sales_ord %]
-      <input class="submit" type="submit" name="action_purchase_order" value="[% 'Purchase Order' | $T8 %]">
-     <input class="submit" type="submit" name="action_quotation" value="[% 'Quotation' | $T8 %]">
-    [%- ELSE %]
-    [%- IF is_pur_ord %]
-      <input class="submit" type="submit" name="action_sales_order" value="[% 'Sales Order' | $T8 %]">
-     <input class="submit" type="submit" name="action_request_for_quotation" value="[% 'Request for Quotation' | $T8 %]">
-    [%- END %]
-    [%- END %]
-  [%- END %]
-[%- END %]
-<input type="hidden" name="action" value="dispatcher">
 <input type="hidden" name="saved_xyznumber" value="[% HTML.escape(saved_xyznumber) %]">
-<input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
+[% L.hidden_tag("rowcount", rowcount) %]
 <input type="hidden" name="callback" value="[% callback | html %]">
 [% IF vc == 'customer' %]
   <input type="hidden" name="customer_discount" value="[% HTML.escape(customer_discount) %]">
   <input type="hidden" name="vendor_discount" value="[% HTML.escape(vendor_discount) %]">
 [% END %]
 
+<div id="shipto_inputs" class="hidden">
+ [%- PROCESS 'common/_ship_to_dialog.html' cvars=shipto_cvars %]
+</div>
+
+<div id="email_inputs" class="hidden"></div>
+
+<div id="print_options" class="hidden">
+ [% print_options %]
+</div>
 </form>
+
+<div id="shipto_dialog" class="hidden"></div>
+<div id="print_dialog" class="hidden">
+ [%- PROCESS 'common/_print_dialog.html' %]
+</div>