8bec62a02981ab9038fa7d289d5f02b9d2a7f6c3
[kivitendo-erp.git] / templates / webpages / mass_invoice_create_print_from_do / list_invoices.html
1 [% USE HTML %][% USE L %][% USE LxERP %]
2
3 <h1>[% FORM.title %]</h1>
4
5 [%- INCLUDE "common/flash.html" %]
6
7 [% LIST_ACTION     = 'action_list_invoices' %]
8 [%- PROCESS 'mass_invoice_create_print_from_do/_filter.html' filter=SELF.filter %]
9
10 [% IF noshow == 1 %]
11 [% invoices = SELF.invoice_models.get;
12    MODELS          = SELF.invoice_models %]
13 [%- IF !invoices.size %]
14  <p>
15   [%- LxERP.t8("There are currently no open invoices, or none matches your filter conditions.") %]
16  </p>
17 [%- ELSE %]
18
19  <form method="post" action="controller.pl">
20   <table width="100%">
21    <thead>
22     <tr class="listheading">
23      <th>[% L.checkbox_tag("", id="check_all", checkall="[data-checkall=1]") %]</th>
24      <th>[% L.sortable_table_header("transdate") %]</th>
25      <th>[% L.sortable_table_header("reqdate") %]</th>
26      <th>[% L.sortable_table_header("invnumber") %]</th>
27      <th>[% L.sortable_table_header("donumber") %]</th>
28      <th>[% L.sortable_table_header("customer") %]</th>
29      <th>[% LxERP.t8("Shipto") %]</th>
30     </tr>
31    </thead>
32
33    <tbody>
34     [%- FOREACH invoice = invoices %]
35      [% invoice_id = invoice.id
36         delivery_order    = invoice.delivery_order %]
37      <tr class="listrow">
38       <td>[% L.checkbox_tag('id[]', value=invoice.id, "data-checkall"=1, checked=selected_ids.$invoice_id) %]</td>
39       <td>[% HTML.escape(invoice.transdate_as_date) %]</td>
40       <td>[% HTML.escape(invoice.deliverydate_as_date) %]</td>
41       <td>[% L.link(SELF.url_for(controller="is.pl", action="edit", type="sales_invoice", id=invoice.id), invoice.invnumber) %]</td>
42       <td>
43        [% IF delivery_order %]
44         [% L.link(SELF.url_for(controller="do.pl", action="edit", id=delivery_order.id), delivery_order.donumber) %]
45        [% ELSE %]
46         [% HTML.escape(invoice.donumber) %]
47        [% END %]
48       </td>
49       <td>[% HTML.escape(invoice.customer.name) %]</td>
50       <td>[% HTML.escape(SELF.make_shipto_title(invoice.shipto || delivery_order.custom_shipto)) %]</td>
51      </tr>
52     [%- END %]
53    </tbody>
54   </table>
55
56   [% IF !SELF.invoice_ids.size %]
57    [% L.paginate_controls %]
58   [% END %]
59
60   <hr size="3" noshade>
61
62   [% IF SELF.printers.size %]
63    <p>
64     [% LxERP.t8("Print destination") %]:
65     [% SET  printers = [ { description=LxERP.t8("Download PDF, do not print") } ] ;
66        CALL printers.import(SELF.printers);
67        L.select_tag("printer_id", printers, title_key="description", default=FORM.printer_id) %]
68    </p>
69   [% END %]
70
71   <p>
72    [% L.hidden_tag("action", "MassInvoiceCreatePrint/dispatch") %]
73    [% L.submit_tag("action_print", LxERP.t8("Print")) %]
74   </p>
75  </form>
76 [%- END %]
77 [%- END %]