src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionOrder_Order_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="SLRequisitionOrderOrderData" 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 * FROM DUAL
gorkaion@586
    27
      ]]>
gorkaion@586
    28
    </Sql>
gorkaion@586
    29
  </SqlMethod>
gorkaion@586
    30
  <SqlMethod name="getRequired" type="preparedStatement" return="String" default="">
gorkaion@586
    31
    <SqlMethodComment></SqlMethodComment>
gorkaion@586
    32
    <Sql>
gorkaion@586
    33
      SELECT M_REQUISITIONLINE.QTY - COALESCE(SUM(M_REQUISITIONORDER.QTY),0) AS REQUIRED
gorkaion@586
    34
      FROM M_REQUISITIONLINE LEFT JOIN M_REQUISITIONORDER 
gorkaion@586
    35
                             ON M_REQUISITIONLINE.M_REQUISITIONLINE_ID = M_REQUISITIONORDER.M_REQUISITIONLINE_ID
juanpablo@1605
    36
      WHERE M_REQUISITIONLINE.M_REQUISITIONLINE_ID = ?
gorkaion@586
    37
      GROUP BY M_REQUISITIONLINE.QTY
gorkaion@586
    38
    </Sql>
gorkaion@586
    39
    <Parameter name="mRequisitionLineId"/>
gorkaion@586
    40
  </SqlMethod>
gorkaion@586
    41
  <SqlMethod name="getOrderLine" type="preparedStatement" return="String" default="0">
gorkaion@586
    42
    <SqlMethodComment></SqlMethodComment>
gorkaion@586
    43
    <Sql>
gorkaion@586
    44
      SELECT QTYORDERED
gorkaion@586
    45
      FROM C_ORDERLINE
juanpablo@1605
    46
      WHERE C_ORDERLINE_ID = ?
gorkaion@586
    47
    </Sql>
gorkaion@586
    48
    <Parameter name="mOrderLineId"/>
gorkaion@586
    49
  </SqlMethod>
gorkaion@586
    50
</SqlClass>