Author: jaz
Date: Mon Mar 26 10:59:28 2007
New Revision: 522582
URL:
http://svn.apache.org/viewvc?view=rev&rev=522582Log:
added store related payToParty ID methods found in many places (moving to a central location)
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java?view=diff&rev=522582&r1=522581&r2=522582==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java Mon Mar 26 10:59:28 2007
@@ -128,6 +128,18 @@
return productStore == null ? false : "Y".equalsIgnoreCase(productStore.getString("autoSaveCart"));
}
+ public static String getProductStorePayToPartyId(String productStoreId, GenericDelegator delegator) {
+ return getProductStorePayToPartyId(getProductStore(productStoreId, delegator));
+ }
+
+ public static String getProductStorePayToPartyId(GenericValue productStore) {
+ String payToPartyId = "Company"; // default value
+ if (productStore != null && productStore.get("payToPartyId") != null) {
+ payToPartyId = productStore.getString("payToPartyId");
+ }
+ return payToPartyId;
+ }
+
public static String getProductStorePaymentProperties(ServletRequest request, String paymentMethodTypeId, String paymentServiceTypeEnumId, boolean anyServiceType) {
GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
String productStoreId = ProductStoreWorker.getProductStoreId(request);