Fixes issue 0010002: Add C_DocType_ID info to Fact_Acct table while posting a document
authorEduardo Argal Guibert <eduardo.argal@openbravo.com>
Thu, 23 Jul 2009 01:03:36 +0200
changeset 4400 3a1903fd0ae9
parent 4399 1a216ea10d98
child 4401 0fea3b93d73c
Fixes issue 0010002: Add C_DocType_ID info to Fact_Acct table while posting a document
src-db/database/model/tables/FACT_ACCT.xml
src-db/database/sourcedata/AD_COLUMN.xml
src/org/openbravo/erpCommon/ad_forms/FactLine.java
src/org/openbravo/erpCommon/ad_forms/FactLine_data.xsql
--- a/src-db/database/model/tables/FACT_ACCT.xml	Wed Jul 22 23:11:16 2009 +0200
+++ b/src-db/database/model/tables/FACT_ACCT.xml	Thu Jul 23 01:03:36 2009 +0200
@@ -193,6 +193,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="C_DOCTYPE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="A_ASSET" name="AASSET_FACTACCT">
         <reference local="A_ASSET_ID" foreign="A_ASSET_ID"/>
       </foreign-key>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Wed Jul 22 23:11:16 2009 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jul 23 01:03:36 2009 +0200
@@ -247762,6 +247762,37 @@
 <!--3585B480A13011DD9CA97FE6868E2BF3-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--3585B480A13011DD9CA97FE6868E2BF3--></AD_COLUMN>
 
+<!--3D81BAED7AA844A3923EE6015B1862D1--><AD_COLUMN>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <AD_COLUMN_ID><![CDATA[3D81BAED7AA844A3923EE6015B1862D1]]></AD_COLUMN_ID>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <NAME><![CDATA[Document Type]]></NAME>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <DESCRIPTION><![CDATA[A value defining what sequence and process setup are used to handle this document.]]></DESCRIPTION>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <HELP><![CDATA[The Document Type determines document sequence and processing rules]]></HELP>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <COLUMNNAME><![CDATA[C_Doctype_ID]]></COLUMNNAME>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <AD_TABLE_ID><![CDATA[270]]></AD_TABLE_ID>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <SEQNO><![CDATA[91]]></SEQNO>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <AD_ELEMENT_ID><![CDATA[196]]></AD_ELEMENT_ID>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <POSITION><![CDATA[49]]></POSITION>
+<!--3D81BAED7AA844A3923EE6015B1862D1-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--3D81BAED7AA844A3923EE6015B1862D1--></AD_COLUMN>
+
 <!--420D477883C54FCA861F534FF2C630D9--><AD_COLUMN>
 <!--420D477883C54FCA861F534FF2C630D9-->  <AD_COLUMN_ID><![CDATA[420D477883C54FCA861F534FF2C630D9]]></AD_COLUMN_ID>
 <!--420D477883C54FCA861F534FF2C630D9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src/org/openbravo/erpCommon/ad_forms/FactLine.java	Wed Jul 22 23:11:16 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/FactLine.java	Thu Jul 23 01:03:36 2009 +0200
@@ -701,7 +701,7 @@
             C_LocFrom_ID, C_LocTo_ID, C_SalesRegion_ID, C_Project_ID, C_Campaign_ID, C_Activity_ID,
             User1_ID, User2_ID, description.toString(), m_Fact_Acct_Group_ID, m_SeqNo,
             m_DocBaseType, Record_ID2, (m_docLine != null) ? m_docLine.m_A_Asset_ID : "",
-            (m_docLine != null) ? m_docLine.m_C_WithHolding_ID : "");
+            (m_docLine != null) ? m_docLine.m_C_WithHolding_ID : "", m_docVO.C_DocType_ID);
         log4jFactLine.debug("FactLine - After insertFactAct");
       }
       if (m_docVO.m_IsOpening.equals("Y"))
--- a/src/org/openbravo/erpCommon/ad_forms/FactLine_data.xsql	Wed Jul 22 23:11:16 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/FactLine_data.xsql	Thu Jul 23 01:03:36 2009 +0200
@@ -89,7 +89,7 @@
         AmtSourceDR,AmtSourceCR,AmtAcctDR,AmtAcctCR,
         C_UOM_ID,Qty,M_Locator_ID,M_Product_ID,C_BPartner_ID,AD_OrgTrx_ID,C_LocFrom_ID,C_LocTo_ID,C_SalesRegion_ID,
         C_Project_ID,C_Campaign_ID,C_Activity_ID,User1_ID,User2_ID,Description, Fact_Acct_Group_ID, SeqNo, DocBaseType,
-        Record_ID2, A_ASSET_ID, C_WithHolding_ID)
+        Record_ID2, A_ASSET_ID, C_WithHolding_ID, C_DocType_ID)
         VALUES
           (?, ?, ?,'Y',now(),0,now(),0,
            ?, ?, ?, ?, TO_DATE(?), TO_DATE(?),
@@ -97,7 +97,7 @@
            ?, ?, ?, ?,
            TO_NUMBER(?), TO_NUMBER(?), TO_NUMBER(?), TO_NUMBER(?),
            ?, TO_NUMBER(?), ?,?, ?, ?,?, ?, ?,?, ?, ?,?, ?, ?, ?, TO_NUMBER(?), ?,
-           ?, ?, ?)
+           ?, ?, ?, ?)
      ]]>
      </Sql>
      <Parameter name="m_Fact_Acct_ID"/>
@@ -142,6 +142,7 @@
      <Parameter name="Record_ID2"/>
      <Parameter name="aAssetId"/>
      <Parameter name="cWithholdingId"/>
+     <Parameter name="cDocTypeId"/>
    </SqlMethod>
   <SqlMethod name="updateFactAcct" type="preparedStatement" connection="true" return="rowCount">
     <SqlMethodComment></SqlMethodComment>