Author: ashish
Date: Sun Sep 4 06:41:20 2016
New Revision: 1759147
URL: http://svn.apache.org/viewvc?rev=1759147&view=rev
Log:
Applied patch from jira issue - OFBIZ-8074 - Clean up commented out code in
Groovy for Order. Thanks Aman for the contribution.
Modified:
ofbiz/trunk/applications/order/groovyScripts/entry/OptionSettings.groovy
ofbiz/trunk/applications/order/groovyScripts/entry/cart/ShowPromotionDetails.groovy
ofbiz/trunk/applications/order/groovyScripts/entry/catalog/Category.groovy
ofbiz/trunk/applications/order/groovyScripts/entry/catalog/ProductDetail.groovy
ofbiz/trunk/applications/order/groovyScripts/order/FilterOrderList.groovy
ofbiz/trunk/applications/order/groovyScripts/quote/ViewQuoteProfit.groovy
Modified:
ofbiz/trunk/applications/order/groovyScripts/entry/OptionSettings.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/groovyScripts/entry/OptionSettings.groovy?rev=1759147&r1=1759146&r2=1759147&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/groovyScripts/entry/OptionSettings.groovy
(original)
+++ ofbiz/trunk/applications/order/groovyScripts/entry/OptionSettings.groovy
Sun Sep 4 06:41:20 2016
@@ -60,7 +60,6 @@ context.beforeDateStr = fromStr;
// create the afterDate for calendar
toCal = Calendar.getInstance();
toCal.setTime(new java.util.Date());
-//toCal.set(Calendar.DAY_OF_WEEK,
toCal.getActualMaximum(Calendar.DAY_OF_WEEK));
toCal.set(Calendar.HOUR_OF_DAY, toCal.getActualMaximum(Calendar.HOUR_OF_DAY));
toCal.set(Calendar.MINUTE, toCal.getActualMaximum(Calendar.MINUTE));
toCal.set(Calendar.SECOND, toCal.getActualMaximum(Calendar.SECOND));
Modified:
ofbiz/trunk/applications/order/groovyScripts/entry/cart/ShowPromotionDetails.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/groovyScripts/entry/cart/ShowPromotionDetails.groovy?rev=1759147&r1=1759146&r2=1759147&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/groovyScripts/entry/cart/ShowPromotionDetails.groovy
(original)
+++
ofbiz/trunk/applications/order/groovyScripts/entry/cart/ShowPromotionDetails.groovy
Sun Sep 4 06:41:20 2016
@@ -35,8 +35,6 @@ productPromoCategoryAlwaysList = EntityU
productIdsCond = [] as Set;
productIdsAction = [] as Set;
ProductPromoWorker.makeProductPromoCondActionIdSets(productPromoId,
productIdsCond, productIdsAction, delegator, null);
-// Debug.logInfo("productIdsCond=" + productIdsCond.toString(),
"showProductPromoDetails.bsh");
-// Debug.logInfo("productIdsAction=" + productIdsAction.toString(),
"showProductPromoDetails.bsh");
productIds = new TreeSet(productIdsCond);
productIds.addAll(productIdsAction);
Modified:
ofbiz/trunk/applications/order/groovyScripts/entry/catalog/Category.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/groovyScripts/entry/catalog/Category.groovy?rev=1759147&r1=1759146&r2=1759147&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/groovyScripts/entry/catalog/Category.groovy
(original)
+++ ofbiz/trunk/applications/order/groovyScripts/entry/catalog/Category.groovy
Sun Sep 4 06:41:20 2016
@@ -41,25 +41,6 @@ pageTitle = null;
metaDescription = null;
metaKeywords = null;
-/* NOTE DEJ20070220: this is a weird way to do this and caused unacceptable
side effects as described in the related
- * comment in the Main.groovy file
- *
- * NOTE JLR 20070221 this should be done using the same method than in add to
cart. I will do it like that and remove all this after.
- *
-if (productCategoryId) {
- session.setAttribute("productCategoryId", productCategoryId);// for
language change
- previousParams = session.getAttribute("_PREVIOUS_PARAMS_");
- if (previousParams) {
- previousParams =
UtilHttp.stripNamedParamsFromQueryString(previousParams, ["category_id"]);
- previousParams += "&category_id=" + productCategoryId;
- } else {
- previousParams = "category_id=" + productCategoryId;
- }
- session.setAttribute("_PREVIOUS_PARAMS_", previousParams); // for login
- context.previousParams = previousParams;
-}
- */
-
category = from("ProductCategory").where("productCategoryId",
productCategoryId).cache(true).queryOne();
if (category) {
if (category.detailScreen) {
Modified:
ofbiz/trunk/applications/order/groovyScripts/entry/catalog/ProductDetail.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/groovyScripts/entry/catalog/ProductDetail.groovy?rev=1759147&r1=1759146&r2=1759147&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/groovyScripts/entry/catalog/ProductDetail.groovy
(original)
+++
ofbiz/trunk/applications/order/groovyScripts/entry/catalog/ProductDetail.groovy
Sun Sep 4 06:41:20 2016
@@ -213,10 +213,6 @@ if (product) {
// if order is purchase then don't calculate available inventory for
product.
if (cart.isSalesOrder()) {
facilityId = productStore.inventoryFacilityId;
- /*
- productFacility = delegator.findOne("ProductFacility", [productId :
productId, facilityId : facilityId, true);
- context.daysToShip = productFacility?.daysToShip
- */
resultOutput = runService('getInventoryAvailableByFacility',
[productId : productId, facilityId : facilityId, useCache : false]);
totalAvailableToPromise = resultOutput.availableToPromiseTotal;
@@ -593,49 +589,6 @@ if (product) {
accessoryProducts = runService('getAssociatedProducts', [productId :
productId, type : "PRODUCT_ACCESSORY", checkViewAllow : true, prodCatalogId :
currentCatalogId]);
context.accessoryProducts = accessoryProducts.assocProducts;
- /*
- The following code is commented out because it is just an example of the
business logic to retrieve products with a similar feature.
-
- // get other cross-sell information: product with a common feature
- commonProductFeatureId = "SYMPTOM";
- // does this product have that feature?
- commonProductFeatureAndAppls =
delegator.findByAnd("ProductFeatureAndAppl", [productId : productId,
productFeatureTypeId : commonProductFeatureId], ["sequenceNum",
"defaultSequenceNum"], false);
- if (commonProductFeatureAndAppls) {
- commonProductFeatureIds =
EntityUtil.getFieldListFromEntityList(commonProductFeatureAndAppls,
"productFeatureId", true);
-
- // now search for other products that have this feature
- visitId = VisitHandler.getVisitId(session);
-
- productSearchConstraintList = [];
- productSearchConstraintList.add(new
ProductSearch.FeatureSetConstraint(commonProductFeatureIds));
- // make sure the view allow category is included
- productSearchConstraintList =
ProductSearchSession.ensureViewAllowConstraint(productSearchConstraintList,
currentCatalogId, delegator);
-
- // don't care about the sort on this one
- resultSortOrder = null;
-
- commonFeatureResultIdsOrig =
ProductSearch.searchProducts(productSearchConstraintList, resultSortOrder,
delegator, visitId);
- commonFeatureResultIds = [];
- commonFeatureResultIdIter = commonFeatureResultIdsOrig.iterator();
- while (commonFeatureResultIdIter.hasNext()) {
- commonFeatureResultId = commonFeatureResultIdIter.next();
- // filter out the current product
- if (commonFeatureResultId.equals(productId)) {
- continue;
- }
- // filter out all variants
- commonProduct = delegator.findOne("Product", [productId :
commonFeatureResultId], true);
- if ("Y".equals(commonProduct?.isVariant)) {
- continue;
- }
- commonFeatureResultIds.add(commonFeatureResultId);
- }
- if (commonFeatureResultIds) {
- context.commonFeatureResultIds = commonFeatureResultIds;
- }
- }
- */
-
// get the DIGITAL_DOWNLOAD related Content records to show the
contentName/description
downloadProductContentAndInfoList =
from("ProductContentAndInfo").where("productId", productId,
"productContentTypeId", "DIGITAL_DOWNLOAD").cache(true).queryList();
context.downloadProductContentAndInfoList =
downloadProductContentAndInfoList;
Modified:
ofbiz/trunk/applications/order/groovyScripts/order/FilterOrderList.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/groovyScripts/order/FilterOrderList.groovy?rev=1759147&r1=1759146&r2=1759147&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/groovyScripts/order/FilterOrderList.groovy
(original)
+++ ofbiz/trunk/applications/order/groovyScripts/order/FilterOrderList.groovy
Sun Sep 4 06:41:20 2016
@@ -44,7 +44,6 @@ filterPOsWithRejectedItems = [];
filterPartiallyReceivedPOs = [];
state = OrderListState.getInstance(request);
-//print("### " + state.toString());
if ((state.hasFilter("filterPartiallyReceivedPOs") ||
state.hasFilter("filterPOsOpenPastTheirETA") ||
Modified:
ofbiz/trunk/applications/order/groovyScripts/quote/ViewQuoteProfit.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/groovyScripts/quote/ViewQuoteProfit.groovy?rev=1759147&r1=1759146&r2=1759147&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/groovyScripts/quote/ViewQuoteProfit.groovy
(original)
+++ ofbiz/trunk/applications/order/groovyScripts/quote/ViewQuoteProfit.groovy
Sun Sep 4 06:41:20 2016
@@ -62,7 +62,6 @@ quoteItems.each { quoteItem ->
averageCost = productPrice.price * selectedAmount;
}
}
- //defaultQuoteUnitPrice = averageCost * costToPriceMult *
selectedAmount;
totalCost += (averageCost * quantity);
totalPrice += (unitPrice * quantity * selectedAmount);
} catch (Exception exc) {