src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesJR_data.xsql
author David Baz Fayos <david.baz@openbravo.com>
Tue, 27 May 2008 15:26:10 +0000
changeset 1044 8691bbc94032
parent 573 48f214c7b66e
child 1605 8a0fe0193bef
permissions -rw-r--r--
Removed old frame parameter of windowTableId
carlos@0
     1
<?xml version="1.0" encoding="UTF-8" ?>
carlos@0
     2
<!--
carlos@0
     3
 *************************************************************************
carlos@0
     4
 * The contents of this file are subject to the Openbravo  Public  License
carlos@0
     5
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
carlos@0
     6
 * Version 1.1  with a permitted attribution clause; you may not  use this
carlos@0
     7
 * file except in compliance with the License. You  may  obtain  a copy of
carlos@0
     8
 * the License at http://www.openbravo.com/legal/license.html 
carlos@0
     9
 * Software distributed under the License  is  distributed  on  an "AS IS"
carlos@0
    10
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
carlos@0
    11
 * License for the specific  language  governing  rights  and  limitations
carlos@0
    12
 * under the License. 
carlos@0
    13
 * The Original Code is Openbravo ERP. 
carlos@0
    14
 * The Initial Developer of the Original Code is Openbravo SL 
carlos@0
    15
 * All portions are Copyright (C) 2001-2006 Openbravo SL 
carlos@0
    16
 * All Rights Reserved. 
carlos@0
    17
 * Contributor(s):  ______________________________________.
carlos@0
    18
 ************************************************************************
carlos@0
    19
-->
carlos@0
    20
carlos@0
    21
<SqlClass name="ReportInvoiceVendorDimensionalAnalysesJRData" package="org.openbravo.erpCommon.ad_reports">
carlos@0
    22
  <SqlClassComment></SqlClassComment>
carlos@0
    23
  <SqlMethod name="select" type="preparedStatement" return="multiple">
carlos@0
    24
    <SqlMethodComment></SqlMethodComment>
carlos@0
    25
    <Sql>
carlos@0
    26
    <![CDATA[
carlos@0
    27
      SELECT NIVEL1, NIVEL2, NIVEL3, NIVEL4, NIVEL5, SUM(LINENETAMT) AS AMOUNT, SUM(QTYINVOICED) AS QTY, SUM(LINENETREF) AS AMOUNTREF, SUM(QTYINVOICEDREF) AS QTYREF, '' AS ID, '' AS NAME, UOMSYMBOL
carlos@0
    28
      FROM (SELECT to_char('1') AS NIVEL1, to_char('2') AS NIVEL2, to_char('3') AS NIVEL3, to_char('4') AS NIVEL4, to_char('5') AS NIVEL5, 
carlos@0
    29
            C_INVOICELINE.LINENETAMT, C_INVOICELINE.QTYINVOICED, 0 AS LINENETREF, 0 AS QTYINVOICEDREF, C_UOM.UOMSYMBOL
carlos@0
    30
      FROM C_INVOICELINE left join M_PRODUCT on C_INVOICELINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
carlos@0
    31
                         left join C_UOM     on C_INVOICELINE.C_UOM_ID = C_UOM.C_UOM_ID
carlos@0
    32
                         left join M_PRODUCT_CATEGORY on M_PRODUCT.M_PRODUCT_CATEGORY_ID = M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID,
carlos@0
    33
      C_INVOICE, C_BPARTNER, C_BP_GROUP
carlos@0
    34
      WHERE C_INVOICE.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
carlos@0
    35
      AND C_BPARTNER.C_BP_GROUP_ID = C_BP_GROUP.C_BP_GROUP_ID
carlos@0
    36
      AND C_INVOICE.C_INVOICE_ID = C_INVOICELINE.C_INVOICE_ID
carlos@0
    37
      AND C_INVOICE.ISSOTRX = 'N'
carlos@0
    38
      AND C_INVOICE.PROCESSED = 'Y'
carlos@0
    39
      AND 0=0 AND C_INVOICE.AD_ORG_ID IN ('1')
carlos@0
    40
      AND C_INVOICE.AD_CLIENT_ID IN ('6')
carlos@0
    41
      AND 1=1
carlos@0
    42
      UNION ALL SELECT to_char('7') AS NIVEL1 , to_char('8') AS NIVEL2 , to_char('9') AS NIVEL3 , to_char('10') AS NIVEL4 , to_char('11') AS NIVEL5, 
carlos@0
    43
      0 AS LINENETAMT, 0 AS QTYINVOICED, C_INVOICELINE.LINENETAMT AS LINENETREF, C_INVOICELINE.QTYINVOICED AS QTYINVOICEDREF, C_UOM.UOMSYMBOL
carlos@0
    44
      FROM C_INVOICELINE left join M_PRODUCT on C_INVOICELINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
carlos@0
    45
                         left join C_UOM     on C_INVOICELINE.C_UOM_ID = C_UOM.C_UOM_ID
carlos@0
    46
                         left join M_PRODUCT_CATEGORY on M_PRODUCT.M_PRODUCT_CATEGORY_ID = M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID,
carlos@0
    47
            C_INVOICE, C_BPARTNER, C_BP_GROUP  
carlos@0
    48
      WHERE C_INVOICE.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
carlos@0
    49
      AND C_BPARTNER.C_BP_GROUP_ID = C_BP_GROUP.C_BP_GROUP_ID
carlos@0
    50
      AND C_INVOICE.C_INVOICE_ID = C_INVOICELINE.C_INVOICE_ID
carlos@0
    51
      AND C_INVOICE.ISSOTRX = 'N'
carlos@0
    52
      AND C_INVOICE.PROCESSED = 'Y'
carlos@0
    53
      AND 3=3 AND C_INVOICE.AD_ORG_ID IN ('1')
carlos@0
    54
      AND C_INVOICE.AD_CLIENT_ID IN('12')
carlos@0
    55
      AND 2=2) AA
carlos@0
    56
      GROUP BY NIVEL1, NIVEL2, NIVEL3, NIVEL4, NIVEL5, UOMSYMBOL, 1
carlos@0
    57
     ]]></Sql>
