src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionLine_Product_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
gorkaion@586
     1
<?xml version="1.0" encoding="UTF-8" ?>
gorkaion@586
     2
<!--
gorkaion@586
     3
 *************************************************************************
gorkaion@586
     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
gorkaion@586
     6
 * Version 1.1  with a permitted attribution clause; you may not  use this
gorkaion@586
     7
 * file except in compliance with the License. You  may  obtain  a copy of
gorkaion@586
     8
 * the License at http://www.openbravo.com/legal/license.html 
gorkaion@586
     9
 * Software distributed under the License  is  distributed  on  an "AS IS"
gorkaion@586
    10
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
gorkaion@586
    11
 * License for the specific  language  governing  rights  and  limitations
gorkaion@586
    12
 * under the License. 
gorkaion@586
    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 
gorkaion@586
    16
 * All Rights Reserved. 
gorkaion@586
    17
 * Contributor(s):  ______________________________________.
gorkaion@586
    18
 ************************************************************************
gorkaion@586
    19
-->
gorkaion@586
    20
gorkaion@586
    21
<SqlClass name="SLRequisitionLineProductData" package="org.openbravo.erpCommon.ad_callouts">
gorkaion@586
    22
  <SqlMethod name="select" type="preparedStatement" return="multiple">
gorkaion@586
    23
    <SqlMethodComment></SqlMethodComment>
gorkaion@586
    24
    <Sql>
gorkaion@586
    25
      <![CDATA[
gorkaion@586
    26
      SELECT '' AS pricelist_version, '' AS pricelist, '' AS pricelimit, '' AS pricestd  FROM DUAL
gorkaion@586
    27
      ]]>
gorkaion@586
    28
    </Sql>
gorkaion@586
    29
  </SqlMethod>
gorkaion@586
    30
  <SqlMethod name="selectPriceList" type="preparedStatement" return="String" default="">
gorkaion@586
    31
    <SqlMethodComment></SqlMethodComment>
gorkaion@586
    32
    <Sql>
gorkaion@586
    33
      SELECT M_Requisition.M_Pricelist_ID as pricelist_version
gorkaion@586
    34
      FROM M_Requisition
juanpablo@1605
    35
      WHERE M_Requisition.M_Requisition_ID = ?
gorkaion@586
    36
    </Sql>
gorkaion@586
    37
    <Parameter name="mRequisitionId"/>
gorkaion@586
    38
  </SqlMethod>
gorkaion@586
    39
  <SqlMethod name="selectPriceListVersion" type="preparedStatement" return="String" default="">
gorkaion@586
    40
    <SqlMethodComment></SqlMethodComment>
gorkaion@586
    41
    <Sql>
gorkaion@1787
    42
      SELECT M_GET_PRICELIST_VERSION(?, to_date(?)) as pricelist_version
gorkaion@586
    43
      FROM DUAL
gorkaion@586
    44
    </Sql>
gorkaion@586
    45
    <Parameter name="mPriceListId"/>
gorkaion@586
    46
    <Parameter name="duedate"/>
gorkaion@586
    47
  </SqlMethod>
gorkaion@586
    48
  <SqlMethod name="getPrices" type="preparedStatement" return="Multiple">
gorkaion@586
    49
    <SqlMethodComment></SqlMethodComment>
gorkaion@586
    50
    <Sql>
gorkaion@1787
    51
      SELECT M_BOM_PRICELIMIT(?, ?) AS pricelimit,
gorkaion@1787
    52
             M_BOM_PRICELIST(?, ?) AS pricelist,
gorkaion@1787
    53
             M_BOM_PRICESTD(?, ?) AS pricestd
gorkaion@586
    54
      FROM DUAL
gorkaion@586
    55
    </Sql>
gorkaion@586
    56
    <Parameter name="mProductId"/>
gorkaion@586
    57
    <Parameter name="mPriceListVersionId"/>
gorkaion@586
    58
    <Parameter name="mProductId"/>
gorkaion@586
    59
    <Parameter name="mPriceListVersionId"/>
gorkaion@586
    60
    <Parameter name="mProductId"/>
gorkaion@586
    61
    <Parameter name="mPriceListVersionId"/>
gorkaion@586
    62
  </SqlMethod>
gorkaion@586
    63
  <SqlMethod name="hasSecondaryUOM" type="preparedStatement" return="String" default="0">
gorkaion@586
    64
    <SqlMethodComment></SqlMethodComment>
gorkaion@586
    65
    <Sql>
gorkaion@586
    66
      SELECT (CASE COUNT(*) WHEN 0 THEN 0 ELSE 1 END) AS TOTAL 
gorkaion@586
    67
      FROM M_PRODUCT_UOM 
juanpablo@1605
    68
      WHERE M_PRODUCT_ID = ?
gorkaion@586
    69
    </Sql>
gorkaion@586
    70
    <Parameter name="mProductId"/>
gorkaion@586
    71
  </SqlMethod>
gorkaion@586
    72
  <SqlMethod name="attribute" type="preparedStatement" return="String" default="">
gorkaion@586
    73
    <SqlMethodComment></SqlMethodComment>
gorkaion@586
    74
    <Sql>
gorkaion@586
    75
      SELECT description 
gorkaion@586
    76
      FROM M_AttributeSetInstance 
juanpablo@1605
    77
      WHERE M_AttributeSetInstance_ID = ? 
gorkaion@586
    78
    </Sql>
gorkaion@586
    79
    <Parameter name="mAttributesetinstanceId"/>
gorkaion@586
    80
  </SqlMethod>
gorkaion@586
    81
</SqlClass>