Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / shop_order / _transfer_status.html
diff --git a/templates/webpages/shop_order/_transfer_status.html b/templates/webpages/shop_order/_transfer_status.html
new file mode 100644 (file)
index 0000000..24b7bf9
--- /dev/null
@@ -0,0 +1,59 @@
+[%- USE LxERP -%][%- USE L -%][%- USE HTML -%]
+[% SET data = job.data_as_hash %]
+
+<h2>[% LxERP.t8("Watch status") %]</h2>
+
+[% L.hidden_tag('', job.id, id="smt_job_id") %]
+
+JOBID: [% job.id %] <p>
+ [% LxERP.t8("This status output will be refreshed every five seconds.") %]
+</p>
+<p>
+</p>
+<p>
+ [% L.link("#", LxERP.t8("Close window"), onclick="kivi.ShopOrder.processClose();") %]
+ <table>
+  <tr>
+   <th valign="top" align="left">[% LxERP.t8("Current status:") %]</th>
+   <td valign="top">
+    [% IF !data.status %]
+     [% LxERP.t8("waiting for job to be started") %]
+    [% ELSIF data.status == 1 %]
+     [% LxERP.t8("Converting to deliveryorder") %]
+     [% ELSE %]
+     [% LxERP.t8("Done.") %]
+    [% END %]
+   </td>
+  </tr>
+  <tr>
+   <th valign="top" align="left">[% LxERP.t8("Number of orders created:") %]</th>
+   <td valign="top">[% IF data.status > 0 %][% HTML.escape(data.num_order_created) %] / [% HTML.escape(data.shop_order_record_ids.size) %][% ELSE %]–[% END %]</td>
+  </tr>
+
+
+  <tr>
+   <th valign="top" align="left">[% LxERP.t8("Errors during conversion:") %]</th>
+   <td valign="top">
+[% IF !data.status %]
+  –
+[% ELSIF !data.conversion_errors.size %]
+ [% LxERP.t8("No errors have occurred.") %]
+[% ELSE %]
+    <table>
+     <tr class="listheader">
+      <th>[% LxERP.t8("Shoporder") %]</th>
+      <th>[% LxERP.t8("Error") %]</th>
+     </tr>
+
+ [% FOREACH error = data.conversion_errors %]
+     <tr>
+      <td valign="top">[% HTML.escape(error.number) %]</td>
+      <td valign="top">[% FOREACH message = error.message %][% HTML.escape(message) %]<br>[% END %]</td>
+     </tr>
+ [% END %]
+    </table>
+[% END %]
+   </td>
+  </tr>
+ </table>
+</p>