carlos@0
    58
     <Parameter name="nivel1" type="replace" optional="true" after="FROM (SELECT to_char(" text="'1'"/>
carlos@0
    59
    <Parameter name="nivel2" type="replace" optional="true" after="AS NIVEL1, to_char(" text="'2'"/>
carlos@0
    60
    <Parameter name="nivel3" type="replace" optional="true" after="AS NIVEL2, to_char(" text="'3'"/>
carlos@0
    61
    <Parameter name="nivel4" type="replace" optional="true" after="AS NIVEL3, to_char(" text="'4'"/>
carlos@0
    62
    <Parameter name="nivel5" type="replace" optional="true" after="AS NIVEL4, to_char(" text="'5'"/>
carlos@0
    63
    <Parameter name="adOrgId" optional="true" type="replace" after="AND 0=0 AND C_INVOICE.AD_ORG_ID IN (" text="'1'"/>
carlos@0
    64
    <Parameter name="adUserClient" type="replace" optional="true" after="AND C_INVOICE.AD_CLIENT_ID IN (" text="'6'"/>
carlos@0
    65
    <Parameter name="dateFrom" optional="true" after="AND 1=1"><![CDATA[AND C_INVOICE.DATEINVOICED >= to_date(?)]]></Parameter>
carlos@0
    66
    <Parameter name="dateTo" optional="true" after="AND 1=1"><![CDATA[AND C_INVOICE.DATEINVOICED < to_date(?)]]></Parameter>
carlos@423
    67
    <Parameter name="cBpartnerGroupId" optional="true" after="AND 1=1"><![CDATA[AND C_BP_GROUP.C_BP_GROUP_ID = TO_NUMBER(?)]]></Parameter>
carlos@0
    68
    <Parameter name="cBpartnerId" optional="true" type="argument" after="AND 1=1"><![CDATA[AND C_BPARTNER.C_BPARTNER_ID IN]]></Parameter>
carlos@423
    69
    <Parameter name="mProductCategoryId" optional="true" after="AND 1=1"><![CDATA[AND M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID = TO_NUMBER(?)]]></Parameter>
carlos@0
    70
    <Parameter name="mProductId" optional="true" type="argument" after="AND 1=1"><![CDATA[AND M_PRODUCT.M_PRODUCT_ID IN]]></Parameter>
carlos@0
    71
    <Parameter name="producttype" optional="true" after="AND 1=1"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
carlos@0
    72
    <Parameter name="nivel1" type="replace" optional="true" after="UNION ALL SELECT to_char(" text="'7'"/>
