Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / custom_data_export_designer / edit.html
1 [% USE HTML %][% USE L %][% USE LxERP %]
2
3 <h1>[% FORM.title %] — [% LxERP.t8("Step #1/#2", 1, 2) %] — [% LxERP.t8("Basic Data") %]</h1>
4
5 [%- INCLUDE 'common/flash.html' %]
6
7 <form method="post" action="controller.pl" id="form">
8  [% L.hidden_tag("id", SELF.query.id) %]
9
10  <table>
11   <tr>
12    <th align="right">[%- LxERP.t8("Name") %]</th>
13    <td>[% L.input_tag("query.name", SELF.query.name, style="width: 800px", "data-validate"="required") %]</td>
14   </tr>
15
16   <tr>
17    <th align="right">[%- LxERP.t8("Required access right") %]</th>
18    <td>[% L.select_tag("query.access_right", SELF.access_rights, default=SELF.query.access_right, style="width: 800px") %]</td>
19   </tr>
20
21   <tr>
22    <th valign="top" align="right">[%- LxERP.t8("Description") %]</th>
23    <td valign="top">[% L.textarea_tag("query.description", SELF.query.description, rows=5, style="width: 800px") %]</td>
24   </tr>
25
26   <tr>
27    <th valign="top" align="right">[%- LxERP.t8("SQL query") %]</th>
28    <td valign="top">[% L.textarea_tag("query.sql_query", SELF.query.sql_query, rows=20, style="width: 800px", "data-validate"="required") %]</td>
29   </tr>
30  </table>
31 </form>
32
33 <p>
34  [% LxERP.t8("The SQL query can be parameterized with variables named as follows: <%name%>.") %]
35  [% LxERP.t8("On the next page the type of all variables can be set.") %]
36  [% LxERP.t8("Note that parameter names must not be quoted.") %]
37  [% LxERP.t8("Example") %]:
38 </p>
39
40 <pre>
41 SELECT extract(YEAR FROM oe.transdate) AS &quot;Jahr&quot;, SUM(oe.amount) AS &quot;Angebotssumme&quot;
42 FROM oe
43 LEFT JOIN employee ON (oe.employee_id = employee.id)
44 WHERE (oe.customer_id IS NOT NULL)
45   AND COALESCE(oe.quotation, FALSE)
46   AND (employee.login = &lt;%Benutzer-Login%&gt;)
47 GROUP BY &quot;Jahr&quot;
48 ORDER BY &quot;Jahr&quot;
49 </pre>