details:   https://code.openbravo.com/erp/devel/pi/rev/4a2987ed7feb
changeset: 32969:4a2987ed7feb
user:      Armaignac <collazoandy4 <at> gmail.com>
date:      Mon Nov 06 15:49:43 2017 -0500
summary:   Fixes issue 37094:Description field is not successfully updated by 
'Match
Statement' process

When using a payment in the Match Statement process the description of the
transaction only takes into account the payment description, skipping the user
input value.

Now the new transaction created in the process uses the value of the description
field of the Add New Transaction Popup

details:   https://code.openbravo.com/erp/devel/pi/rev/430d8de0bee8
changeset: 32970:430d8de0bee8
user:      David Miguelez <david.miguelez <at> openbravo.com>
date:      Wed Nov 08 09:41:57 2017 +0100
summary:   Related to Issue 37094. If the description field is empty,
set the description of the related payment if it's any and it's
description is not empty too.

diffstat:

 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddTransactionActionHandler.java
 |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r 4524f5da317f -r 430d8de0bee8 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddTransactionActionHandler.java
--- 
a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddTransactionActionHandler.java
      Wed Nov 08 12:25:15 2017 +0100
+++ 
b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddTransactionActionHandler.java
      Wed Nov 08 09:41:57 2017 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2014-2016 Openbravo SLU
+ * All portions are Copyright (C) 2014-2017 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -171,8 +171,9 @@
         paymentAmt = FIN_Utility.getPaymentAmount(payment.isReceipt(),
             payment.getFinancialTransactionAmount());
         isReceipt = payment.isReceipt();
-        description = StringUtils.isNotBlank(payment.getDescription()) ? 
payment.getDescription()
-            .replace("\n", ". ") : "";
+        String paymentDescription = 
StringUtils.isNotBlank(payment.getDescription()) ? payment
+            .getDescription().replace("\n", ". ") : "";
+        description = StringUtils.isNotBlank(strDescription) ? strDescription 
: paymentDescription;
         paymentCurrency = payment.getCurrency();
         convertRate = payment.getFinancialTransactionConvertRate();
         sourceAmount = payment.getAmount();

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to