Fixes issue 0017447: When you accounted a invoice don't appear the correct
authorJon Alegría <jon.alegria@openbravo.com>
Thu, 21 Jul 2011 20:38:38 +0200
changeset 13244 b5840ad5e283
parent 13243 01bcb64861bd
child 13245 7dc5b024cf94
Fixes issue 0017447: When you accounted a invoice don't appear the correct
information in the audit tab
src/org/openbravo/erpCommon/ad_forms/FactLine.java
src/org/openbravo/erpCommon/ad_forms/FactLine_data.xsql
--- a/src/org/openbravo/erpCommon/ad_forms/FactLine.java	Thu Jul 21 20:27:59 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/FactLine.java	Thu Jul 21 20:38:38 2011 +0200
@@ -748,14 +748,15 @@
             + ((m_docLine != null) ? m_docLine.m_A_Asset_ID : ""));
         log4jFactLine.debug("FactLine - m_C_WithHolding_ID "
             + ((m_docLine != null) ? m_docLine.m_C_WithHolding_ID : ""));
-        no = FactLineData.insertFactAct(con, conn, m_Fact_Acct_ID, AD_Client_ID, AD_Org_ID,
-            m_C_AcctSchema_ID, Account_ID, cuenta[0].value, cuenta[0].description, DateDoc,
-            DateAcct, C_Period_ID, m_AD_Table_ID, m_Record_ID, m_Line_ID, m_GL_Category_ID,
-            C_Tax_ID, m_PostingType, m_C_Currency_ID, m_AmtSourceDr, m_AmtSourceCr, m_AmtAcctDr,
-            m_AmtAcctCr, C_UOM_ID, Qty, m_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.toString(), m_Fact_Acct_Group_ID, m_SeqNo,
-            m_DocBaseType, Record_ID2, (m_docLine != null) ? m_docLine.m_A_Asset_ID : "",
+	no = FactLineData.insertFactAct(con, conn, m_Fact_Acct_ID, AD_Client_ID, AD_Org_ID, vars
+            .getUser(), m_C_AcctSchema_ID, Account_ID, cuenta[0].value, cuenta[0].description,
+            DateDoc, DateAcct, C_Period_ID, m_AD_Table_ID, m_Record_ID, m_Line_ID,
+            m_GL_Category_ID, C_Tax_ID, m_PostingType, m_C_Currency_ID, m_AmtSourceDr,
+            m_AmtSourceCr, m_AmtAcctDr, m_AmtAcctCr, C_UOM_ID, Qty, m_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.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_docVO.C_DocType_ID);
         log4jFactLine.debug("FactLine - After insertFactAct");
       }
--- a/src/org/openbravo/erpCommon/ad_forms/FactLine_data.xsql	Thu Jul 21 20:27:59 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/FactLine_data.xsql	Thu Jul 21 20:38:38 2011 +0200
@@ -91,7 +91,7 @@
         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, C_DocType_ID)
         VALUES
-          (?, ?, ?,'Y',now(),0,now(),0,
+          (?, ?, ?,'Y',now(),?,now(),?,
            ?, ?, ?, ?, TO_DATE(?), TO_DATE(?),
            ?, ?, ?, ?,
            ?, ?, ?, ?,
@@ -103,6 +103,8 @@
      <Parameter name="m_Fact_Acct_ID"/>
      <Parameter name="AD_Client_ID"/>
      <Parameter name="AD_Org_ID"/>
+     <Parameter name="AD_User_ID"/>
+     <Parameter name="AD_User_ID"/>
      <Parameter name="m_C_AcctSchema_ID"/>
      <Parameter name="Account_ID"/>
      <Parameter name="AccountValue"/>