details:   /erp/devel/main/rev/f90978db2fb3
changeset: 8237:f90978db2fb3
user:      David Alsasua <david.alsasua <at> openbravo.com>
date:      Wed Aug 18 13:36:07 2010 +0200
summary:   Fixes Issue 14061

details:   /erp/devel/main/rev/6fdcd557def7
changeset: 8238:6fdcd557def7
user:      RM packaging bot <staff.rm <at> openbravo.com>
date:      Wed Aug 18 21:25:34 2010 +0200
summary:   CI: promote changesets from pi to main

details:   /erp/devel/main/rev/ff712e14c10b
changeset: 8239:ff712e14c10b
user:      RM packaging bot <staff.rm <at> openbravo.com>
date:      Wed Aug 18 21:25:35 2010 +0200
summary:   CI: update AD_MODULE - Core version and label

diffstat:

 src-db/database/sourcedata/AD_MODULE.xml                           |   4 +-
 src/org/openbravo/erpCommon/ad_forms/DocDPManagement.java          |  34 
+++++----
 src/org/openbravo/erpCommon/ad_forms/DocLineDPManagement_data.xsql |   3 +-
 src/org/openbravo/erpCommon/ad_forms/DocLine_DPManagement.java     |   2 +
 4 files changed, 25 insertions(+), 18 deletions(-)

diffs (98 lines):

diff -r b92fae6e192e -r ff712e14c10b src-db/database/sourcedata/AD_MODULE.xml
--- a/src-db/database/sourcedata/AD_MODULE.xml  Wed Aug 18 13:16:28 2010 +0200
+++ b/src-db/database/sourcedata/AD_MODULE.xml  Wed Aug 18 21:25:35 2010 +0200
@@ -6,7 +6,7 @@
 <!--0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0-->  <NAME><![CDATA[core]]></NAME>
-<!--0-->  <VERSION><![CDATA[2.50.17989]]></VERSION>
+<!--0-->  <VERSION><![CDATA[2.50.18238]]></VERSION>
 <!--0-->  <DESCRIPTION><![CDATA[Core module is the base one]]></DESCRIPTION>
 <!--0-->  <HELP><![CDATA[Core module is the base one, all developments in core 
are included as part of the standard Openbravo ERP.]]></HELP>
 <!--0-->  <URL><![CDATA[www.openbravo.com]]></URL>
@@ -22,7 +22,7 @@
 <!--0-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--0-->  <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
 <!--0-->  <REFERENCEDATAINFO><![CDATA[Standard document types for orders, 
invoices, etc. and settings]]></REFERENCEDATAINFO>
-<!--0-->  <VERSION_LABEL><![CDATA[dev]]></VERSION_LABEL>
+<!--0-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--0-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--0--></AD_MODULE>
 
diff -r b92fae6e192e -r ff712e14c10b 
src/org/openbravo/erpCommon/ad_forms/DocDPManagement.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocDPManagement.java Wed Aug 18 
13:16:28 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocDPManagement.java Wed Aug 18 
21:25:35 2010 +0200
@@ -131,6 +131,8 @@
       docLine.Isreceipt = data[i].getField("ISRECEIPT");
       docLine.StatusTo = data[i].getField("STATUS_TO");
       docLine.StatusFrom = data[i].getField("STATUS_FROM");
+      docLine.IsManual = data[i].getField("ISMANUAL");
+      docLine.IsDirectPosting = data[i].getField("ISDIRECTPOSTING");
       list.add(docLine);
     }
 
