details:   https://code.openbravo.com/erp/devel/pi/rev/ddd1f777209c
changeset: 26210:ddd1f777209c
user:      Unai Martirena <unai.martirena <at> openbravo.com>
date:      Thu Mar 12 10:13:51 2015 +0100
summary:   Fixes bug 29238: Transactions created in Match Statement are created 
processed

On Reconciliation Refactor process and new function was added to process 
transactions in APRM_MatchingUtility class, replacing the old 
processTransaction in MatchTransaction servlet. In the new method, the way in 
which the database stored procedure was being invoked was wrong, so It has been 
changed in order to work as it was doing in the old method.

details:   https://code.openbravo.com/erp/devel/pi/rev/601513f5d35e
changeset: 26211:601513f5d35e
user:      Sandra Huguet <sandra.huguet <at> openbravo.com>
date:      Fri Mar 20 09:32:09 2015 +0100
summary:   related to issue 29145

diffstat:

 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRM_MatchingUtility.java
 |  4 ++--
 
modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
          |  3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 3d6525efbc70 -r 601513f5d35e 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRM_MatchingUtility.java
--- 
a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRM_MatchingUtility.java
   Thu Mar 12 09:39:15 2015 +0100
+++ 
b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRM_MatchingUtility.java
   Fri Mar 20 09:32:09 2015 +0100
@@ -40,6 +40,7 @@
 import org.openbravo.advpaymentmngt.dao.TransactionsDao;
 import org.openbravo.advpaymentmngt.process.FIN_AddPayment;
 import org.openbravo.advpaymentmngt.process.FIN_ReconciliationProcess;
+import org.openbravo.advpaymentmngt.process.FIN_TransactionProcess;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.secureApp.VariablesSecureApp;
@@ -76,7 +77,6 @@
 import org.openbravo.model.materialmgmt.cost.ABCActivity;
 import org.openbravo.model.project.Project;
 import org.openbravo.model.sales.SalesRegion;
-import org.openbravo.scheduling.OBScheduler;
 import org.openbravo.scheduling.ProcessBundle;
 import org.openbravo.service.db.CallStoredProcedure;
 import org.openbravo.service.db.DalConnectionProvider;
@@ -525,7 +525,7 @@
     parameters.put("Fin_FinAcc_Transaction_ID", transaction.getId());
     pb.setParams(parameters);
     OBError myMessage = null;
-    OBScheduler.getInstance().schedule(pb);
+    new FIN_TransactionProcess().execute(pb);
     myMessage = (OBError) pb.getResult();
     return myMessage;
   }
diff -r 3d6525efbc70 -r 601513f5d35e 
modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
--- 
a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
    Thu Mar 12 09:39:15 2015 +0100
+++ 
b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
    Fri Mar 20 09:32:09 2015 +0100
@@ -1109,8 +1109,7 @@
     view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, 
OB.I18N.getLabel('APRM_CreditWithNegativeAmt'));
     return false;
   }
-
-  if (actualPayment.compareTo(total) > 0 && 
totalOustandingAmount.compareTo(amountInvOrds.add(totalWriteOffAmount)) > 0) {
+  if (actualPayment.compareTo(total.subtract(creditTotalItem)) > 0 && 
totalOustandingAmount.compareTo(amountInvOrds.add(totalWriteOffAmount)) > 0) {
     // Not all the payment amount has been allocated
     view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, 
OB.I18N.getLabel('APRM_JSNOTALLAMOUTALLOCATED'));
     return false;

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to