Fixes issue 30206: Wrong payment status under some circumstancies
authorAlvaro Ferraz <alvaro.ferraz@openbravo.com>
Tue, 23 Jun 2015 12:52:47 +0200
changeset 27144 051a7473f534
parent 27143 11fe473f73e6
child 27145 3a6f672bc73f
Fixes issue 30206: Wrong payment status under some circumstancies

comingFrom internal parameter in FIN_PaymentProcess.java was always setted to "TRANSACTION" instead of using received comingFrom value, when Automatic Deposit/Withdrawn was activated and execution type was Automatic and not Deferred.
Because of that, transaction was not created when creating a payment from Payment In or Payment Out with this configuration.
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Wed Jun 24 09:19:24 2015 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Tue Jun 23 12:52:47 2015 +0200
@@ -332,7 +332,7 @@
                   FIN_ExecutePayment executePayment = new FIN_ExecutePayment();
                   executePayment.init("APP", executionProcess, payments, null,
                       payment.getOrganization());
-                  executePayment.addInternalParameter("comingFrom", "TRANSACTION");
+                  executePayment.addInternalParameter("comingFrom", comingFrom);
                   OBError result = executePayment.execute();
                   if ("Error".equals(result.getType())) {
                     msg = OBMessageUtils.messageBD(result.getMessage());