@@ -183,22 +185,24 @@
     fact = new Fact(this, as, Fact.POST_Actual);
     for (int i = 0; p_lines != null && i < p_lines.length; i++) {
       DocLine_DPManagement line = (DocLine_DPManagement) p_lines[i];
-      String amount = calculateAmount(as, line, conn);
-      if (line.Isreceipt.equals("Y")) {
-        fact.createLine(line, getAccount(line.Isreceipt, line.m_C_BPartner_ID, 
as, line.StatusTo,
-            conn), line.m_C_Currency_ID, amount, "", Fact_Acct_Group_ID, 
nextSeqNo(SeqNo),
-            DocumentType, conn);
-        fact.createLine(line, getAccount(line.Isreceipt, line.m_C_BPartner_ID, 
as, line.StatusFrom,
-            conn), line.m_C_Currency_ID, "", amount, Fact_Acct_Group_ID, 
nextSeqNo(SeqNo),
-            DocumentType, conn);
+      if (line.IsManual.equals("N") || line.IsDirectPosting.equals("Y")) {
+        String amount = calculateAmount(as, line, conn);
+        if (line.Isreceipt.equals("Y")) {
+          fact.createLine(line, getAccount(line.Isreceipt, 
line.m_C_BPartner_ID, as, line.StatusTo,
+              conn), line.m_C_Currency_ID, amount, "", Fact_Acct_Group_ID, 
nextSeqNo(SeqNo),
+              DocumentType, conn);
+          fact.createLine(line, getAccount(line.Isreceipt, 
line.m_C_BPartner_ID, as,
+              line.StatusFrom, conn), line.m_C_Currency_ID, "", amount, 
Fact_Acct_Group_ID,
+              nextSeqNo(SeqNo), DocumentType, conn);
 
-      } else {
-        fact.createLine(line, getAccount(line.Isreceipt, line.m_C_BPartner_ID, 
as, line.StatusTo,
-            conn), line.m_C_Currency_ID, "", amount, Fact_Acct_Group_ID, 
nextSeqNo(SeqNo),
-            DocumentType, conn);
-        fact.createLine(line, getAccount(line.Isreceipt, line.m_C_BPartner_ID, 
as, line.StatusFrom,
-            conn), line.m_C_Currency_ID, amount, "", Fact_Acct_Group_ID, 
nextSeqNo(SeqNo),
-            DocumentType, conn);
+        } else {
+          fact.createLine(line, getAccount(line.Isreceipt, 
line.m_C_BPartner_ID, as, line.StatusTo,
+              conn), line.m_C_Currency_ID, "", amount, Fact_Acct_Group_ID, 
nextSeqNo(SeqNo),
+              DocumentType, conn);
+          fact.createLine(line, getAccount(line.Isreceipt, 
line.m_C_BPartner_ID, as,
+              line.StatusFrom, conn), line.m_C_Currency_ID, amount, "", 
Fact_Acct_Group_ID,
+              nextSeqNo(SeqNo), DocumentType, conn);
+        }
       }
     }
     SeqNo = "0";
diff -r b92fae6e192e -r ff712e14c10b 
src/org/openbravo/erpCommon/ad_forms/DocLineDPManagement_data.xsql
--- a/src/org/openbravo/erpCommon/ad_forms/DocLineDPManagement_data.xsql        
Wed Aug 18 13:16:28 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocLineDPManagement_data.xsql        
Wed Aug 18 21:25:35 2010 +0200
@@ -24,7 +24,8 @@
     <Sql>
       <![CDATA[
         SELECT ml.AD_ORG_ID, ml.C_DP_MANAGEMENTLINE_ID, STATUS_FROM, 
STATUS_TO, DP.ISRECEIPT, AMOUNT, DP.C_BPARTNER_ID,
-        ML.C_DEBT_PAYMENT_ID, DP.C_CURRENCY_ID, TRUNC(COALESCE((SELECT 
O.DATEACCT
+        ML.C_DEBT_PAYMENT_ID, DP.C_CURRENCY_ID, DP.ISMANUAL, 
DP.ISDIRECTPOSTING,
+                                  TRUNC(COALESCE((SELECT O.DATEACCT
                                   FROM C_ORDER O
                                         WHERE DP.C_ORDER_ID = O.C_ORDER_ID),
                                      (SELECT I.DATEACCT
diff -r b92fae6e192e -r ff712e14c10b 
src/org/openbravo/erpCommon/ad_forms/DocLine_DPManagement.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocLine_DPManagement.java    Wed Aug 
18 13:16:28 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocLine_DPManagement.java    Wed Aug 
18 21:25:35 2010 +0200
@@ -28,6 +28,8 @@
   public String StatusTo;
   public String StatusFrom;
   public String conversionDate;
+  public String IsManual;
+  public String IsDirectPosting;
 
   public DocLine_DPManagement(String DocumentType, String TrxHeader_ID, String 
TrxLine_ID) {
     super(DocumentType, TrxHeader_ID, TrxLine_ID);

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to