You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2008/07/16 12:22:59 UTC
svn commit: r677232 - in /ofbiz/trunk/applications: marketing/widget/
order/webapp/ordermgr/WEB-INF/actions/reports/
order/webapp/ordermgr/WEB-INF/actions/request/ order/widget/ordermgr/
Author: lektran
Date: Wed Jul 16 03:22:58 2008
New Revision: 677232
URL: http://svn.apache.org/viewvc?rev=677232&view=rev
Log:
A few more bsh -> groovy conversions
Added:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.groovy
- copied, changed from r676509, ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.bsh
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/ReportList.groovy
- copied, changed from r677210, ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/reportlist.bsh
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy
- copied, changed from r677210, ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/getNextSequenceNum.bsh
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/RequestItemNotes.groovy
- copied, changed from r677210, ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/requestitemnotes.bsh
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/SetRequestQuote.groovy
- copied, changed from r677210, ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/setRequestQuote.bsh
Removed:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.bsh
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/reportlist.bsh
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/getNextSequenceNum.bsh
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/requestitemnotes.bsh
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/setRequestQuote.bsh
Modified:
ofbiz/trunk/applications/marketing/widget/MarketingReportScreens.xml
ofbiz/trunk/applications/order/widget/ordermgr/OrderReportScreens.xml
ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml
ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml
Modified: ofbiz/trunk/applications/marketing/widget/MarketingReportScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/MarketingReportScreens.xml?rev=677232&r1=677231&r2=677232&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/MarketingReportScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/MarketingReportScreens.xml Wed Jul 16 03:22:58 2008
@@ -48,7 +48,7 @@
<section>
<actions>
<set field="titleProperty" value="MarketingReports"/>
- <!-- <script location="component://order/webapp/ordermgr/WEB-INF/actions/reports/reportlist.bsh"/>-->
+ <!-- <script location="component://order/webapp/ordermgr/WEB-INF/actions/reports/ReportList.groovy"/>-->
</actions>
<widgets>
<decorator-screen name="CommonMarketReportDecorator">
Copied: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.groovy (from r676509, ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.bsh)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.groovy?p2=ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.groovy&p1=ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.bsh&r1=676509&r2=677232&rev=677232&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.groovy Wed Jul 16 03:22:58 2008
@@ -29,41 +29,41 @@
import org.ofbiz.entity.*;
import org.ofbiz.base.util.*;
-productStoreId = parameters.get("productStoreId");
-orderTypeId = parameters.get("orderTypeId");
-orderStatusId = parameters.get("orderStatusId");
-fromOrderDate = parameters.get("fromOrderDate");
-thruOrderDate = parameters.get("thruOrderDate");
+productStoreId = parameters.productStoreId;
+orderTypeId = parameters.orderTypeId;
+orderStatusId = parameters.orderStatusId;
+fromOrderDate = parameters.fromOrderDate;
+thruOrderDate = parameters.thruOrderDate;
// search by orderTypeId is mandatory
-conditions = UtilMisc.toList(EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, orderTypeId));
+conditions = [EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, orderTypeId)];
-if (UtilValidate.isDate(fromOrderDate) && UtilValidate.isNotEmpty(fromOrderDate)){
+if (fromOrderDate && UtilValidate.isDate(fromOrderDate)){
conditions.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromOrderDate));
}
-if (UtilValidate.isDate(thruOrderDate) && UtilValidate.isNotEmpty(thruOrderDate)){
+if (thruOrderDate && UtilValidate.isDate(thruOrderDate)){
conditions.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, thruOrderDate));
}
-if (productStoreId != null && productStoreId.length() > 0) {
+if (productStoreId) {
conditions.add(EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, productStoreId));
// for generating a title (given product store)
- context.put("productStore", delegator.findByPrimaryKeyCache("ProductStore", UtilMisc.toMap("productStoreId", productStoreId)));
+ context.productStore = delegator.findByPrimaryKeyCache("ProductStore", [productStoreId : productStoreId]);
} else {
// for generating a title (all stores) TODO: use UtilProperties to internationalize
- context.put("productStore", UtilMisc.toMap("storeName", "All Stores"));
+ context.productStore = [storeName : "All Stores"];
}
-if (orderStatusId != null && orderStatusId.length() > 0) {
+if (orderStatusId) {
conditions.add(EntityCondition.makeCondition("orderStatusId", EntityOperator.EQUALS, orderStatusId));
} else {
// search all orders that are not completed, cancelled or rejected
conditions.add(
- EntityCondition.makeCondition( UtilMisc.toList(
+ EntityCondition.makeCondition([
EntityCondition.makeCondition("orderStatusId", EntityOperator.NOT_EQUAL, "ORDER_COMPLETED"),
EntityCondition.makeCondition("orderStatusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
EntityCondition.makeCondition("orderStatusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED")
- ), EntityOperator.AND)
+ ], EntityOperator.AND)
);
}
@@ -74,77 +74,85 @@
// get the results as an entity list iterator
allConditions = EntityCondition.makeCondition( conditions, EntityOperator.AND );
-fieldsToSelect = UtilMisc.toSet("orderId", "orderDate", "productId", "quantityOrdered", "quantityIssued", "quantityOpen");
+fieldsToSelect = ["orderId", "orderDate", "productId", "quantityOrdered", "quantityIssued", "quantityOpen"] as Set;
fieldsToSelect.add("shipBeforeDate");
fieldsToSelect.add("shipAfterDate");
fieldsToSelect.add("itemDescription");
findOptions = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
-listIt = delegator.find("OrderItemQuantityReportGroupByItem", allConditions, null, fieldsToSelect, UtilMisc.toList("orderDate DESC"), findOptions);
-List orderItemList = new ArrayList();
-Double totalCostPrice = new Double(0.0);
-Double totalListPrice = new Double(0.0);
-Double totalMarkup = new Double(0.0);
-Double totalDiscount = new Double(0.0);
-Double totalRetailPrice = new Double(0.0);
-Double totalquantityOrdered = new Double(0.0);
-Double totalquantityOpen = new Double(0.0);
-
-while ((listValue = (GenericValue) listIt.next()) != null) {
- orderId = listValue.get("orderId");
- productId = listValue.get("productId");
- orderDate = listValue.get("orderDate");
- quantityOrdered = listValue.get("quantityOrdered");
- quantityOpen = listValue.get("quantityOpen");
- quantityIssued = listValue.get("quantityIssued");
- itemDescription = listValue.get("itemDescription");
- shipAfterDate = listValue.get("shipAfterDate");
- shipBeforeDate = listValue.get("shipBeforeDate");
- fieldsToSelect = UtilMisc.toSet("price","productPriceTypeId");
- productIdCondExpr = UtilMisc.toList(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId));
- prodPriceCond = EntityCondition.makeCondition(productIdCondExpr, EntityOperator.AND);
+listIt = delegator.find("OrderItemQuantityReportGroupByItem", allConditions, null, fieldsToSelect, ["orderDate DESC"], findOptions);
+orderItemList = [];
+totalCostPrice = 0.0;
+totalListPrice = 0.0;
+totalMarkup = 0.0;
+totalDiscount = 0.0;
+totalRetailPrice = 0.0;
+totalquantityOrdered = 0.0;
+totalquantityOpen = 0.0;
+
+listIt.each { listValue ->
+ orderId = listValue.orderId;
+ productId = listValue.productId;
+ orderDate = listValue.orderDate;
+ quantityOrdered = listValue.quantityOrdered;
+ quantityOpen = listValue.quantityOpen;
+ quantityIssued = listValue.quantityIssued;
+ itemDescription = listValue.itemDescription;
+ shipAfterDate = listValue.shipAfterDate;
+ shipBeforeDate = listValue.shipBeforeDate;
+ fieldsToSelect = ["price","productPriceTypeId"] as Set;
+ productIdCondExpr = [EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId)];
+ prodPriceCond = EntityCondition.makeCondition(productIdCondExpr, EntityOperator.AND);
productPrices = delegator.findList("ProductPrice", prodPriceCond, fieldsToSelect, null, null, false);
- Double costPrice = new Double(0.0);
- Double retailPrice = new Double(0.0);
- Double listPrice = new Double(0.0);
+ costPrice = 0.0;
+ retailPrice = 0.0;
+ listPrice = 0.0;
- Iterator productPricesItr = productPrices.iterator();
- while (productPricesItr.hasNext()) {
- productPriceMap = productPricesItr.next();
- if (productPriceMap.get("productPriceTypeId").equals("AVERAGE_COST")) {
- costPrice = productPriceMap.get("price");
- } else if (productPriceMap.get("productPriceTypeId").equals("DEFAULT_PRICE")) {
- retailPrice = productPriceMap.get("price");
- } else if (productPriceMap.get("productPriceTypeId").equals("LIST_PRICE")) {
- listPrice = productPriceMap.get("price");
- }
+ productPrices.each { productPriceMap ->
+ if (productPriceMap.productPriceTypeId.equals("AVERAGE_COST")) {
+ costPrice = productPriceMap.price;
+ } else if (productPriceMap.productPriceTypeId.equals("DEFAULT_PRICE")) {
+ retailPrice = productPriceMap.price;
+ } else if (productPriceMap.productPriceTypeId.equals("LIST_PRICE")) {
+ listPrice = productPriceMap.price;
+ }
}
-
+
totalListPrice += listPrice;
totalRetailPrice += retailPrice;
totalCostPrice += costPrice;
totalquantityOrdered += quantityOrdered;
totalquantityOpen += quantityOpen;
- orderItemMap = UtilMisc.toMap("orderDate", orderDate, "orderId", orderId, "productId", productId, "itemDescription", itemDescription, "quantityOrdered", quantityOrdered,"quantityIssued", quantityIssued);
- orderItemMap.put("quantityOpen",quantityOpen);
- orderItemMap.put("shipAfterDate",shipAfterDate);
- orderItemMap.put("shipBeforeDate",shipBeforeDate);
- orderItemMap.put("costPrice",costPrice);
- orderItemMap.put("retailPrice",retailPrice);
- orderItemMap.put("listPrice",listPrice);
- orderItemMap.put("discount",(Double.toString(listPrice- retailPrice)));
- orderItemMap.put("calculatedMarkup",(Double.toString(retailPrice - costPrice)));
- orderItemMap.put("percentMarkup",(Double.toString(((retailPrice - costPrice)/costPrice)*100)));
- orderItemList.add(orderItemMap);
+ orderItemMap = [orderDate : orderDate,
+ orderId : orderId,
+ productId : productId,
+ itemDescription : itemDescription,
+ quantityOrdered : quantityOrdered,
+ quantityIssued : quantityIssued,
+ quantityOpen : quantityOpen,
+ shipAfterDate : shipAfterDate,
+ shipBeforeDate : shipBeforeDate,
+ costPrice : costPrice,
+ retailPrice : retailPrice,
+ listPrice : listPrice,
+ discount : listPrice - retailPrice,
+ calculatedMarkup : retailPrice - costPrice,
+ percentMarkup : ((retailPrice - costPrice)/costPrice)*100];
+ orderItemList.add(orderItemMap);
}
listIt.close();
-List totalAmountList = new ArrayList();
-if (UtilValidate.isNotEmpty(orderItemList)) {
- totalAmountMap = UtilMisc.toMap("totalCostPrice", totalCostPrice, "totalListPrice", totalListPrice, "totalRetailPrice", totalRetailPrice, "totalquantityOrdered", totalquantityOrdered, "quantityOrdered", quantityOrdered,"totalquantityOpen", totalquantityOpen);
- totalAmountMap.put("totalDiscount",(totalListPrice - totalRetailPrice));
- totalAmountMap.put("totalMarkup",(totalRetailPrice - totalCostPrice));
- totalAmountMap.put("totalPercentMarkup",((totalRetailPrice - totalCostPrice)/totalCostPrice)*100);
+totalAmountList = [];
+if (orderItemList) {
+ totalAmountMap = [totalCostPrice : totalCostPrice,
+ totalListPrice : totalListPrice,
+ totalRetailPrice : totalRetailPrice,
+ totalquantityOrdered : totalquantityOrdered,
+ quantityOrdered : quantityOrdered,
+ totalquantityOpen : totalquantityOpen,
+ totalDiscount : totalListPrice - totalRetailPrice,
+ totalMarkup : totalRetailPrice - totalCostPrice,
+ totalPercentMarkup : ((totalRetailPrice - totalCostPrice)/totalCostPrice)*100];
totalAmountList.add(totalAmountMap);
}
-context.put("orderItemList", orderItemList);
-context.put("totalAmountList", totalAmountList);
+context.orderItemList = orderItemList;
+context.totalAmountList = totalAmountList;
Copied: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/ReportList.groovy (from r677210, ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/reportlist.bsh)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/ReportList.groovy?p2=ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/ReportList.groovy&p1=ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/reportlist.bsh&r1=677210&r2=677232&rev=677232&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/reportlist.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/ReportList.groovy Wed Jul 16 03:22:58 2008
@@ -20,25 +20,25 @@
import java.util.*;
import java.sql.Timestamp;
-Calendar fromCal = Calendar.getInstance();
+fromCal = Calendar.getInstance();
fromCal.setTime(new java.util.Date());
fromCal.set(Calendar.DAY_OF_WEEK, fromCal.getActualMinimum(Calendar.DAY_OF_WEEK));
fromCal.set(Calendar.HOUR_OF_DAY, fromCal.getActualMinimum(Calendar.HOUR_OF_DAY));
fromCal.set(Calendar.MINUTE, fromCal.getActualMinimum(Calendar.MINUTE));
fromCal.set(Calendar.SECOND, fromCal.getActualMinimum(Calendar.SECOND));
-Timestamp fromTs = new Timestamp(fromCal.getTimeInMillis());
-String fromStr = fromTs.toString();
+fromTs = new Timestamp(fromCal.getTimeInMillis());
+fromStr = fromTs.toString();
fromStr = fromStr.substring(0, fromStr.indexOf('.'));
-context.put("fromStr", fromStr);
+context.fromStr = fromStr;
-Calendar toCal = Calendar.getInstance();
+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));
-Timestamp toTs = new Timestamp(toCal.getTimeInMillis());
-String toStr = toTs.toString();
+toTs = new Timestamp(toCal.getTimeInMillis());
+toStr = toTs.toString();
toStr = toStr.substring(0, toStr.indexOf('.'));
-context.put("toStr", toStr);
+context.toStr = toStr;
Copied: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy (from r677210, ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/getNextSequenceNum.bsh)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy?p2=ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy&p1=ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/getNextSequenceNum.bsh&r1=677210&r2=677232&rev=677232&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/getNextSequenceNum.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy Wed Jul 16 03:22:58 2008
@@ -22,12 +22,12 @@
import org.ofbiz.entity.GenericValue;
long nextSequenceNum = 10;
-if (custRequestItem == null && custRequest != null) {
- List items = custRequest.getRelated("CustRequestItem", UtilMisc.toList("-sequenceNum"));
- GenericValue lastItem = EntityUtil.getFirst(items);
- if (lastItem != null && lastItem.get("sequenceNum") != null) {
- lastSequenceNum = lastItem.getLong("sequenceNum");
+if (!custRequestItem && custRequest) {
+ items = custRequest.getRelated("CustRequestItem", ["-sequenceNum"]);
+ lastItem = EntityUtil.getFirst(items);
+ if (lastItem?.sequenceNum) {
+ lastSequenceNum = lastItem.sequenceNum;
nextSequenceNum = lastSequenceNum + 10;
}
}
-context.put("nextSequenceNum", nextSequenceNum);
+context.nextSequenceNum = nextSequenceNum;
Copied: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/RequestItemNotes.groovy (from r677210, ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/requestitemnotes.bsh)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/RequestItemNotes.groovy?p2=ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/RequestItemNotes.groovy&p1=ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/requestitemnotes.bsh&r1=677210&r2=677232&rev=677232&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/requestitemnotes.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/RequestItemNotes.groovy Wed Jul 16 03:22:58 2008
@@ -20,21 +20,16 @@
import org.ofbiz.entity.*;
import org.ofbiz.base.util.*;
-delegator = request.getAttribute("delegator");
+custRequestId = parameters.custRequestId;
+custRequestItemSeqId = parameters.custRequestItemSeqId;
+showAll = parameters.showAll ?: "false";
+context.showAll = showAll;
-String custRequestId = request.getParameter("custRequestId");
-String custRequestItemSeqId = request.getParameter("custRequestItemSeqId");
-String showAll = request.getParameter("showAll");
-if (showAll == null) {
- showAll = "false";
-}
-context.put("showAll", showAll);
-
-Map fields = UtilMisc.toMap("custRequestId", custRequestId);
+fields = [custRequestId : custRequestId];
if (showAll.equals("false")) {
- fields.put("custRequestItemSeqId", custRequestItemSeqId);
+ fields.custRequestItemSeqId = custRequestItemSeqId;
}
-List notes = delegator.findByAnd("CustRequestItemNoteView", fields, UtilMisc.toList("-noteDateTime"));
-if (notes != null && notes.size() > 0) {
- context.put("notes", notes);
+notes = delegator.findByAnd("CustRequestItemNoteView", fields, ["-noteDateTime"]);
+if (notes) {
+ context.notes = notes;
}
Copied: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/SetRequestQuote.groovy (from r677210, ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/setRequestQuote.bsh)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/SetRequestQuote.groovy?p2=ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/SetRequestQuote.groovy&p1=ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/setRequestQuote.bsh&r1=677210&r2=677232&rev=677232&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/setRequestQuote.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/request/SetRequestQuote.groovy Wed Jul 16 03:22:58 2008
@@ -20,11 +20,11 @@
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.entity.util.EntityUtil;
-custRequestId = request.getParameter("custRequestId");
-if (custRequestId != null) {
- requestQuotes = delegator.findByAnd("QuoteItem", UtilMisc.toMap("custRequestId", custRequestId));
+custRequestId = parameters.custRequestId;
+if (custRequestId) {
+ requestQuotes = delegator.findByAnd("QuoteItem", [custRequestId : custRequestId]);
requestQuote = EntityUtil.getFirst(requestQuotes);
- if (requestQuote != null) {
- context.put("quoteId", requestQuote.getString("quoteId"));
+ if (requestQuote) {
+ context.quoteId = requestQuote.quoteId;
}
}
Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderReportScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderReportScreens.xml?rev=677232&r1=677231&r2=677232&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderReportScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderReportScreens.xml Wed Jul 16 03:22:58 2008
@@ -38,7 +38,7 @@
<actions>
<set field="title" value="Order Reports"/>
<set field="headerItem" value="reports"/>
- <script location="component://order/webapp/ordermgr/WEB-INF/actions/reports/reportlist.bsh"/>
+ <script location="component://order/webapp/ordermgr/WEB-INF/actions/reports/ReportList.groovy"/>
</actions>
<widgets>
<decorator-screen name="CommonOrderReportDecorator">
Modified: ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml?rev=677232&r1=677231&r2=677232&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml Wed Jul 16 03:22:58 2008
@@ -223,7 +223,7 @@
<set field="headerItem" value="reports"/>
<set field="viewSize" value="${parameters.VIEW_SIZE}" default-value="20" type="Integer"/>
<set field="viewIndex" value="${parameters.VIEW_INDEX}" default-value="0" type="Integer"/>
- <script location="component://order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.bsh"/>
+ <script location="component://order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
Modified: ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml?rev=677232&r1=677231&r2=677232&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml Wed Jul 16 03:22:58 2008
@@ -195,7 +195,7 @@
<entity-one entity-name="CustRequestItem" value-name="custRequestItem"/>
<set field="statusId" from-field="custRequestItem.statusId"/>
<entity-one entity-name="StatusItem" value-name="currentStatus"/>
- <script location="component://order/webapp/ordermgr/WEB-INF/actions/request/getNextSequenceNum.bsh"/>
+ <script location="component://order/webapp/ordermgr/WEB-INF/actions/request/GetNextSequenceNum.groovy"/>
</actions>
<widgets>
<decorator-screen name="CommonRequestDecorator" location="${parameters.mainDecoratorLocation}">
@@ -236,7 +236,7 @@
<set field="custRequestItemSeqId" from-field="parameters.custRequestItemSeqId"/>
<entity-one entity-name="CustRequest" value-name="custRequest"/>
<entity-one entity-name="CustRequestItem" value-name="custRequestItem"/>
- <script location="component://order/webapp/ordermgr/WEB-INF/actions/request/requestitemnotes.bsh"/>
+ <script location="component://order/webapp/ordermgr/WEB-INF/actions/request/RequestItemNotes.groovy"/>
</actions>
<widgets>
<decorator-screen name="CommonRequestDecorator" location="${parameters.mainDecoratorLocation}">
@@ -318,7 +318,7 @@
<field-map env-name="custRequestItem.custRequestId" field-name="custRequestId"/>
<field-map env-name="custRequestItem.custRequestItemSeqId" field-name="custRequestItemSeqId"/>
</entity-and>
- <script location="component://order/webapp/ordermgr/WEB-INF/actions/request/setRequestQuote.bsh"/>
+ <script location="component://order/webapp/ordermgr/WEB-INF/actions/request/SetRequestQuote.groovy"/>
</actions>
<widgets>
<decorator-screen name="CommonRequestDecorator" location="${parameters.mainDecoratorLocation}">