Author: sichen
Date: Wed Jul 26 11:05:56 2006
New Revision: 425790
URL:
http://svn.apache.org/viewvc?rev=425790&view=revLog:
Fixed bad partyIdFrom/partyIdTo on Payments when capturing payments to billing accounts
Modified:
incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
Modified: incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL:
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=425790&r1=425789&r2=425790&view=diff==============================================================================
--- incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original)
+++ incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Wed Jul 26 11:05:56 2006
@@ -1070,9 +1070,10 @@
Map results = ServiceUtil.returnSuccess();
try {
+ // Note that the partyIdFrom of the Payment should be the partyIdTo of the invoice, since you're receiving a payment from the party you billed
GenericValue invoice = delegator.findByPrimaryKey("Invoice", UtilMisc.toMap("invoiceId", invoiceId));
Map paymentParams = UtilMisc.toMap("paymentTypeId", "CUSTOMER_PAYMENT", "paymentMethodTypeId", "EXT_BILLACT",
- "partyIdFrom", invoice.getString("partyIdFrom"), "partyIdTo", invoice.getString("partyId"),
+ "partyIdFrom", invoice.getString("partyId"), "partyIdTo", invoice.getString("partyIdFrom"),
"statusId", "PMNT_RECEIVED", "effectiveDate", UtilDateTime.nowTimestamp());
paymentParams.put("amount", captureAmount);
paymentParams.put("currencyUomId", invoice.getString("currencyUomId"));