You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2009/03/22 00:45:00 UTC
svn commit: r757093 [1/5] - in
/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting: ./
agreement/ finaccount/ invoice/ payment/ tax/ test/
thirdparty/authorizedotnet/ thirdparty/clearcommerce/
thirdparty/cybersource/ thirdparty/gosoftware/ th...
Author: doogie
Date: Sat Mar 21 23:44:59 2009
New Revision: 757093
URL: http://svn.apache.org/viewvc?rev=757093&view=rev
Log:
Fix purely empty whitespace lines, and remove trailing whitespace.
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/AccountingException.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/GlEvents.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentMethodServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/test/FinAccountTests.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AuthorizeResponse.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeApi.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/SelectRespServlet.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/AccountingException.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/AccountingException.java?rev=757093&r1=757092&r2=757093&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/AccountingException.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/AccountingException.java Sat Mar 21 23:44:59 2009
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -35,7 +35,7 @@
}
public AccountingException(Throwable throwable) {
- super(throwable);
+ super(throwable);
}
public AccountingException(String string) {
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/GlEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/GlEvents.java?rev=757093&r1=757092&r2=757093&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/GlEvents.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/GlEvents.java Sat Mar 21 23:44:59 2009
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -40,7 +40,7 @@
import org.ofbiz.webapp.event.EventHandlerException;
public class GlEvents {
-
+
public static final String module = GlEvents.class.getName();
public static String createReconcileAccount(HttpServletRequest request,HttpServletResponse response) {
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
@@ -87,7 +87,7 @@
Debug.logError(e, module);
return "error";
}
-
+
}
Map fieldMap = UtilMisc.toMap("glReconciliationName", "Reconciliation at date " + UtilDateTime.nowTimestamp(), "glAccountId", glAccountId, "organizationPartyId", organizationPartyId, "reconciledDate", UtilDateTime.nowTimestamp(), "reconciledBalance", reconciledBalance, "userLogin", userLogin);
Map glReconResult = null;
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java?rev=757093&r1=757092&r2=757093&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java Sat Mar 21 23:44:59 2009
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -43,7 +43,7 @@
*/
public class AgreementServices {
-
+
public static final String module = AgreementServices.class.getName();
// set some BigDecimal properties
private static BigDecimal ZERO = BigDecimal.ZERO;
@@ -57,7 +57,7 @@
if (decimals != -1) ZERO = ZERO.setScale(decimals, rounding);
}
public static final String resource = "AccountingUiLabels";
-
+
/**
* Determines commission receiving parties and amounts for the provided product, price, and quantity
* @param ctx The DispatchContext that this service is operating in.
@@ -80,7 +80,7 @@
Locale locale = (Locale) context.get("locale");
String errMsg = null;
List commissions = FastList.newInstance();
-
+
try {
BigDecimal amount = ((BigDecimal)context.get("amount"));
BigDecimal quantity = (BigDecimal)context.get("quantity");
@@ -91,7 +91,7 @@
quantity = quantity.abs();
String productId = (String) context.get("productId");
String invoiceItemTypeId = (String) context.get("invoiceItemTypeId");
-
+
// Collect agreementItems applicable to this orderItem/returnItem
// TODO: partyIds should be part of this query!
List agreementItems = delegator.findByAndCache("AgreementItemAndProductAppl", UtilMisc.toMap(
@@ -112,7 +112,7 @@
}
// this is not very efficient if there were many
agreementItems = EntityUtil.filterByDate(agreementItems);
-
+
Iterator it = agreementItems.iterator();
while (it.hasNext()) {
GenericValue agreementItem = (GenericValue) it.next();
@@ -124,7 +124,7 @@
BigDecimal commission = ZERO;
BigDecimal min = new BigDecimal("-1e12"); // Limit to 1 trillion commission
BigDecimal max = new BigDecimal("1e12");
-
+
// number of days due for commission, which will be the lowest termDays of all the AgreementTerms
long days = -1;
Iterator itt = terms.iterator();
@@ -164,7 +164,7 @@
commission = max;
commission = negative ? commission.negate() : commission;
commission = commission.setScale(decimals, rounding);
-
+
Map partyCommissionResult = UtilMisc.toMap(
"partyIdFrom", agreementItem.getString("partyIdFrom"),
"partyIdTo", agreementItem.getString("partyIdTo"),
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java?rev=757093&r1=757092&r2=757093&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java Sat Mar 21 23:44:59 2009
@@ -84,11 +84,11 @@
// obtain the order information
OrderReadHelper orh = new OrderReadHelper(delegator, orderId);
-
- // NOTE DEJ20070808: this means that we want store related settings for where the item is being purchased,
+
+ // NOTE DEJ20070808: this means that we want store related settings for where the item is being purchased,
//NOT where the account was setup; should this be changed to use settings from the store where the account was setup?
String productStoreId = orh.getProductStoreId();
-
+
// TODO, NOTE DEJ20070808: why is this setup this way anyway? for the allowAuthToNegative wouldn't that be better setup
//on the FinAccount and not on the ProductStoreFinActSetting? maybe an override on the FinAccount would be good...
@@ -125,7 +125,7 @@
// fin the store requires a pin number; validate the PIN with the code
Map findProductStoreFinActSettingMap = UtilMisc.toMap("productStoreId", productStoreId, "finAccountTypeId", finAccountTypeId);
GenericValue finAccountSettings = delegator.findByPrimaryKeyCache("ProductStoreFinActSetting", findProductStoreFinActSettingMap);
-
+
if (finAccountSettings == null) {
Debug.logWarning("In finAccountPreAuth could not find ProductStoreFinActSetting record, values searched by: " + findProductStoreFinActSettingMap, module);
}
@@ -206,8 +206,8 @@
Debug.logWarning("In finAccountPreAuth for finAccountId [" + finAccountId + "] availableBalance [" + availableBalanceOriginal + "] was different after rounding [" + availableBalance + "]; it should never have made it into the database this way, so check whatever put it there.", module);
}
}
-
-
+
+
Map result = ServiceUtil.returnSuccess();
String authMessage = null;
Boolean processResult;
@@ -221,7 +221,7 @@
if (("Y".equals(allowAuthToNegative) && availableBalance.compareTo(minBalance) > -1)
|| (availableBalance.compareTo(amount) > -1)) {
Timestamp thruDate;
-
+
if (finAccountSettings != null && finAccountSettings.getLong("authValidDays") != null) {
thruDate = UtilDateTime.getDayEnd(UtilDateTime.nowTimestamp(), finAccountSettings.getLong("authValidDays"));
} else {
@@ -237,7 +237,7 @@
refNum = (String) tmpResult.get("finAccountAuthId");
processResult = Boolean.TRUE;
}
-
+
// refresh the account
finAccount.refresh();
} else {
@@ -252,7 +252,7 @@
result.put("authResult", processResult);
result.put("processAmount", amount);
result.put("authFlag", "1");
- result.put("authCode", "A");
+ result.put("authCode", "A");
result.put("authRefNum", refNum);
Debug.logInfo("FinAccont Auth: " + result, module);
@@ -280,7 +280,7 @@
if (authTransaction == null) {
return ServiceUtil.returnError(err + " Could not find authorization transaction.");
}
-
+
Map input = UtilMisc.toMap("userLogin", userLogin, "finAccountAuthId", authTransaction.get("referenceNum"));
Map serviceResults = dispatcher.runSync("expireFinAccountAuth", input);
@@ -365,9 +365,9 @@
partyId = billToParty.getString("partyId");
}
}
-
- // BIG NOTE: make sure the expireFinAccountAuth and finAccountWithdraw services are done in the SAME TRANSACTION
- //(ie no require-new-transaction in either of them AND no running async)
+
+ // BIG NOTE: make sure the expireFinAccountAuth and finAccountWithdraw services are done in the SAME TRANSACTION
+ //(ie no require-new-transaction in either of them AND no running async)
// cancel the authorization before doing the withdraw to avoid problems with way negative available amount on account; should happen in same transaction to avoid conflict problems
Map releaseResult;
@@ -622,11 +622,11 @@
return ServiceUtil.returnError("Financial account has expired as of " + finAccount.getTimestamp("thruDate"));
}
Debug.log("Deposit into financial account #" + finAccountId + " [" + amount + "]", module);
-
+
// get the previous balance
BigDecimal previousBalance = finAccount.getBigDecimal("actualBalance");
if (previousBalance == null) {
- previousBalance = FinAccountHelper.ZERO;
+ previousBalance = FinAccountHelper.ZERO;
}
// create the transaction
@@ -663,7 +663,7 @@
result.put("balance", actualBalance);
result.put("amount", amount);
result.put("processResult", Boolean.TRUE);
- result.put("referenceNum", refNum);
+ result.put("referenceNum", refNum);
return result;
}
@@ -747,7 +747,7 @@
if (balance.compareTo(replenishThreshold) > -1) {
Debug.logInfo("finAccountReplenish Info: Not replenishing FinAccount [" + finAccountId + "] because balance [" + balance + "] is greater than the replenishThreshold [" + replenishThreshold + "]", module);
// not ready
- return ServiceUtil.returnSuccess();
+ return ServiceUtil.returnSuccess();
}
// configure rollback service to set status to Negative Pending Replenishment
@@ -855,7 +855,7 @@
return ServiceUtil.returnError(e.getMessage());
}
}
-
+
return ServiceUtil.returnSuccess();
}
@@ -892,10 +892,10 @@
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
-
+
return null;
}
-
+
private static String createFinAcctPaymentTransaction(GenericDelegator delegator, LocalDispatcher dispatcher, GenericValue userLogin, BigDecimal amount,
String productStoreId, String partyId, String orderId, String orderItemSeqId, String currencyUom, String txType, String finAccountId, String reasonEnumId) throws GeneralException {
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java?rev=757093&r1=757092&r2=757093&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java Sat Mar 21 23:44:59 2009
@@ -162,7 +162,7 @@
}
}
}
-
+
// create the context for FSE
Map expContext = FastMap.newInstance();
expContext.put("orderHeader", orderHeader);
@@ -176,9 +176,9 @@
finAccountName = exp.expandString(expContext);
// price/amount/quantity to create initial deposit amount
- BigDecimal quantity = orderItem.getBigDecimal("quantity");
+ BigDecimal quantity = orderItem.getBigDecimal("quantity");
BigDecimal price = orderItem.getBigDecimal("unitPrice");
- BigDecimal deposit = price.multiply(quantity).setScale(FinAccountHelper.decimals, FinAccountHelper.rounding);
+ BigDecimal deposit = price.multiply(quantity).setScale(FinAccountHelper.decimals, FinAccountHelper.rounding);
// create the financial account
Map createCtx = FastMap.newInstance();
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java?rev=757093&r1=757092&r2=757093&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java Sat Mar 21 23:44:59 2009
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -41,7 +41,7 @@
import javolution.util.FastMap;
public class FinAccountServices {
-
+
public static final String module = FinAccountServices.class.getName();
public static Map createAccountAndCredit(DispatchContext dctx, Map context) {
@@ -53,7 +53,7 @@
// check the type
if (finAccountTypeId == null) {
- finAccountTypeId = "SVCCRED_ACCOUNT";
+ finAccountTypeId = "SVCCRED_ACCOUNT";
}
if (accountName == null) {
if ("SVCCRED_ACCOUNT".equals(finAccountTypeId)) {
@@ -150,7 +150,7 @@
transactionMap.put("reasonEnumId", context.get("reasonEnumId"));
transactionMap.put("comments", context.get("comments"));
transactionMap.put("userLogin", userLogin);
-
+
Map creditTransResult = dispatcher.runSync("createFinAccountTrans", transactionMap);
if (ServiceUtil.isError(creditTransResult) || ServiceUtil.isFailure(creditTransResult)) {
return creditTransResult;
@@ -171,15 +171,15 @@
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String productStoreId = (String) context.get("productStoreId");
- String finAccountTypeId = (String) context.get("finAccountTypeId");
-
+ String finAccountTypeId = (String) context.get("finAccountTypeId");
+
try {
// get the product store id and use it to generate a unique fin account code
GenericValue productStoreFinAccountSetting = delegator.findByPrimaryKeyCache("ProductStoreFinActSetting", UtilMisc.toMap("productStoreId", productStoreId, "finAccountTypeId", finAccountTypeId));
if (productStoreFinAccountSetting == null) {
return ServiceUtil.returnError("No settings found for store [" + productStoreId + "] for fin account type [" + finAccountTypeId + "]");
}
-
+
Long accountCodeLength = productStoreFinAccountSetting.getLong("accountCodeLength");
Long accountValidDays = productStoreFinAccountSetting.getLong("accountValidDays");
Long pinCodeLength = productStoreFinAccountSetting.getLong("pinCodeLength");
@@ -210,7 +210,7 @@
inContext.put("organizationPartyId", payToPartyId);
Map createResult = dispatcher.runSync("createFinAccount", inContext);
-
+
if (ServiceUtil.isError(createResult)) {
return createResult;
} else {
@@ -286,7 +286,7 @@
return ServiceUtil.returnError(ex.getMessage());
}
- if (finAccount != null) {
+ if (finAccount != null) {
String statusId = finAccount.getString("statusId");
if (statusId == null) statusId = "FNACT_ACTIVE";
@@ -332,7 +332,7 @@
if (finAccount != null) {
// check to make sure the account is refundable
if (!"Y".equals(finAccount.getString("isRefundable"))) {
- return ServiceUtil.returnError("Account is not refunable");
+ return ServiceUtil.returnError("Account is not refunable");
}
// get the actual and available balance
@@ -368,7 +368,7 @@
GenericValue productStore = delegator.getRelatedOne("ProductStore", orderHeader);
GenericValue orderItem = delegator.findByPrimaryKey("OrderItem", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId));
if (!"ITEM_CANCELLED".equals(orderItem.getString("statusId"))) {
-
+
// make sure the item hasn't already been returned
List returnItems = orderItem.getRelated("ReturnItem");
if (returnItems == null || returnItems.size() == 0) {