src/org/openbravo/erpReports/RptMA_CCP_Measures_data.xsql
author Víctor Martínez Romanos <victor.martinez@openbravo.com>
Wed, 04 May 2011 10:29:32 +0200
changeset 11944 443f57de8082
child 12996 bc639e86fe20
permissions -rw-r--r--
[cleanup] Back out Quality Control Report
victor@11944
     1
<?xml version="1.0" encoding="UTF-8" ?>
victor@11944
     2
<!--
victor@11944
     3
 *************************************************************************
victor@11944
     4
 * The contents of this file are subject to the Openbravo  Public  License
victor@11944
     5
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
victor@11944
     6
 * Version 1.1  with a permitted attribution clause; you may not  use this
victor@11944
     7
 * file except in compliance with the License. You  may  obtain  a copy of
victor@11944
     8
 * the License at http://www.openbravo.com/legal/license.html 
victor@11944
     9
 * Software distributed under the License  is  distributed  on  an "AS IS"
victor@11944
    10
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
victor@11944
    11
 * License for the specific  language  governing  rights  and  limitations
victor@11944
    12
 * under the License. 
victor@11944
    13
 * The Original Code is Openbravo ERP. 
victor@11944
    14
 * The Initial Developer of the Original Code is Openbravo SLU 
victor@11944
    15
 * All portions are Copyright (C) 2001-2006 Openbravo SLU 
victor@11944
    16
 * All Rights Reserved. 
victor@11944
    17
 * Contributor(s):  ______________________________________.
victor@11944
    18
 ************************************************************************
victor@11944
    19
-->
victor@11944
    20
victor@11944
    21
victor@11944
    22
victor@11944
    23
victor@11944
    24
victor@11944
    25
<SqlClass name="RptMACCPMeasuresData" package="org.openbravo.erpReports">
victor@11944
    26
   <SqlClassComment></SqlClassComment>
victor@11944
    27
   <SqlMethod name="select" type="preparedStatement" return="multiple">
victor@11944
    28
      <SqlMethodComment></SqlMethodComment>
victor@11944
    29
      <Sql>
victor@11944
    30
      <![CDATA[
victor@11944
    31
        select s.Measuredate as measuredate, TO_CHAR(cg.frecuency, 'HH:MI') as frecuency, s.MA_MEASURE_SHIFT_ID as shiftid, g.MA_MEASURE_GROUP_ID as groupid, g.MA_CCP_GROUP_ID, cg.NAME as grupo, (CASE s.shift WHEN 'M' THEN 'MaƱana' ELSE 'Tarde' END) as shift, cg.seqno, REPLACE(s.observation, CHR(10), '') AS observation, (CASE WHEN s.AD_User_ID IS NULL THEN ' ' ELSE TO_CHAR(u.Name) END) as uname
victor@11944
    32
        from AD_User u right join MA_Measure_Shift s on u.AD_User_ID  = s.AD_User_ID, MA_Measure_Group g, MA_CCP_Group cg
victor@11944
    33
        where s.MA_MEASURE_SHIFT_ID = g.MA_MEASURE_SHIFT_ID
victor@11944
    34
          and g.MA_CCP_GROUP_ID = cg.MA_CCP_GROUP_ID
victor@11944
    35
          AND 1=1
victor@11944
    36
        order by s.MA_Measure_Shift_ID, cg.seqno
victor@11944
    37
      ]]>
victor@11944
    38
      </Sql>
victor@11944
    39
      <Parameter name="maCcpGroupId" optional="true" type="argument" after="AND 1=1">
victor@11944
    40
      <![CDATA[ AND s.MA_Measure_Shift_ID IN ]]>
victor@11944
    41
      </Parameter>
victor@11944
    42
   </SqlMethod>
victor@11944
    43
   <SqlMethod name="set" type="constant" return="multiple">
victor@11944
    44
      <SqlMethodComment></SqlMethodComment>
victor@11944
    45
      <Sql></Sql>
victor@11944
    46
  </SqlMethod>
victor@11944
    47
</SqlClass>