svn commit: r543721 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r543721 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java

jacopoc
Author: jacopoc
Date: Sat Jun  2 01:47:04 2007
New Revision: 543721

URL: http://svn.apache.org/viewvc?view=rev&rev=543721
Log:
The split amount should be computed against the actually captured amount and not against the amount we tried to captured.
This is a pretty important fix: please review and then we should move it to the release 4 too.

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?view=diff&rev=543721&r1=543720&r2=543721
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Sat Jun  2 01:47:04 2007
@@ -1181,8 +1181,8 @@
                     }
 
                     // create any splits which are needed
-                    if (authAmount.compareTo(amountThisCapture) == 1) {
-                        BigDecimal splitAmount = authAmount.subtract(amountThisCapture);
+                    if (authAmount.compareTo(amountCapturedBd) == 1) {
+                        BigDecimal splitAmount = authAmount.subtract(amountCapturedBd);
                         try {
                             Map splitCtx = UtilMisc.toMap("userLogin", userLogin, "orderPaymentPreference", paymentPref, "splitAmount", splitAmount);
                             dispatcher.addCommitService("processCaptureSplitPayment", splitCtx, true);