carlos@0
    73
    <Parameter name="nivel2" type="replace" optional="true" after="AS NIVEL1 , to_char(" text="'8'"/>
carlos@0
    74
    <Parameter name="nivel3" type="replace" optional="true" after="AS NIVEL2 , to_char(" text="'9'"/>
carlos@0
    75
    <Parameter name="nivel4" type="replace" optional="true" after="AS NIVEL3 , to_char(" text="'10'"/>
carlos@0
    76
    <Parameter name="nivel5" type="replace" optional="true" after="AS NIVEL4 , to_char(" text="'11'"/>
carlos@0
    77
    <Parameter name="adOrgId" optional="true" type="replace" after="AND 3=3 AND C_INVOICE.AD_ORG_ID IN (" text="'1'"/>
carlos@0
    78
    <Parameter name="adUserClient" type="replace" optional="true" after="AND C_INVOICE.AD_CLIENT_ID IN(" text="'12'"/>
carlos@0
    79
    <Parameter name="dateFromRef" optional="true" after="AND 2=2"><![CDATA[AND C_INVOICE.DATEINVOICED >= to_date(?)]]></Parameter>
carlos@0
    80
    <Parameter name="dateToRef" optional="true" after="AND 2=2"><![CDATA[AND C_INVOICE.DATEINVOICED < to_date(?)]]></Parameter>
carlos@423
    81
    <Parameter name="cBpartnerGroupId" optional="true" after="AND 2=2"><![CDATA[AND C_BP_GROUP.C_BP_GROUP_ID = TO_NUMBER(?)]]></Parameter>
carlos@0
    82
    <Parameter name="cBpartnerId" optional="true" type="argument" after="AND 2=2"><![CDATA[AND C_BPARTNER.C_BPARTNER_ID IN]]></Parameter>
carlos@423
    83
    <Parameter name="mProductCategoryId" optional="true" after="AND 2=2"><![CDATA[AND M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID = TO_NUMBER(?)]]></Parameter>
carlos@0
    84
    <Parameter name="mProductId" optional="true" type="argument" after="AND 2=2"><![CDATA[AND M_PRODUCT.M_PRODUCT_ID IN]]></Parameter>
carlos@0
    85
    <Parameter name="producttype" optional="true" after="AND 2=2"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
carlos@0
    86
    <Parameter name="orderby" type="replace" optional="true" after="GROUP BY NIVEL1, NIVEL2, NIVEL3, NIVEL4, NIVEL5, UOMSYMBOL" text=", 1"/>
carlos@0
    87
  </SqlMethod>
carlos@0
    88
  <SqlMethod name="set" type="constant" return="multiple">
carlos@0
    89
      <SqlMethodComment></SqlMethodComment>
carlos@0
    90
      <Sql></Sql>
carlos@0
    91
  </SqlMethod>
carlos@0
    92
  <SqlMethod name="selectNoComparative" type="preparedStatement" return="multiple">
carlos@0
    93
    <SqlMethodComment></SqlMethodComment>
carlos@0
    94
    <Sql>
carlos@0
    95
    <![CDATA[
carlos@0
    96
      SELECT NIVEL1, NIVEL2, NIVEL3, NIVEL4, NIVEL5, SUM(LINENETAMT) AS AMOUNT, SUM(QTYINVOICED) AS QTY, SUM(LINENETREF) AS AMOUNTREF, SUM(QTYINVOICEDREF) AS QTYREF, '' AS ID, '' AS NAME, UOMSYMBOL
carlos@0
    97
      FROM (SELECT to_char('1') AS NIVEL1, to_char('2') AS NIVEL2, to_char('3') AS NIVEL3, to_char('4') AS NIVEL4, to_char('5') AS NIVEL5, 
carlos@0
    98
      C_INVOICELINE.LINENETAMT, C_INVOICELINE.QTYINVOICED, 0 AS LINENETREF, 0 AS QTYINVOICEDREF, C_UOM.UOMSYMBOL
carlos@0
    99
      FROM C_INVOICELINE left join M_PRODUCT on C_INVOICELINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
carlos@0
   100
                         left join C_UOM     on C_INVOICELINE.C_UOM_ID = C_UOM.C_UOM_ID 
carlos@0
   101
                         left join M_PRODUCT_CATEGORY on M_PRODUCT.M_PRODUCT_CATEGORY_ID = M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID,
carlos@0
   102
      C_INVOICE, C_BPARTNER, C_BP_GROUP
carlos@0
   103
      WHERE C_INVOICE.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
carlos@0
   104
      AND C_BPARTNER.C_BP_GROUP_ID = C_BP_GROUP.C_BP_GROUP_ID
carlos@0
   105
      AND C_INVOICE.C_INVOICE_ID = C_INVOICELINE.C_INVOICE_ID
carlos@0
   106
      AND C_INVOICE.ISSOTRX = 'N'
carlos@0
   107
      AND C_INVOICE.PROCESSED = 'Y'
carlos@0
   108
      AND 0=0 AND C_INVOICE.AD_ORG_ID IN ('1')
carlos@0
   109
      AND C_INVOICE.AD_CLIENT_ID IN ('6')
carlos@0
   110
      AND 1=1) AA
carlos@0
   111
      GROUP BY NIVEL1, NIVEL2, NIVEL3, NIVEL4, NIVEL5, UOMSYMBOL, 1
carlos@0
   112
     ]]></Sql>
