details:   https://code.openbravo.com/erp/devel/pi/rev/57cc2b93df7a
changeset: 14954:57cc2b93df7a
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Thu Dec 22 11:46:30 2011 +0100
summary:   Fixes issue 19190: Transaction with incorrect amount
amount when you try to pay an invoice having the default account of the BP in 
other currency

diffstat:

 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java
 |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 296d6aad21a5 -r 57cc2b93df7a 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java
--- 
a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java
  Wed Dec 21 18:48:09 2011 +0100
+++ 
b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java
  Thu Dec 22 11:46:30 2011 +0100
@@ -339,6 +339,11 @@
     }
     xmlDocument.setParameter("sectionDetailFinancialAccount", 
finAccountComboHtml);
 
+    if (account != null){
+     if (!financialAccounts.contains(account)){
+        strFinancialAccountId = financialAccounts.get(0).getId();
+     }
+    }
     // Currency
     xmlDocument.setParameter("CurrencyId", strCurrencyId);
     final Currency paymentCurrency = dao.getObject(Currency.class, 
strCurrencyId);

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to