Merge branch 'test' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / is / form_footer.html
index 79bbdb1..7c749cf 100644 (file)
@@ -1,7 +1,7 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE LxERP %]
-[%- USE L %]
+[%- USE L %][%- USE P -%]
   <tr>
    <td>
     <table width="100%">
         <tr>
          <th align="left">[% 'Notes (will appear on hard copy)' | $T8 %]</th>
          <th align="left">[% 'Internal Notes' | $T8 %]</th>
-         <th align="right">[% 'Payment Terms' | $T8 %]</th>
+         <th align="right">[% 'Payment / Delivery Options' | $T8 %]</th>
         </tr>
         <tr valign="top">
          <td>
-          <textarea name="notes" rows="[% rows %]" cols="26">[% notes %]</textarea>
+          [% L.textarea_tag("notes", notes, wrap="soft", style="width: 350px; height: 150px", class="texteditor") %]
          </td>
          <td>
-          <textarea name="intnotes" rows="[% rows %]" cols="35">[% intnotes %]</textarea>
+          [% L.textarea_tag("intnotes", intnotes, wrap="soft", style="width: 350px; height: 150px") %]
          </td>
          <td>
-            [%- INCLUDE 'generic/multibox.html'
-                 name          = 'payment_id',
-                 style         = 'width: 250px',
-                 DATA          = payment_terms,
-                 id_key        = 'id',
-                 label_key     = 'description',
-                 show_empty    = 1
-                 allow_textbox = 0 -%]
-          <script type='text/javascript'>$('#payment_id').change(function(){ if (this.value) set_duedate()})</script>
-          <br>
-          [%- L.checkbox_tag('direct_debit', 'checked', direct_debit, 'label', LxERP.t8('direct debit')) %]
+           <table>
+             <tr>
+               <th align="right">[% 'Payment Terms' | $T8 %]</th>
+               <td>[% L.select_tag('payment_id', payment_terms, default = payment_id, title_key = 'description', with_empty = 1, style="width: 250px") %]
+                 <script type='text/javascript'>$('#payment_id').change(function(){ kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate"); })</script>
+               </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>
+             <tr>
+               <th align="right">[% 'direct debit' | $T8 %]</th>
+               <td>
+                 [%- L.checkbox_tag('direct_debit', 'checked', direct_debit) %]
+               </td>
+             </tr>
+[%- IF INSTANCE_CONF.get_create_qrbill_invoices > 0 %]
+             <tr>
+               <th align="right">[% 'QR bill without amount' | $T8 %]</th>
+               <td>
+                 [%- L.checkbox_tag('qrbill_without_amount', 'checked', qrbill_without_amount) %]
+               </td>
+             </tr>
+[%- END %]
+           </table>
          </td>
         </tr>
 [%- IF id && follow_ups.size %]
 [%- END %]
        </table>
       </td>
+[%- IF show_weight %]
+      <td>
+       <table>
+        <tr>
+         <th  align=left>[% 'Total weight' | $T8 %]</th>
+         <td>
+          [% LxERP.format_amount(totalweight) %] [% HTML.escape(weightunit) %]
+         </td>
+        </tr>
+       </table>
+      </td>
+[%- END %]
       <td>
        <table>
         <tr>
   [%- END %]
 [%- END %]
 
+[%- 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) %]</td>
     </table>
    </td>
   </tr>
-
-[% PROCESS 'webdav/_list.html' %]
-
-[% PROCESS 'is/_payments.html' %]
-
-  <tr>
-    <td><hr size="3" noshade></td>
-  </tr>
-  <tr>
-    <td>
-[% print_options %]
-    </td>
-  </tr>
- </table>
-
-
-
-  [% IF id %]
-
-    <input class="submit" type="submit" accesskey="u" name="action" id="update_button" value="[% 'Update' | $T8 %]">
-    <input class="submit" type="submit" name="action" value="[% 'Ship to' | $T8 %]">
-    <input class="submit" type="submit" name="action" value="[% 'Print' | $T8 %]">
-    <input class="submit" type="submit" name="action" value="[% 'E-mail' | $T8 %]">
-[% IF  show_storno %]
-    <input class="submit" type="submit" name="action" value="[% 'Storno' | $T8 %]">
-[% END %]
-    <input class="submit" type="submit" name="action" value="[% 'Post Payment' | $T8 %]">
-    <input class="submit" type="submit" name="action" value="[% 'Use As New' | $T8 %]">
-
-[% IF id && !is_type_credit_note %]
-    <input class="submit" type="submit" name="action" value="[% 'Credit Note' | $T8 %]">
-[% END %]
-[% IF show_delete %]
-    <input class="submit" type="submit" name="action" value="[% 'Delete' | $T8 %]">
-    <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]">
+[% IF is_type_normal_invoice OR  is_type_credit_note %]
+  [% PROCESS 'is/_payments.html' %]
 [% END %]
-    <input class="submit" type="submit" name="action" value="[% 'Order' | $T8 %]">
-    <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
-
- [% ELSE # no id %]
-   [% UNLESS locked %]
-      <input class="submit" type="submit" name="action" id="update_button" value="[% 'Update' | $T8 %]">
-      <input class="submit" type="submit" name="action" value="[% 'Ship to' | $T8 %]">
-      <input class="submit" type="submit" name="action" value="[% 'Preview' | $T8 %]">
-      <input class="submit" type="submit" name="action" value="[% 'E-mail' | $T8 %]">
-      <input class="submit" type="submit" name="action" value="[% 'Print and Post' | $T8 %]">
-      <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]">
-      <input class="submit" type="submit" name="action" value="[% 'Save Draft' | $T8 %]">
-   [%- END %]
- [% END # id %]
-
-  [% IF id %]
-      [%#- button for saving history %]
-      <input type="button" class="submit" onclick="set_history_window([% id | html %]);" name="history" id="history" value="[% 'history' | $T8 %]">
-      [% IF INSTANCE_CONF.get_is_show_mark_as_paid %]
-          <input type="submit" class="submit" name="action" value="[% 'mark as paid' | $T8 %]">
-      [% END %]
-  [% END %]
+ </table>
+</div>
+[% PROCESS 'webdav/_list.html' %]
+<div id="ui-tabs-1">
+ [% LxERP.t8('Loading...') %]
+</div>
+</div>
 
 <input type="hidden" name="rowcount" value="[% rowcount %]">
 <input type="hidden" name="callback" value="[% callback | html %]">
-<input type="hidden" name="draft_id" value="[% draft_id %]">
-<input type="hidden" name="draft_description" value="[% draft_description %]">
+[% P.hidden_tag('draft_id', draft_id) %]
+[% P.hidden_tag('draft_description', draft_description) %]
 <input type="hidden" name="customer_discount" value="[% customer_discount %]">
 <input type="hidden" name="gldate" value="[% gldate %]">
+
+[%- IF INSTANCE_CONF.get_create_qrbill_invoices <= 0 %]
+ <input type="hidden" name="qrbill_without_amount" value="[% qrbill_without_amount %]">
+[%- END %]
+
+<div id="shipto_inputs" class="hidden">
+ [%- PROCESS 'common/_ship_to_dialog.html' cvars=shipto_cvars %]
+</div>
+
+<div id="email_inputs" style="display: none"></div>
+
+<div id="print_options" style="display: none">
+ [% print_options %]
+</div>
 </form>
+<script type='text/javascript'>
+ $(kivi.SalesPurchase.init_on_submit_checks);
+</script>
+
+<div id="shipto_dialog" class="hidden"></div>
+<div id="print_dialog" class="hidden">
+ [%- PROCESS 'common/_print_dialog.html' %]
+</div>