carlos@0
   113
     <Parameter name="nivel1" type="replace" optional="true" after="FROM (SELECT to_char(" text="'1'"/>
carlos@0
   114
    <Parameter name="nivel2" type="replace" optional="true" after="AS NIVEL1, to_char(" text="'2'"/>
carlos@0
   115
    <Parameter name="nivel3" type="replace" optional="true" after="AS NIVEL2, to_char(" text="'3'"/>
carlos@0
   116
    <Parameter name="nivel4" type="replace" optional="true" after="AS NIVEL3, to_char(" text="'4'"/>
carlos@0
   117
    <Parameter name="nivel5" type="replace" optional="true" after="AS NIVEL4, to_char(" text="'5'"/>
carlos@0
   118
    <Parameter name="adOrgId" optional="true" type="replace" after="AND 0=0 AND C_INVOICE.AD_ORG_ID IN (" text="'1'"/>
carlos@0
   119
    <Parameter name="adUserClient" type="replace" optional="true" after="AND C_INVOICE.AD_CLIENT_ID IN (" text="'6'"/>
carlos@0
   120
    <Parameter name="dateFrom" optional="true" after="AND 1=1"><![CDATA[AND C_INVOICE.DATEINVOICED >= to_date(?)]]></Parameter>
carlos@0
   121
    <Parameter name="dateTo" optional="true" after="AND 1=1"><![CDATA[AND C_INVOICE.DATEINVOICED < to_date(?)]]></Parameter>
carlos@423
   122
    <Parameter name="cBpartnerGroupId" optional="true" after="AND 1=1"><![CDATA[AND C_BP_GROUP.C_BP_GROUP_ID = TO_NUMBER(?)]]></Parameter>
carlos@0
   123
    <Parameter name="cBpartnerId" optional="true" type="argument" after="AND 1=1"><![CDATA[AND C_BPARTNER.C_BPARTNER_ID IN]]></Parameter>
carlos@423
   124
    <Parameter name="mProductCategoryId" optional="true" after="AND 1=1"><![CDATA[AND M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID = TO_NUMBER(?)]]></Parameter>
carlos@0
   125
    <Parameter name="mProductId" optional="true" type="argument" after="AND 1=1"><![CDATA[AND M_PRODUCT.M_PRODUCT_ID IN]]></Parameter>
carlos@0
   126
    <Parameter name="producttype" optional="true" after="AND 1=1"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
carlos@0
   127
    <Parameter name="orderby" type="replace" optional="true" after="GROUP BY NIVEL1, NIVEL2, NIVEL3, NIVEL4, NIVEL5, UOMSYMBOL" text=", 1"/>
carlos@0
   128
  </SqlMethod>
carlos@0
   129
  <SqlMethod name="selectBpartner" type="preparedStatement" return="multiple">
carlos@0
   130
    <SqlMethodComment></SqlMethodComment>
carlos@0
   131
    <Sql>
carlos@0
   132
    <![CDATA[
carlos@0
   133
      SELECT C_BPARTNER_ID AS ID, C_BPARTNER.NAME
carlos@0
   134
      FROM C_BPARTNER
carlos@0
   135
      WHERE AD_ORG_ID IN ('1') 
carlos@0
   136
      AND AD_CLIENT_ID IN ('1') 
carlos@0
   137
      AND (1=2 )
carlos@0
   138
     ]]></Sql>
