Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
[kivitendo-erp.git] / templates / webpages / sepa / bank_transfer_edit.html
index 28b17ed..1ab516e 100644 (file)
@@ -1,7 +1,16 @@
 [%- USE T8 %]
 [% USE HTML %]
 [% USE LxERP %]
-<body>
+[%- USE L %]
+[% IF vc == 'vendor' %]
+ [% SET is_vendor = 1 %]
+ [% SET arap = 'ap' %]
+ [% SET iris = 'ir' %]
+[% ELSE %]
+ [% SET is_vendor = 0 %]
+ [% SET arap = 'ar' %]
+ [% SET iris = 'is' %]
+[%- END %]
 
  <p><div class="listtop">[% title %]: [% HTML.escape(export.ids.join(', ')) %]</div></p>
 
       <th class="listheading" align="center"><input type="checkbox" id="select_all"></th>
      [%- END %]
      <th class="listheading">[% 'Invoice' | $T8 %]</th>
-     <th class="listheading">[% 'Vendor' | $T8 %]</th>
-     <th class="listheading" colspan="2">[% 'Source bank account' | $T8 %]</th>
-     <th class="listheading" colspan="2">[% 'Target bank account' | $T8 %]</th>
+     <th class="listheading">[%- IF is_vendor %][% 'Vendor' | $T8 %][%- ELSE %][%- LxERP.t8('Customer') %][%- END %]</th>
+     [%- IF is_vendor %]
+      <th class="listheading" colspan="2">[% 'Source bank account' | $T8 %]</th>
+      <th class="listheading" colspan="2">[% 'Target bank account' | $T8 %]</th>
+     [%- ELSE %]
+      <th class="listheading" colspan="2">[% 'Target bank account' | $T8 %]</th>
+      <th class="listheading" colspan="2">[% 'Source bank account' | $T8 %]</th>
+     [%- END %]
      <th class="listheading" align="right">[% 'Amount' | $T8 %]</th>
      <th class="listheading">[% 'Reference' | $T8 %]</th>
      <th class="listheading" align="right">[% 'Requested execution date' | $T8 %]</th>
@@ -32,8 +46,7 @@
      [%- IF show_post_payments_button %]
       <th class="listheading" colspan="3">&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') %]
       </th>
      [%- ELSE %]
       <th class="listheading" colspan="4">&nbsp;</th>
        </td>
       [%- END %]
       <td>
-       <a href="[% IF item.invoice %]ir[% ELSE %]ap[% END %].pl?action=edit&type=invoice&id=[% HTML.url(item.ap_id) %]">[% HTML.escape(item.invnumber) %]</a>
+       <a href="[% IF item.invoice %][% iris %][% ELSE %][% arap %][% END %].pl?action=edit&type=invoice&id=[% IF is_vendor %][% HTML.url(item.ap_id) %][% ELSE %][% HTML.url(item.ar_id) %][% END %]">[% HTML.escape(item.invnumber) %]</a>
       </td>
-      <td>[% HTML.escape(item.vendor_name) %]</td>
+      <td>[% HTML.escape(item.vc_name) %]</td>
       <td>[% HTML.escape(item.our_iban) %]</td>
       <td>[% HTML.escape(item.our_bic) %]</td>
-      <td>[% HTML.escape(item.vendor_iban) %]</td>
-      <td>[% HTML.escape(item.vendor_bic) %]</td>
+      <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>[% HTML.escape(item.reference) %]</td>
       <td align="right">[% HTML.escape(item.requested_execution_date) %]</td>
@@ -68,9 +81,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>
           $(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 %]
     });
      -->
   </script>
     [%- END %]
    [%- END %]
   [%- END %]
+
+     <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
  </form>
 
-</body>
-</html>