Massenkonvertierung von Lieferscheinen nach Rechnung ink. Druck
[kivitendo-erp.git] / templates / webpages / mass_invoice_create_print_from_do / list_invoices.html
diff --git a/templates/webpages/mass_invoice_create_print_from_do/list_invoices.html b/templates/webpages/mass_invoice_create_print_from_do/list_invoices.html
new file mode 100644 (file)
index 0000000..8bec62a
--- /dev/null
@@ -0,0 +1,77 @@
+[% USE HTML %][% USE L %][% USE LxERP %]
+
+<h1>[% FORM.title %]</h1>
+
+[%- INCLUDE "common/flash.html" %]
+
+[% LIST_ACTION     = 'action_list_invoices' %]
+[%- PROCESS 'mass_invoice_create_print_from_do/_filter.html' filter=SELF.filter %]
+
+[% IF noshow == 1 %]
+[% invoices = SELF.invoice_models.get;
+   MODELS          = SELF.invoice_models %]
+[%- IF !invoices.size %]
+ <p>
+  [%- LxERP.t8("There are currently no open invoices, or none matches your filter conditions.") %]
+ </p>
+[%- ELSE %]
+
+ <form method="post" action="controller.pl">
+  <table width="100%">
+   <thead>
+    <tr class="listheading">
+     <th>[% L.checkbox_tag("", id="check_all", checkall="[data-checkall=1]") %]</th>
+     <th>[% L.sortable_table_header("transdate") %]</th>
+     <th>[% L.sortable_table_header("reqdate") %]</th>
+     <th>[% L.sortable_table_header("invnumber") %]</th>
+     <th>[% L.sortable_table_header("donumber") %]</th>
+     <th>[% L.sortable_table_header("customer") %]</th>
+     <th>[% LxERP.t8("Shipto") %]</th>
+    </tr>
+   </thead>
+
+   <tbody>
+    [%- FOREACH invoice = invoices %]
+     [% invoice_id = invoice.id
+        delivery_order    = invoice.delivery_order %]
+     <tr class="listrow">
+      <td>[% L.checkbox_tag('id[]', value=invoice.id, "data-checkall"=1, checked=selected_ids.$invoice_id) %]</td>
+      <td>[% HTML.escape(invoice.transdate_as_date) %]</td>
+      <td>[% HTML.escape(invoice.deliverydate_as_date) %]</td>
+      <td>[% L.link(SELF.url_for(controller="is.pl", action="edit", type="sales_invoice", id=invoice.id), invoice.invnumber) %]</td>
+      <td>
+       [% IF delivery_order %]
+        [% L.link(SELF.url_for(controller="do.pl", action="edit", id=delivery_order.id), delivery_order.donumber) %]
+       [% ELSE %]
+        [% HTML.escape(invoice.donumber) %]
+       [% END %]
+      </td>
+      <td>[% HTML.escape(invoice.customer.name) %]</td>
+      <td>[% HTML.escape(SELF.make_shipto_title(invoice.shipto || delivery_order.custom_shipto)) %]</td>
+     </tr>
+    [%- END %]
+   </tbody>
+  </table>
+
+  [% IF !SELF.invoice_ids.size %]
+   [% L.paginate_controls %]
+  [% END %]
+
+  <hr size="3" noshade>
+
+  [% IF SELF.printers.size %]
+   <p>
+    [% LxERP.t8("Print destination") %]:
+    [% SET  printers = [ { description=LxERP.t8("Download PDF, do not print") } ] ;
+       CALL printers.import(SELF.printers);
+       L.select_tag("printer_id", printers, title_key="description", default=FORM.printer_id) %]
+   </p>
+  [% END %]
+
+  <p>
+   [% L.hidden_tag("action", "MassInvoiceCreatePrint/dispatch") %]
+   [% L.submit_tag("action_print", LxERP.t8("Print")) %]
+  </p>
+ </form>
+[%- END %]
+[%- END %]