1 [%- USE LxERP -%][%- USE L -%][%- USE HTML -%]
2 [% SET data = job.data_as_hash %]
3 <h2>[% LxERP.t8("Step 2 -- Watch status") %]</h2>
5 [% L.hidden_tag('', job.id, id="cpa_job_id") %]
8 [% LxERP.t8("This status output will be refreshed every five seconds.") %]
12 [% IF data.status < 3 %]
13 [% L.link("login.pl?action=company_logo", LxERP.t8("Open new tab"), target="_blank") %]
16 [% IF data.pdf_file_name %]
17 [% L.link(SELF.url_for(action="create_print_all_download", job_id=job.id), LxERP.t8("Download PDF")) %]
19 [% L.link("#", LxERP.t8("Close window"), onclick="kivi.MassInvoiceCreatePrint.createPrintAllFinishProcess();") %]
26 <th valign="top" align="left">[% LxERP.t8("Current status:") %]</th>
29 [% LxERP.t8("waiting for job to be started") %]
30 [% ELSIF data.status == 1 %]
31 [% LxERP.t8("Creating invoices") %]
32 [% ELSIF data.status == 2 %]
33 [% LxERP.t8("Printing invoices (this can take a while)") %]
35 [% LxERP.t8("Done.") %]
36 [% IF data.pdf_file_name %]
37 [% LxERP.t8("The file is available for download.") %]
38 [% ELSIF data.printer_id %]
39 [% LxERP.t8("The file has been sent to the printer.") %]
46 <th valign="top" align="left">[% LxERP.t8("Number of invoices created:") %]</th>
47 <td valign="top">[% IF data.status > 0 %][% HTML.escape(data.num_created) %] / [% HTML.escape(data.record_ids.size) %][% ELSE %]–[% END %]</td>
51 <th valign="top" align="left">[% LxERP.t8("Number of invoices printed:") %]</th>
52 <td valign="top">[% IF data.status > 1 %][% HTML.escape(data.num_printed) %] / [% HTML.escape(data.invoice_ids.size) %][% ELSE %]–[% END %]</td>
56 <th valign="top" align="left">[% LxERP.t8("Errors during conversion:") %]</th>
60 [% ELSIF !data.conversion_errors.size %]
61 [% LxERP.t8("No errors have occurred.") %]
64 <tr class="listheader">
65 <th>[% LxERP.t8("Delivery Order") %]</th>
66 <th>[% LxERP.t8("Error") %]</th>
69 [% FOREACH error = data.conversion_errors %]
71 <td valign="top">[% IF error.id %][% L.link(SELF.url_for(controller='do.pl', action='edit', type='sales_delivery_order', id=error.id), HTML.escape(error.number), target="_blank") %][% ELSE %]–[% END %]</td>
72 <td valign="top">[% HTML.escape(error.message) %]</td>
81 <th valign="top" align="left">[% LxERP.t8("Errors during printing:") %]</th>
83 [% IF data.status < 2 %]
85 [% ELSIF !data.print_errors.size %]
86 [% LxERP.t8("No errors have occurred.") %]
89 <tr class="listheader">
90 <th>[% LxERP.t8("Invoice") %]</th>
91 <th>[% LxERP.t8("Error") %]</th>
94 [% FOREACH error = data.print_errors %]
96 <td valign="top">[% IF error.id %][% L.link(SELF.url_for(controller='is.pl', action='edit', type='sales_invoice',id=error.id), HTML.escape(error.number), target="_blank") %][% ELSE %]–[% END %]</td>
97 <td valign="top">[% HTML.escape(error.message) %]</td>