carlos@0
   139
    <Parameter name="adOrgClient" type="replace" optional="true" after="AD_ORG_ID IN (" text="'1'"/>
carlos@0
   140
     <Parameter name="adUserClient" type="replace" optional="true" after="AND AD_CLIENT_ID IN (" text="'1'"/>
carlos@0
   141
     <Parameter name="cBpartnerId" optional="true" type="argument" after="(1=2" text=" OR C_BPARTNER_ID IN"/>
carlos@0
   142
  </SqlMethod>
carlos@0
   143
carlos@0
   144
  <SqlMethod name="selectMproduct" type="preparedStatement" return="multiple">
carlos@0
   145
    <SqlMethodComment></SqlMethodComment>
carlos@0
   146
    <Sql>
carlos@0
   147
    <![CDATA[
carlos@0
   148
      SELECT M_PRODUCT.M_PRODUCT_ID AS ID,M_PRODUCT.NAME
carlos@0
   149
      FROM M_PRODUCT
carlos@0
   150
      WHERE AD_ORG_ID IN ('1') 
carlos@0
   151
      AND AD_CLIENT_ID IN ('1') 
carlos@0
   152
      AND (1=2 )
carlos@0
   153
     ]]></Sql>
carlos@0
   154
    <Parameter name="adOrgClient" type="replace" optional="true" after="AD_ORG_ID IN (" text="'1'"/>
carlos@0
   155
     <Parameter name="adUserClient" type="replace" optional="true" after="AND AD_CLIENT_ID IN (" text="'1'"/>
carlos@0
   156
     <Parameter name="mProductId" optional="true" type="argument" after="(1=2" text=" OR M_PRODUCT_ID IN"/>
carlos@0
   157
  </SqlMethod>
carlos@0
   158
carlos@0
   159
  <SqlMethod name="selectBpgroup" type="preparedStatement" return="String" default="">
carlos@0
   160
    <SqlMethodComment></SqlMethodComment>
carlos@0
   161
    <Sql>
carlos@0
   162
    <![CDATA[
carlos@0
   163
      SELECT C_BP_GROUP.NAME
carlos@0
   164
      FROM C_BP_GROUP
carlos@423
   165
      WHERE C_BP_GROUP.C_BP_GROUP_ID = TO_NUMBER(?)
carlos@0
   166
     ]]></Sql>
carlos@0
   167
    <Parameter name="cBpGroupId"/>
carlos@0
   168
  </SqlMethod>
carlos@0
   169
carlos@0
   170
  <SqlMethod name="selectProductCategory" type="preparedStatement" return="String" default="">
carlos@0
   171
    <SqlMethodComment></SqlMethodComment>
carlos@0
   172
    <Sql>
carlos@0
   173
    <![CDATA[
carlos@0
   174
      SELECT M_PRODUCT_CATEGORY.NAME
carlos@0
   175
      FROM M_PRODUCT_CATEGORY
carlos@423
   176
      WHERE M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID = TO_NUMBER(?)
carlos@0
   177
     ]]></Sql>
carlos@0
   178
    <Parameter name="mProductCategoryId"/>
carlos@0
   179
  </SqlMethod>
carlos@0
   180
carlos@0
   181
  <SqlMethod name="selectEntity" type="preparedStatement" return="String" default="">
carlos@0
   182
    <SqlMethodComment></SqlMethodComment>
carlos@0
   183
    <Sql>
carlos@0
   184
    <![CDATA[
carlos@0
   185
      SELECT AD_CLIENT.NAME
carlos@0
   186
      FROM AD_CLIENT
carlos@423
   187
      WHERE AD_CLIENT.AD_CLIENT_ID = TO_NUMBER(?)
carlos@0
   188
     ]]></Sql>
carlos@0
   189
    <Parameter name="adClientId"/>
carlos@0
   190
  </SqlMethod>
carlos@0
   191
carlos@0
   192
  <SqlMethod name="selectNotShown" type="preparedStatement" return="multiple">
carlos@0
   193
    <SqlMethodComment></SqlMethodComment>
carlos@0
   194
    <Sql>
