details:   /erp/devel/main/rev/fc2b40560e15
changeset: 8530:fc2b40560e15
user:      Ben Sommerville <ben.sommerville <at> eintel.com.au>
date:      Wed Oct 13 14:23:12 2010 +1100
summary:   Fixes issue 14825: Negate payment amounts for credit memos when 
posting journal with APRM installed

details:   /erp/devel/main/rev/8e8cd8bfe8c7
changeset: 8531:8e8cd8bfe8c7
user:      RM packaging bot <staff.rm <at> openbravo.com>
date:      Wed Oct 13 08:07:04 2010 +0000
summary:   CI: promote changesets from pi to main

diffstat:

 src-db/database/sourcedata/AD_MODULE.xml             |  4 ++--
 src/org/openbravo/erpCommon/ad_forms/DocInvoice.java |  6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (46 lines):

diff -r db409a855f2d -r 8e8cd8bfe8c7 src-db/database/sourcedata/AD_MODULE.xml
--- a/src-db/database/sourcedata/AD_MODULE.xml  Tue Oct 12 10:39:38 2010 +0530
+++ b/src-db/database/sourcedata/AD_MODULE.xml  Wed Oct 13 08:07:04 2010 +0000
@@ -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.18452]]></VERSION>
+<!--0-->  <VERSION><![CDATA[2.50.18530]]></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 db409a855f2d -r 8e8cd8bfe8c7 
src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocInvoice.java      Tue Oct 12 
10:39:38 2010 +0530
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInvoice.java      Wed Oct 13 
08:07:04 2010 +0000
@@ -353,8 +353,9 @@
         }
       else
         for (int i = 0; m_payments != null && i < m_payments.length; i++) {
+          BigDecimal amount = new BigDecimal(m_payments[i].Amount);
           fact.createLine(m_payments[i], getAccountBPartner(C_BPartner_ID, as, 
true, false, conn),
-              this.C_Currency_ID, "", getConvertedAmt(m_payments[i].Amount,
+              this.C_Currency_ID, "", 
getConvertedAmt(((amount.negate())).toPlainString(),
                   m_payments[i].C_Currency_ID_From, this.C_Currency_ID, 
DateAcct, "", conn),
               Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
           fact.createLine(m_payments[i], getAccountBPartner(C_BPartner_ID, as, 
true, true, conn),
@@ -469,8 +470,9 @@
         }
       else
         for (int i = 0; m_payments != null && i < m_payments.length; i++) {
+          BigDecimal amount = new BigDecimal(m_payments[i].Amount);
           fact.createLine(m_payments[i], getAccountBPartner(C_BPartner_ID, as, 
false, false, conn),
-              this.C_Currency_ID, getConvertedAmt(m_payments[i].Amount,
+              this.C_Currency_ID, 
getConvertedAmt(((amount.negate())).toPlainString(),
                   m_payments[i].C_Currency_ID_From, this.C_Currency_ID, 
DateAcct, "", conn), "",
               Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
           fact.createLine(m_payments[i], getAccountBPartner(C_BPartner_ID, as, 
false, true, conn),

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to