Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / custom_data_export_designer / edit.html
diff --git a/templates/webpages/custom_data_export_designer/edit.html b/templates/webpages/custom_data_export_designer/edit.html
new file mode 100644 (file)
index 0000000..9b8f68c
--- /dev/null
@@ -0,0 +1,49 @@
+[% USE HTML %][% USE L %][% USE LxERP %]
+
+<h1>[% FORM.title %] — [% LxERP.t8("Step #1/#2", 1, 2) %] — [% LxERP.t8("Basic Data") %]</h1>
+
+[%- INCLUDE 'common/flash.html' %]
+
+<form method="post" action="controller.pl" id="form">
+ [% L.hidden_tag("id", SELF.query.id) %]
+
+ <table>
+  <tr>
+   <th align="right">[%- LxERP.t8("Name") %]</th>
+   <td>[% L.input_tag("query.name", SELF.query.name, style="width: 800px", "data-validate"="required") %]</td>
+  </tr>
+
+  <tr>
+   <th align="right">[%- LxERP.t8("Required access right") %]</th>
+   <td>[% L.select_tag("query.access_right", SELF.access_rights, default=SELF.query.access_right, style="width: 800px") %]</td>
+  </tr>
+
+  <tr>
+   <th valign="top" align="right">[%- LxERP.t8("Description") %]</th>
+   <td valign="top">[% L.textarea_tag("query.description", SELF.query.description, rows=5, style="width: 800px") %]</td>
+  </tr>
+
+  <tr>
+   <th valign="top" align="right">[%- LxERP.t8("SQL query") %]</th>
+   <td valign="top">[% L.textarea_tag("query.sql_query", SELF.query.sql_query, rows=20, style="width: 800px", "data-validate"="required") %]</td>
+  </tr>
+ </table>
+</form>
+
+<p>
+ [% LxERP.t8("The SQL query can be parameterized with variables named as follows: <%name%>.") %]
+ [% LxERP.t8("On the next page the type of all variables can be set.") %]
+ [% LxERP.t8("Note that parameter names must not be quoted.") %]
+ [% LxERP.t8("Example") %]:
+</p>
+
+<pre>
+SELECT extract(YEAR FROM oe.transdate) AS &quot;Jahr&quot;, SUM(oe.amount) AS &quot;Angebotssumme&quot;
+FROM oe
+LEFT JOIN employee ON (oe.employee_id = employee.id)
+WHERE (oe.customer_id IS NOT NULL)
+  AND COALESCE(oe.quotation, FALSE)
+  AND (employee.login = &lt;%Benutzer-Login%&gt;)
+GROUP BY &quot;Jahr&quot;
+ORDER BY &quot;Jahr&quot;
+</pre>