Fixes ISSUE
44334:Converted amount set to original amount when needed
When the Currency is set to the default value, after changing
it to a different one and specifying a Exchange rate, the
Converted amount is set to the original amount again.
Also, the same fix has been applied to another two lines that
could cause problems.
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_MultiCurrency.java Wed Jun 24 12:08:22 2020 +0530
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_MultiCurrency.java Fri Jun 26 11:53:06 2020 +0200
@@ -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) 2011-2016 Openbravo SLU
+ * All portions are Copyright (C) 2011-2020 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
*************************************************************************
@@ -74,20 +74,19 @@
OBDal.getInstance().get(Organization.class, strOrgId));
if (conversionRate != null) {
finAccConvertRate = conversionRate.getMultipleRateBy();
- info.addResult("inpfinaccTxnConvertRate", finAccConvertRate);
- } else {
- info.addResult("inpfinaccTxnConvertRate", "");
}
+ info.addResult("inpfinaccTxnConvertRate", finAccConvertRate);
if (!strAmount.isEmpty() && conversionRate != null) {
BigDecimal amount = new BigDecimal(strAmount);
BigDecimal converted = amount.multiply(conversionRate.getMultipleRateBy());
finAccTxnAmount = converted;
info.addResult("inpfinaccTxnAmount", finAccTxnAmount);
} else {
- info.addResult("inpfinaccTxnAmount", "");
+ info.addResult("inpfinaccTxnAmount", strAmount);
}
} else {
info.addResult("inpfinaccTxnConvertRate", finAccConvertRate);
+ info.addResult("inpfinaccTxnAmount", strAmount);
}
}