src/org/openbravo/erpCommon/ad_callouts/SE_Expense_BP_Project_data.xsql
author RM packaging bot <staff.rm@openbravo.com>
Tue, 28 Jun 2011 10:33:23 +0000
changeset 9542 845811ab032b
parent 9072 79e55dfc8af0
permissions -rw-r--r--
Update AD_MODULE version to 2.50MP31
rafael@656
     1
<?xml version="1.0" encoding="UTF-8" ?>
rafael@656
     2
<!--
rafael@656
     3
 *************************************************************************
rafael@656
     4
 * The contents of this file are subject to the Openbravo  Public  License
priya@9072
     5
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
rafael@656
     6
 * Version 1.1  with a permitted attribution clause; you may not  use this
rafael@656
     7
 * file except in compliance with the License. You  may  obtain  a copy of
rafael@656
     8
 * the License at http://www.openbravo.com/legal/license.html 
rafael@656
     9
 * Software distributed under the License  is  distributed  on  an "AS IS"
rafael@656
    10
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
rafael@656
    11
 * License for the specific  language  governing  rights  and  limitations
rafael@656
    12
 * under the License. 
rafael@656
    13
 * The Original Code is Openbravo ERP. 
ggi@6701
    14
 * The Initial Developer of the Original Code is Openbravo SLU 
ggi@6701
    15
 * All portions are Copyright (C) 2008 Openbravo SLU 
rafael@656
    16
 * All Rights Reserved. 
rafael@656
    17
 * Contributor(s):  ______________________________________.
rafael@656
    18
 ************************************************************************
rafael@656
    19
-->
rafael@656
    20
rafael@656
    21
rafael@656
    22
<SqlClass name="SEExpenseBPProjectData" package="org.openbravo.erpCommon.ad_callouts">
rafael@656
    23
  <SqlMethod name="select" type="preparedStatement" return="multiple">
rafael@656
    24
    <SqlMethodComment></SqlMethodComment>
rafael@656
    25
    <Sql>
rafael@656
    26
      <![CDATA[
rafael@656
    27
        SELECT '' AS C_PROJECT_ID, '' AS C_BPARTNER_ID, '' AS NAME
rafael@656
    28
        FROM DUAL
rafael@656
    29
      ]]>
rafael@656
    30
    </Sql>
rafael@656
    31
  </SqlMethod>
rafael@656
    32
  <SqlMethod name="selectBPId" type="preparedStatement" return="String" default="">
rafael@656
    33
    <SqlMethodComment></SqlMethodComment>
rafael@656
    34
    <Sql>
rafael@656
    35
      <![CDATA[
rafael@656
    36
        SELECT C_BPARTNER_ID
rafael@656
    37
        FROM C_PROJECT
juanpablo@1605
    38
        WHERE C_PROJECT_ID = ?
rafael@656
    39
      ]]>
rafael@656
    40
    </Sql>
rafael@656
    41
    <Parameter name="CProjectId"/>
rafael@656
    42
    </SqlMethod>
rafael@656
    43
    <SqlMethod name="selectBPName" type="preparedStatement" return="String" default="">
rafael@656
    44
    <SqlMethodComment></SqlMethodComment>
rafael@656
    45
    <Sql>
rafael@656
    46
      <![CDATA[
rafael@656
    47
        SELECT C_BPARTNER.NAME
rafael@656
    48
		FROM C_BPARTNER, C_PROJECT 
rafael@656
    49
		WHERE C_PROJECT.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID 
juanpablo@1605
    50
		AND C_PROJECT.C_PROJECT_id = ?
rafael@656
    51
      ]]>
rafael@656
    52
    </Sql>
rafael@656
    53
    <Parameter name="CProjectId"/>
rafael@656
    54
  </SqlMethod>
rafael@656
    55
  <SqlMethod name="selectProjectId" type="preparedStatement" return="String" default="">
rafael@656
    56
    <SqlMethodComment></SqlMethodComment>
rafael@656
    57
    <Sql>
rafael@656
    58
      <![CDATA[
rafael@656
    59
        SELECT MAX(C_PROJECT_ID)
rafael@656
    60
		FROM C_PROJECT
juanpablo@1605
    61
		WHERE C_BPARTNER_ID = ?
rafael@656
    62
		AND ISACTIVE = 'Y'
rafael@656
    63
      ]]>
rafael@656
    64
    </Sql>
rafael@656
    65
    <Parameter name="CBPartnerId"/>
rafael@656
    66
  </SqlMethod>
rafael@656
    67
  <SqlMethod name="selectBPProject" type="preparedStatement" return="String" default="">
rafael@656
    68
    <SqlMethodComment></SqlMethodComment>
rafael@656
    69
    <Sql>
rafael@656
    70
      <![CDATA[
rafael@656
    71
        SELECT MAX(C_PROJECT_ID)
rafael@656
    72
		FROM C_PROJECT
juanpablo@1605
    73
		WHERE C_BPARTNER_ID = ?
juanpablo@1605
    74
		AND C_PROJECT_ID = ?
rafael@656
    75
      ]]>
rafael@656
    76
    </Sql>
rafael@656
    77
    <Parameter name="CBPartnerId"/>
rafael@656
    78
    <Parameter name="CProjectId"/>
rafael@656
    79
  </SqlMethod>
rafael@656
    80
</SqlClass>