src/org/openbravo/erpCommon/ad_forms/AcctSchema_data.xsql
author Iván Perdomo <ivan.perdomo@openbravo.com>
Thu, 24 Apr 2008 17:12:02 +0000
changeset 770 8850d5956eba
parent 423 ecf368072c48
child 1605 8a0fe0193bef
permissions -rw-r--r--
Bug fix [0000111]. Modified mapping name used on manual code.
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   Compiere License  Version 1.1
carlos@0
     5
 * ("License"); You may not use this file except in compliance with the License
carlos@0
     6
 * You may obtain a copy of the License at http://www.compiere.org/license.html
carlos@0
     7
 * Software distributed under the License is distributed on an  "AS IS"  basis,
carlos@0
     8
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
carlos@0
     9
 * the specific language governing rights and limitations under the License.
carlos@0
    10
 * The Original Code is                  Compiere  ERP & CRM  Business Solution
carlos@0
    11
 * The Initial Developer of the Original Code is Jorg Janke  and ComPiere, Inc.
carlos@0
    12
 * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
carlos@0
    13
 * created by ComPiere are Copyright (C) ComPiere, Inc.;   All Rights Reserved.
carlos@0
    14
 * Contributor(s): Openbravo SL
carlos@0
    15
 * Contributions are Copyright (C) 2001-2006 Openbravo S.L.
carlos@0
    16
 ******************************************************************************
carlos@0
    17
-->
carlos@0
    18
carlos@0
    19
carlos@0
    20
carlos@0
    21
carlos@0
    22
carlos@0
    23
<!--<!DOCTYPE SqlClass SYSTEM "SqlClass.dtd">-->
carlos@0
    24
<SqlClass name="AcctSchemaData" package="org.openbravo.erpCommon.ad_forms">
carlos@0
    25
   <SqlClassComment></SqlClassComment>
carlos@0
    26
   <SqlMethod name="select" type="preparedStatement" return="multiple">
carlos@0
    27
      <SqlMethodComment></SqlMethodComment>
carlos@0
    28
      <Sql>
carlos@0
    29
      SELECT Name,GAAP,IsAccrual,CostingMethod,C_Currency_ID,HasAlias, IsTradeDiscountPosted,
carlos@0
    30
      IsDiscountCorrectsTax, AD_Client_ID, '' as UseSuspenseBalancing, '' as SuspenseBalancing_Acct, 
carlos@0
    31
      '' as UseSuspenseError, '' as SuspenseError_Acct, '' as UseCurrencyBalancing, '' as CurrencyBalancing_Acct, 
carlos@0
    32
      '' as RetainedEarning_Acct, '' as IncomeSummary_Acct, '' as InterCompanyDueTo_Acct, '' as InterCompanyDueFrom_Acct,
carlos@0
    33
      '' as C_AcctSchema1_ID, '' as Acct2_Active, '' as C_AcctSchema2_ID,'' as Acct3_Active, '' as C_AcctSchema3_ID
carlos@0
    34
      FROM C_AcctSchema 
carlos@423
    35
      WHERE C_AcctSchema_ID = TO_NUMBER(?)
carlos@0
    36
      </Sql>
carlos@0
    37
    <Parameter name="C_AcctSchema_ID"/>
carlos@0
    38
   </SqlMethod>
carlos@0
    39
   <SqlMethod name="selectAcctSchemaGL" type="preparedStatement" return="multiple">
carlos@0
    40
      <SqlMethodComment></SqlMethodComment>
carlos@0
    41
      <Sql>
carlos@0
    42
      SELECT UseSuspenseBalancing,SuspenseBalancing_Acct, UseSuspenseError,SuspenseError_Acct, UseCurrencyBalancing,
carlos@0
    43
      CurrencyBalancing_Acct, RetainedEarning_Acct,IncomeSummary_Acct, InterCompanyDueTo_Acct,InterCompanyDueFrom_Acct 
carlos@0
    44
      FROM C_AcctSchema_GL 
carlos@423
    45
      WHERE C_AcctSchema_ID = TO_NUMBER(?)
carlos@0
    46
      </Sql>
carlos@0
    47
    <Parameter name="C_AcctSchema_ID"/>
carlos@0
    48
   </SqlMethod>
carlos@0
    49
   <SqlMethod name="selectAcctSchema123" type="preparedStatement" return="multiple">
carlos@0
    50
      <SqlMethodComment></SqlMethodComment>
carlos@0
    51
      <Sql>
carlos@0
    52
	SELECT C_AcctSchema1_ID, Acct2_Active,C_AcctSchema2_ID, Acct3_Active,C_AcctSchema3_ID 
carlos@0
    53
	FROM AD_ClientInfo 
carlos@423
    54
	WHERE AD_Client_ID = TO_NUMBER(?)
carlos@0
    55
      </Sql>
carlos@0
    56
    <Parameter name="AD_Client_ID"/>
carlos@0
    57
   </SqlMethod>
carlos@0
    58
  <SqlMethod name="selectAcctSchemaTable" type="preparedStatement" return="boolean" default="false">
carlos@0
    59
    <SqlMethodComment></SqlMethodComment>
carlos@0
    60
    <Sql>
carlos@0
    61
      <![CDATA[
carlos@0
    62
        SELECT count(C_ACCTSCHEMA_TABLE_ID) AS TOTAL FROM C_ACCTSCHEMA_TABLE
carlos@423
    63
        WHERE C_ACCTSCHEMA_ID = TO_NUMBER(?)
carlos@423
    64
        AND AD_TABLE_ID = TO_NUMBER(?)
carlos@0
    65
        AND ISACTIVE = 'Y'
carlos@0
    66
     ]]>
carlos@0
    67
     </Sql>
carlos@0
    68
     <Parameter name="c_acctschema_id"/>
carlos@0
    69
     <Parameter name="ad_table_id"/>
carlos@0
    70
   </SqlMethod>
carlos@0
    71
</SqlClass>