1 [% USE HTML %][% USE L %][% USE LxERP %]
 
   3 <h1>[% FORM.title %] — [% LxERP.t8("Step #1/#2", 1, 2) %] — [% LxERP.t8("Basic Data") %]</h1>
 
   5 [%- INCLUDE 'common/flash.html' %]
 
   7 <form method="post" action="controller.pl" id="form">
 
   8  [% L.hidden_tag("id", SELF.query.id) %]
 
  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>
 
  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>
 
  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>
 
  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>
 
  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") %]:
 
  41 SELECT extract(YEAR FROM oe.transdate) AS "Jahr", SUM(oe.amount) AS "Angebotssumme"
 
  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 = <%Benutzer-Login%>)
 
  47 GROUP BY "Jahr"
 
  48 ORDER BY "Jahr"