E-Mail-Journal: Journal anzeigen, Eintrag anzeigen, Anhänge herunterladen
[kivitendo-erp.git] / templates / webpages / sepa / bank_transfer_edit.html
index a534d1a..37f1575 100644 (file)
@@ -1,6 +1,7 @@
 [%- USE T8 %]
 [% USE HTML %]
 [% USE LxERP %]
+[%- USE L %]
 [% IF vc == 'vendor' %]
  [% SET is_vendor = 1 %]
  [% SET arap = 'ap' %]
@@ -10,9 +11,7 @@
  [% SET arap = 'ar' %]
  [% SET iris = 'is' %]
 [%- END %]
-<body>
-
- <p><div class="listtop">[% title %]: [% HTML.escape(export.ids.join(', ')) %]</div></p>
+<h1>[% title %]: [% HTML.escape(export.ids.join(', ')) %]</h1>
 
  <form action="sepa.pl" method="post">
   <input type="hidden" name="action" value="dispatcher">
       <th class="listheading" colspan="2">[% 'Source bank account' | $T8 %]</th>
      [%- END %]
      <th class="listheading" align="right">[% 'Amount' | $T8 %]</th>
+     <th class="listheading" align="right">[% 'Skonto amount' | $T8 %]</th>
+     <th class="listheading" align="right">[% 'Payment type' | $T8 %]</th>
+     [% IF vc == 'customer' %]
+      <th class="listheading" align="right">[% 'Mandator ID' | $T8 %]</th>
+     [%- END %]
      <th class="listheading">[% 'Reference' | $T8 %]</th>
      <th class="listheading" align="right">[% 'Requested execution date' | $T8 %]</th>
      <th class="listheading" align="right">[% 'Execution date' | $T8 %]</th>
      <th class="listheading">[% 'IBAN' | $T8 %]</th>
      <th class="listheading">[% 'BIC' | $T8 %]</th>
      [%- IF show_post_payments_button %]
-      <th class="listheading" colspan="3">&nbsp;</th>
+      <th class="listheading" colspan="[% IF vc == 'customer' %]6[% ELSE %]5[% END %]">&nbsp;</th>
       <th class="listheading">
-       <input name="set_all_execution_date" id="set_all_execution_date" size="11">
-       <input type="button" name="set_all_execution_date_trigger" id="set_all_execution_date_trigger" value="?">
+        [% L.date_tag('set_all_execution_date', '', onchange='set_all_execution_date_fields(this);') %]
       </th>
      [%- ELSE %]
       <th class="listheading" colspan="4">&nbsp;</th>
       <td>[% HTML.escape(item.vc_iban) %]</td>
       <td>[% HTML.escape(item.vc_bic) %]</td>
       <td align="right">[% HTML.escape(LxERP.format_amount(item.amount, 2)) %]</td>
+      <td align="right">[% HTML.escape(LxERP.format_amount(item.skonto_amount, 2)) %]</td>
+      <td align="right">[% item.payment_type | $T8 %]</td>
+      [% IF vc == 'customer' %]
+       <td>[% HTML.escape(item.mandator_id) %]</td>
+      [%- END %]
       <td>[% HTML.escape(item.reference) %]</td>
       <td align="right">[% HTML.escape(item.requested_execution_date) %]</td>
       <td align="right" nowrap>
@@ -82,9 +90,7 @@
        [%- ELSIF item.export_closed %]
         [% 'not executed' | $T8 %]
        [%- ELSE %]
-        <input name="items[].execution_date" id="execution_date_[% loop.count %]" size="11"
-               value="[% IF item.requested_execution_date %][% HTML.escape(item.requested_execution_date) %][% ELSE %][% HTML.escape(current_date) %][% END %]">
-        <input type="button" name="execution_date_[% loop.count %]_trigger" id="execution_date_[% loop.count %]_trigger" value="?">
+         [% L.date_tag('items[].execution_date', item.requested_execution_date || current_date) %]
        [%- END %]
       </td>
      </tr>
    <input type="submit" class="submit" name="action_bank_transfer_post_payments" value="[% 'Post payments' | $T8 %]">
   </p>
 
-  <script type="text/javascript" src="js/jquery.js"></script>
   <script type="text/javascript">
    <!--
-    function set_all_execution_date_fields() {
-      var new_date = $('#set_all_execution_date').attr('value');
+    function set_all_execution_date_fields(input) {
+      var new_date = $(input).val();
       $('INPUT[name="items[].execution_date"]').each(function() {
-        $(this).attr('value', new_date);
+        $(this).val(new_date);
       });
     }
 
-    $(document).ready(function() {
-      $("#select_all").click(function() {
-        var checked = $(this).attr('checked');
-        $('INPUT[name="items[].selected"]').each(function() {
-          $(this).attr('checked', checked);
-        });
-      });
-
-      [%- IF show_post_payments_button %]
-       Calendar.setup({ inputField : "set_all_execution_date",
-                        ifFormat   : "[% myconfig_jsc_dateformat %]",
-                        align      : "BL",
-                        button     : "set_all_execution_date_trigger",
-                        onUpdate   : set_all_execution_date_fields });
-
-       [%- FOREACH item = export.items %]
-        [%- IF !item.executed %]
-         Calendar.setup({ inputField : "execution_date_[% loop.count %]",
-                          ifFormat   : "[% myconfig_jsc_dateformat %]",
-                          align      : "BL",
-                          button     : "execution_date_[% loop.count %]_trigger" });
-        [%- END %]
-       [%- END %]
-      [%- END %]
+    $(function() {
+      $("#select_all").checkall('INPUT[name="items[].selected"]');
     });
      -->
   </script>
 
      <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
  </form>
-
-</body>
-</html>