carlos@0
   195
    <![CDATA[
carlos@0
   196
      SELECT ID, NAME
carlos@0
   197
      FROM (SELECT VALUE AS ID, NAME 
carlos@0
   198
              FROM AD_REF_LIST 
carlos@0
   199
             WHERE AD_REFERENCE_ID = 800086 
carlos@0
   200
             AND AD_REF_LIST.VALUE IN ('1', '2', '3', '4', '5')
carlos@573
   201
             ORDER BY TO_NUMBER(VALUE)) AA
carlos@0
   202
      WHERE 1=1 
carlos@0
   203
     ]]></Sql>
carlos@0
   204
     <Parameter name="notShown" optional="true" type="argument" after="WHERE 1=1 "><![CDATA[AND ID NOT IN]]></Parameter>
carlos@0
   205
  </SqlMethod>
carlos@0
   206
  <SqlMethod name="selectShown" type="preparedStatement" return="multiple">
carlos@0
   207
    <SqlMethodComment></SqlMethodComment>
carlos@0
   208
    <Sql>
carlos@0
   209
    <![CDATA[
carlos@0
   210
      SELECT ID, NAME
carlos@0
   211
      FROM (SELECT VALUE AS ID, NAME 
carlos@0
   212
              FROM AD_REF_LIST 
carlos@0
   213
             WHERE AD_REFERENCE_ID = 800086 
carlos@0
   214
             AND AD_REF_LIST.VALUE IN ('1', '2', '3', '4', '5')
carlos@573
   215
             ORDER BY TO_NUMBER(VALUE)) AA
carlos@0
   216
      WHERE 1=1 
carlos@0
   217
     ]]></Sql>
carlos@0
   218
     <Parameter name="shown" optional="true" type="argument" after="WHERE 1=1 "><![CDATA[AND ID IN]]></Parameter>
carlos@0
   219
  </SqlMethod>
carlos@0
   220
carlos@0
   221
  <SqlMethod name="selectNotShownTrl" type="preparedStatement" return="multiple">
carlos@0
   222
    <SqlMethodComment></SqlMethodComment>
carlos@0
   223
    <Sql>
carlos@0
   224
    <![CDATA[
carlos@0
   225
      SELECT ID, NAME
carlos@0
   226
      FROM (SELECT VALUE AS ID, T.NAME 
carlos@0
   227
              FROM AD_REF_LIST_trl T,
carlos@0
   228
                   AD_REF_LIST     L
carlos@0
   229
             WHERE l.AD_REFERENCE_ID = 800086
carlos@0
   230
               AND l.AD_REF_LIST_ID  = t.AD_REF_LIST_ID
carlos@0
   231
               AND L.VALUE IN ('1', '2', '3', '4', '5')
carlos@0
   232
               AND t.AD_LANGUAGE = ?
carlos@573
   233
             ORDER BY TO_NUMBER(VALUE)) AA
carlos@0
   234
      WHERE 1=1 
carlos@0
   235
     ]]></Sql>
carlos@0
   236
     <Parameter name="lang"/> 
carlos@0
   237
     <Parameter name="notShown" optional="true" type="argument" after="WHERE 1=1 "><![CDATA[AND ID NOT IN]]></Parameter>
carlos@0
   238
  </SqlMethod>
carlos@0
   239
  <SqlMethod name="selectShownTrl" type="preparedStatement" return="multiple">
carlos@0
   240
    <SqlMethodComment></SqlMethodComment>
carlos@0
   241
    <Sql>
carlos@0
   242
    <![CDATA[
carlos@0
   243
      SELECT ID, NAME
carlos@0
   244
      FROM (SELECT VALUE AS ID, T.NAME 
carlos@0
   245
              FROM AD_REF_LIST_trl T,
carlos@0
   246
                   AD_REF_LIST     L
carlos@0
   247
             WHERE l.AD_REFERENCE_ID = 800086
carlos@0
   248
               AND l.AD_REF_LIST_ID  = t.AD_REF_LIST_ID
carlos@0
   249
               AND L.VALUE IN ('1', '2', '3', '4', '5')
carlos@0
   250
               AND t.AD_LANGUAGE = ?
carlos@573
   251
             ORDER BY TO_NUMBER(VALUE)) AA
carlos@0
   252
      WHERE 1=1 
carlos@0
   253
     ]]></Sql>
carlos@0
   254
     <Parameter name="lang"/> 
carlos@0
   255
     <Parameter name="shown" optional="true" type="argument" after="WHERE 1=1 "><![CDATA[AND ID IN]]></Parameter>
carlos@0
   256
  </SqlMethod>
carlos@0
   257
</SqlClass>