BankTransaction: vergessene Textübersetzung bei Buchung erstellen
[kivitendo-erp.git] / templates / webpages / bank_transactions / create_invoice.html
index 818f01f..2af7755 100644 (file)
@@ -1,6 +1,6 @@
-[%- USE HTML %][%- USE L %][%- USE LxERP %][%- USE T8 %][%- USE P -%]
+[%- USE HTML %][%- USE L %][%- USE LxERP %][%- USE P -%]
 
-  <b>Transaction</b>
+  <b>[% LxERP.t8("Bank transaction") %]</b>
   <table>
    <tr class="listheading">
     <td>[%- LxERP.t8("ID") %]:</td>
 
 
 <br>
-[% 'Vendor filter for AP transaction drafts' | $T8 %]:
-
-<form method="post" action="javascript:filter_drafts();">
-[% L.hidden_tag('bt_id', SELF.transaction.id) %]
-  <table>
-   <tr>
-    <th align="right">[%- LxERP.t8("Vendor") %]</th>
-    <td>[% P.input_tag("vendor", vendor_name, class="initial_focus", style="width: 250px") %]</td>
-   </tr>
-  </table>
-</form>
 
+<form method="post" action="javascript:kivi.BankTransaction.filter_templates()" id="create_invoice_window_form">
+ [% L.hidden_tag("bt_id",               SELF.transaction.id) %]
+ [% L.hidden_tag("filter.bank_account", FORM.filter.bank_account) %]
+ [% L.hidden_tag("filter.fromdate",     FORM.filter.fromdate) %]
+ [% L.hidden_tag("filter.todate",      FORM.filter.todate) %]
+ <table>
+  <tr>
+   <th align="right">[%- LxERP.t8("Template Description") %]</th>
+   <td>[% P.input_tag("template", template_name, style="width: 250px") %]</td>
+  </tr>
+  <tr>
+   <th align="right">[%- LxERP.t8("Vendor") %]</th>
+   <td>[% P.input_tag("vendor", vendor_name,  style="width: 250px") %]</td>
+  </tr>
+  <tr>
+   <th align="right">[%- LxERP.t8("Reference") %]</th>
+   <td>[% P.input_tag("reference", reference_name, style="width: 250px") %]</td>
+  </tr>
+ </table>
   <p>
+   [% P.submit_tag('', LxERP.t8("Filter")) %]
+   [% P.button_tag('$("#create_invoice_window_form").resetForm()', LxERP.t8('Reset')) %]
    <a href="#" onclick="$('#create_invoice_window').dialog('close');">[% LxERP.t8("Cancel") %]</a>
   </p>
-
+</form>
   <hr>
-<div id="drafts">
-[% IF DRAFTS.size %]
-[% 'Draft suggestions' | $T8 %]:
-
-
-  <table>
-   <tr>
-    <th class="listheading">[% 'Description' | $T8 %]</th>
-    <th class="listheading">[% 'Vendor' | $T8 %]</th>
-    <th class="listheading">[% 'Employee' | $T8 %]</th>
-    <th class="listheading">[% 'Draft from:' | $T8 %]</th>
-   </tr>
-
-   [% FOREACH draft = DRAFTS %]
-    <tr class="listrow[% loop.count % 2 %]">
-     <td><a href="controller.pl?action=Draft/load&id=[% HTML.url(draft.id) %]&form.amount_1=[% LxERP.format_amount(-1 * SELF.transaction.amount, 2) %]&form.transdate=[% HTML.url(SELF.transaction.transdate_as_date) %]&form.duedate=[% HTML.url(SELF.transaction.transdate_as_date) %]&form.datepaid_1=[% HTML.url(SELF.transaction.transdate_as_date) %]&form.paid_1=[% LxERP.format_amount(-1 * SELF.transaction.amount, 2) %]&form.currency=[% HTML.url(SELF.transaction.currency.name) %]&form.AP_paid_1=[% HTML.url(SELF.transaction.local_bank_account.chart.accno) %]&form.callback=[% HTML.url(callback) %]">[% HTML.escape(draft.description) %]</a></td>
-     <td>[% HTML.escape(draft.vendor) %]</td>
-     <td>[% HTML.escape(draft.employee.name) %]</td>
-     <td>[% HTML.escape(draft.itime_as_date) %]</td>
-    </tr>
-   [% END %]
-  </table>
-[% ELSE %]
-  <p class="message_hint">[% 'No draft was found.' | $T8 %]</p>
-[% END %]
+<div id="templates">
+ [% PROCESS "bank_transactions/_template_list.html" %]
 </div>
 
 <script type="text/javascript">
 <!--
+$(function() {
+  $('#template').focus();
+});
 
-function filter_drafts() {
-  var url="controller.pl?action=BankTransaction/filter_drafts&" + $("#create_invoice_window form").serialize();
-  $.ajax({
-    url: url,
-    success: function(new_data) {
-      $("#drafts").html(new_data['html']);
-    }
-  });
-}
 //-->
 </script>