PriceRule: Erste Version
[kivitendo-erp.git] / templates / webpages / sepa / bank_transfer_add.html
index 41a8ff0..d09a489 100644 (file)
@@ -9,8 +9,7 @@
  [% SET arap = 'ar' %]
  [% SET iris = 'is' %]
 [%- END %]
-
- <p><div class="listtop">[% title %]</div></p>
+<h1>[% title %]</h1>
 
  <form action="sepa.pl" method="post">
   <p>
      <tr class="listrow[% loop.count % 2 %]">
       <td align="center">
        [%- IF invoice.vc_bank_info_ok %]
-        <input type="checkbox" name="bank_transfers[].selected" value="1">
+        <input type="checkbox" name="bank_transfers[].selected" value="1"[% IF invoice.checked %] checked[% END %]>
        [%- END %]
       </td>
       <td>
        [%- IF loop.first || (previous_vcname != invoice.vcname) %]
-        <a href="ct.pl?action=edit&db=[% vc %]&id=[% HTML.url(invoice.vc_id) %]&callback=[% HTML.url('sepa.pl?action=bank_transfer_add&vc=' _ vc) %]">
+        <a href="controller.pl?action=CustomerVendor/edit&db=[% vc %]&id=[% HTML.url(invoice.vc_id) %]&callback=[% HTML.url('sepa.pl?action=bank_transfer_add&vc=' _ vc) %]">
          [%- GET HTML.escape(invoice.vcname);
              SET previous_vcname = invoice.vcname;
              IF !invoice.vc_bank_info_ok;
       <td align="right">[% LxERP.format_amount(invoice.invoice_amount, -2) %]</td>
       <td align="right">[% LxERP.format_amount(invoice.open_amount, -2) %]</td>
       <td align="right">[% invoice.duedate %]</td>
-      <td><input name="bank_transfers[].reference" value="[% HTML.escape(invoice.reference_prefix _ invoice.invnumber) %]"></td>
+      <td>
+       [%- SET reference = invoice.reference_prefix _ invoice.invnumber %]
+       <input name="bank_transfers[].reference" value="[% HTML.escape(reference.substr(0, 140)) %]" maxlength="140" size="60">
+      </td>
       <td align="right">
-       <input name="bank_transfers[].amount" value="[% LxERP.format_amount(invoice.invoice_amount, -2) %]" style="text-align: right">
+       <input name="bank_transfers[].amount" value="[% LxERP.format_amount(invoice.invoice_amount, 2) %]" style="text-align: right" size="12">
       </td>
      </tr>
     [%- END %]
     <sup>(1)</sup>
     [%- IF is_vendor %]
      [%- 'No bank information has been entered in this vendor\'s master data entry. You cannot create bank transfers unless you enter bank information.' | $T8 %]
+     [% "The required information consists of the IBAN and the BIC." | $T8 %]
     [%- ELSE %]
      [%- 'No bank information has been entered in this customer\'s master data entry. You cannot create bank collections unless you enter bank information.' | $T8 %]
+     [% "The required information consists of the IBAN, the BIC, the mandator ID and the mandate's date of signature." | $T8 %]
     [%- END %]
    </p>
   [%- END %]
   <input type="hidden" name="vc" value="[%- HTML.escape(vc) %]">
  </form>
 
- <script type="text/javascript" src="js/jquery.js"></script>
  <script type="text/javascript">
   <!--
-    $(document).ready(function() {
-      $("#select_all").click(function() {
-        var checked = $(this).attr('checked');
-        $('INPUT[name="bank_transfers[].selected"]').each(function() {
-          $(this).attr('checked', checked);
-        });
-      });
+    $(function() {
+      $("#select_all").checkall('INPUT[name="bank_transfers[].selected"]');
     });
     -->
  </script>
-