src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal_data.xsql
changeset 423 ecf368072c48
parent 0 0247c26f10c6
child 799 fef2c5e2feb7
equal deleted inserted replaced
422:e00336c36741 423:ecf368072c48
    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_BUDGET_ID, GL.GL_CATEGORY_ID, 
    33         (SELECT GL2.C_PERIOD_ID FROM GL_JOURNALBATCH GL2 WHERE GL2.GL_JOURNALBATCH_ID = ?) 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 = ?) AS DATEDOC,
    37         (SELECT GL2.DATEDOC FROM GL_JOURNALBATCH GL2 WHERE GL2.GL_JOURNALBATCH_ID = TO_NUMBER(?)) AS DATEDOC,
    38         (SELECT GL2.DATEACCT FROM GL_JOURNALBATCH GL2 WHERE GL2.GL_JOURNALBATCH_ID = ?) AS DATEACCT,
    38         (SELECT GL2.DATEACCT FROM GL_JOURNALBATCH GL2 WHERE GL2.GL_JOURNALBATCH_ID = TO_NUMBER(?)) AS DATEACCT,
    39         '' AS TOTALDR, '' AS TOTALCR, '' AS PROCESSING, '' AS PROCESSED, '' AS POSTED
    39         '' AS TOTALDR, '' AS TOTALCR, '' AS PROCESSING, '' AS PROCESSED, '' AS POSTED
    40         FROM GL_JOURNAL GL
    40         FROM GL_JOURNAL GL
    41         WHERE GL.GL_JOURNALBATCH_ID = ?
    41         WHERE GL.GL_JOURNALBATCH_ID = TO_NUMBER(?)
    42       ]]>
    42       ]]>
    43     </Sql>
    43     </Sql>
    44     <Field name="position" value="count"/>
    44     <Field name="position" value="count"/>
    45     <Parameter name="glJournalbatchParentId"/>
    45     <Parameter name="glJournalbatchParentId"/>
    46     <Parameter name="glJournalbatchParentId"/>
    46     <Parameter name="glJournalbatchParentId"/>
    52     <Sql>
    52     <Sql>
    53       <![CDATA[
    53       <![CDATA[
    54         SELECT LINE, ISGENERATED, DESCRIPTION, AMTSOURCEDR, AMTSOURCECR, C_CURRENCY_ID, CURRENCYRATETYPE, CURRENCYRATE,
    54         SELECT LINE, ISGENERATED, DESCRIPTION, AMTSOURCEDR, AMTSOURCECR, C_CURRENCY_ID, CURRENCYRATETYPE, CURRENCYRATE,
    55         AMTACCTDR, AMTACCTCR, C_UOM_ID, QTY, C_VALIDCOMBINATION_ID
    55         AMTACCTDR, AMTACCTCR, C_UOM_ID, QTY, C_VALIDCOMBINATION_ID
    56         FROM GL_JOURNALLINE
    56         FROM GL_JOURNALLINE
    57         WHERE GL_JOURNAL_ID = ?
    57         WHERE GL_JOURNAL_ID = TO_NUMBER(?)
    58       ]]>
    58       ]]>
    59     </Sql>
    59     </Sql>
    60     <Parameter name="gl_journal_id"/>
    60     <Parameter name="gl_journal_id"/>
    61   </SqlMethod>
    61   </SqlMethod>
    62   <SqlMethod name="selectFrom" type="preparedStatement" return="multiple">
    62   <SqlMethod name="selectFrom" type="preparedStatement" return="multiple">