src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal_data.xsql
changeset 799 fef2c5e2feb7
parent 423 ecf368072c48
child 1538 adedf6da8824
equal deleted inserted replaced
798:4994e5a604bb 799:fef2c5e2feb7
    27     <SqlMethodComment></SqlMethodComment>
    27     <SqlMethodComment></SqlMethodComment>
    28     <Sql>
    28     <Sql>
    29       <![CDATA[
    29       <![CDATA[
    30       SELECT GL.GL_JOURNAL_ID, GL.C_ACCTSCHEMA_ID, GL.C_DOCTYPE_ID, GL.DOCSTATUS, GL.DOCACTION, GL.ISAPPROVED, GL.ISPRINTED, 
    30       SELECT GL.GL_JOURNAL_ID, GL.C_ACCTSCHEMA_ID, GL.C_DOCTYPE_ID, GL.DOCSTATUS, GL.DOCACTION, GL.ISAPPROVED, GL.ISPRINTED, 
    31         GL.DESCRIPTION,
    31         GL.DESCRIPTION,
    32         GL.POSTINGTYPE, GL.GL_BUDGET_ID, GL.GL_CATEGORY_ID, 
    32         GL.POSTINGTYPE, GL.GL_CATEGORY_ID, 
    33         (SELECT GL2.C_PERIOD_ID FROM GL_JOURNALBATCH GL2 WHERE GL2.GL_JOURNALBATCH_ID = TO_NUMBER(?)) AS C_PERIOD_ID, 
    33         (SELECT GL2.C_PERIOD_ID FROM GL_JOURNALBATCH GL2 WHERE GL2.GL_JOURNALBATCH_ID = TO_NUMBER(?)) AS C_PERIOD_ID, 
    34         GL.C_CURRENCY_ID, GL.CURRENCYRATETYPE, GL.CURRENCYRATE,
    34         GL.C_CURRENCY_ID, GL.CURRENCYRATETYPE, GL.CURRENCYRATE,
    35         GL.CONTROLAMT, '' AS LINE, '' AS ISGENERATED, '' AS AMTSOURCEDR, '' AS AMTSOURCECR, '' AS AMTACCTDR, '' AS AMTACCTCR,
    35         GL.CONTROLAMT, '' AS LINE, '' AS ISGENERATED, '' AS AMTSOURCEDR, '' AS AMTSOURCECR, '' AS AMTACCTDR, '' AS AMTACCTCR,
    36         '' AS C_UOM_ID, '' AS QTY, '' AS C_VALIDCOMBINATION_ID, '' AS GL_JOURNALBATCH_ID, '' AS DOCUMENTNO, '' AS ISACTIVE,
    36         '' AS C_UOM_ID, '' AS QTY, '' AS C_VALIDCOMBINATION_ID, '' AS GL_JOURNALBATCH_ID, '' AS DOCUMENTNO, '' AS ISACTIVE,
    37         (SELECT GL2.DATEDOC FROM GL_JOURNALBATCH GL2 WHERE GL2.GL_JOURNALBATCH_ID = TO_NUMBER(?)) AS DATEDOC,
    37         (SELECT GL2.DATEDOC FROM GL_JOURNALBATCH GL2 WHERE GL2.GL_JOURNALBATCH_ID = TO_NUMBER(?)) AS DATEDOC,
    88     <SqlMethodComment></SqlMethodComment>
    88     <SqlMethodComment></SqlMethodComment>
    89     <Sql>
    89     <Sql>
    90       <![CDATA[
    90       <![CDATA[
    91         INSERT INTO GL_JOURNAL (GL_JOURNAL_ID, AD_CLIENT_ID, AD_ORG_ID, CREATED, CREATEDBY, 
    91         INSERT INTO GL_JOURNAL (GL_JOURNAL_ID, AD_CLIENT_ID, AD_ORG_ID, CREATED, CREATEDBY, 
    92         UPDATED, UPDATEDBY, C_ACCTSCHEMA_ID,C_DOCTYPE_ID, DOCSTATUS,DOCACTION, ISAPPROVED, ISPRINTED, 
    92         UPDATED, UPDATEDBY, C_ACCTSCHEMA_ID,C_DOCTYPE_ID, DOCSTATUS,DOCACTION, ISAPPROVED, ISPRINTED, 
    93         DESCRIPTION, POSTINGTYPE, GL_BUDGET_ID,GL_CATEGORY_ID, DATEDOC, DATEACCT,C_PERIOD_ID, C_CURRENCY_ID, 
    93         DESCRIPTION, POSTINGTYPE, GL_CATEGORY_ID, DATEDOC, DATEACCT,C_PERIOD_ID, C_CURRENCY_ID, 
    94         CURRENCYRATETYPE,CURRENCYRATE, GL_JOURNALBATCH_ID, CONTROLAMT, DOCUMENTNO, PROCESSING, PROCESSED, POSTED) 
    94         CURRENCYRATETYPE,CURRENCYRATE, GL_JOURNALBATCH_ID, CONTROLAMT, DOCUMENTNO, PROCESSING, PROCESSED, POSTED) 
    95         VALUES (TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),now(),TO_NUMBER(?),now(),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),?,?,?,?,?,?,TO_NUMBER(?),TO_NUMBER(?),?,?,TO_NUMBER(?),TO_NUMBER(?),?,?,TO_NUMBER(?),?,?,?,?,?)
    95         VALUES (TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),now(),TO_NUMBER(?),now(),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),?,?,?,?,?,?,TO_NUMBER(?),TO_NUMBER(?),?,?,TO_NUMBER(?),TO_NUMBER(?),?,?,TO_NUMBER(?),?,?,?,?,?)
    96       ]]>
    96       ]]>
    97     </Sql>
    97     </Sql>
    98     <Parameter name="gl_journal_id"/>
    98     <Parameter name="gl_journal_id"/>
   106     <Parameter name="docaction"/>
   106     <Parameter name="docaction"/>
   107     <Parameter name="isapproved"/>
   107     <Parameter name="isapproved"/>
   108     <Parameter name="isprinted"/>
   108     <Parameter name="isprinted"/>
   109     <Parameter name="description"/>
   109     <Parameter name="description"/>
   110     <Parameter name="postingtype"/>
   110     <Parameter name="postingtype"/>
   111     <Parameter name="gl_budget_id"/>
       
   112     <Parameter name="gl_category_id"/>
   111     <Parameter name="gl_category_id"/>
   113     <Parameter name="datedoc"/>
   112     <Parameter name="datedoc"/>
   114     <Parameter name="dateacct"/>
   113     <Parameter name="dateacct"/>
   115     <Parameter name="c_period_id"/>
   114     <Parameter name="c_period_id"/>
   116     <Parameter name="c_currency_id"/>
   115     <Parameter name="c_currency_id"/>