[OFBiz] SVN: r6522 - in trunk/applications/order: src/org/ofbiz/order/shoppingcart webapp/ordermgr/WEB-INF webapp/ordermgr/WEB-INF/actions/entry/cart webapp/ordermgr/entry/cart widget/ordermgr
sichen@svn.ofbiz.org
sichen at svn.ofbiz.org
Tue Jan 17 17:32:12 CST 2006
Author: sichen
Date: 2006-01-17 17:31:59 -0600 (Tue, 17 Jan 2006)
New Revision: 6522
Added:
trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddProducts.bsh
Modified:
trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
trunk/applications/order/webapp/ordermgr/entry/cart/showcart.ftl
trunk/applications/order/widget/ordermgr/OrderEntryCartScreens.xml
trunk/applications/order/widget/ordermgr/OrderEntryForms.xml
Log:
New feature where a quick lookup during order entry would show a list of products which could be added all at the same time when there's an entered quantity. OFBIZ-622. Thanks to Mu Jinsong for his help.
Modified: trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
===================================================================
--- trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java 2006-01-17 22:46:38 UTC (rev 6521)
+++ trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java 2006-01-17 23:31:59 UTC (rev 6522)
@@ -23,42 +23,42 @@
*/
package org.ofbiz.order.shoppingcart;
-import java.text.NumberFormat;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilFormatOut;
import org.ofbiz.base.util.UtilHttp;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.entity.GenericDelegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericPK;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.order.shoppingcart.product.ProductPromoWorker;
import org.ofbiz.product.catalog.CatalogWorker;
import org.ofbiz.product.config.ProductConfigWorker;
import org.ofbiz.product.config.ProductConfigWrapper;
+import org.ofbiz.product.product.ProductWorker;
import org.ofbiz.product.store.ProductStoreSurveyWrapper;
import org.ofbiz.product.store.ProductStoreWorker;
-import org.ofbiz.product.product.ProductWorker;
-import org.ofbiz.order.shoppingcart.product.ProductPromoWorker;
import org.ofbiz.security.Security;
+import org.ofbiz.service.GenericServiceException;
import org.ofbiz.service.LocalDispatcher;
import org.ofbiz.service.ModelService;
import org.ofbiz.service.ServiceUtil;
import org.ofbiz.webapp.control.RequestHandler;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.text.NumberFormat;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
/**
* Shopping cart events.
*
@@ -231,13 +231,13 @@
}
else reservEnd = null;
}
-
+
if (reservStart != null && reservEnd != null) {
reservLength = UtilDateTime.getInterval(reservStart,reservEnd)/86400000;
}
-
-
-
+
+
+
if (reservStart != null && paramMap.containsKey("reservLength")) {
reservLengthStr = (String) paramMap.remove("reservLength");
// parse the reservation Length
@@ -824,10 +824,10 @@
String termDays = request.getParameter("termDays");
String termIndex = request.getParameter("termIndex");
Locale locale = UtilHttp.getLocale(request);
-
+
Double dTermValue = null;
Long lTermDays = null;
-
+
if (termValue.trim().equals("")) {
termValue = null;
}
@@ -855,7 +855,7 @@
if ((termIndex != null) && (termIndex != "-1") && (UtilValidate.isInteger(termIndex))) {
cartHelper.removeOrderTerm(Integer.parseInt(termIndex));
}
-
+
Map result = cartHelper.addOrderTerm(termTypeId, dTermValue, lTermDays);
if (ServiceUtil.isError(result)) {
request.setAttribute("_ERROR_MESSAGE_", ServiceUtil.getErrorMessage(result));
@@ -878,32 +878,32 @@
}
return "success";
}
-
+
/** Initialize order entry from a shopping list **/
public static String loadCartFromShoppingList(HttpServletRequest request, HttpServletResponse response) {
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
HttpSession session = request.getSession();
GenericValue userLogin = (GenericValue)session.getAttribute("userLogin");
Locale locale = UtilHttp.getLocale(request);
-
+
String shoppingListId = request.getParameter("shoppingListId");
-
+
ShoppingCart cart = null;
try {
Map outMap = dispatcher.runSync("loadCartFromShoppingList",
UtilMisc.toMap("shoppingListId", shoppingListId,
"userLogin", userLogin));
cart = (ShoppingCart)outMap.get("shoppingCart");
- } catch(Exception exc) {
+ } catch(GenericServiceException exc) {
request.setAttribute("_ERROR_MESSAGE_", exc.getMessage());
return "error";
}
-
+
session.setAttribute("shoppingCart", cart);
session.setAttribute("productStoreId", cart.getProductStoreId());
session.setAttribute("orderMode", cart.getOrderType());
session.setAttribute("orderPartyId", cart.getOrderPartyId());
-
+
return "success";
}
@@ -913,31 +913,31 @@
HttpSession session = request.getSession();
GenericValue userLogin = (GenericValue)session.getAttribute("userLogin");
Locale locale = UtilHttp.getLocale(request);
-
+
String quoteId = request.getParameter("quoteId");
-
+
ShoppingCart cart = null;
try {
Map outMap = dispatcher.runSync("loadCartFromQuote",
- UtilMisc.toMap("quoteId", quoteId,
- "applyQuoteAdjustments", "true",
- "userLogin", userLogin));
- cart = (ShoppingCart)outMap.get("shoppingCart");
- } catch(Exception exc) {
+ UtilMisc.toMap("quoteId", quoteId,
+ "applyQuoteAdjustments", "true",
+ "userLogin", userLogin));
+ cart = (ShoppingCart) outMap.get("shoppingCart");
+ } catch (GenericServiceException exc) {
request.setAttribute("_ERROR_MESSAGE_", exc.getMessage());
return "error";
}
-
+
// Set the cart's default checkout options for a quick checkout
cart.setDefaultCheckoutOptions(dispatcher);
// Make the cart read-only
cart.setReadOnlyCart(true);
-
+
session.setAttribute("shoppingCart", cart);
session.setAttribute("productStoreId", cart.getProductStoreId());
session.setAttribute("orderMode", cart.getOrderType());
session.setAttribute("orderPartyId", cart.getOrderPartyId());
-
+
return "success";
}
@@ -951,11 +951,11 @@
Map result = null;
String quoteId = null;
try {
- result = dispatcher.runSync("createQuoteFromCart",
- UtilMisc.toMap("cart", cart,
- "userLogin", userLogin));
- quoteId = (String)result.get("quoteId");
- } catch(Exception exc) {
+ result = dispatcher.runSync("createQuoteFromCart",
+ UtilMisc.toMap("cart", cart,
+ "userLogin", userLogin));
+ quoteId = (String) result.get("quoteId");
+ } catch (GenericServiceException exc) {
request.setAttribute("_ERROR_MESSAGE_", exc.getMessage());
return "error";
}
@@ -976,16 +976,16 @@
HttpSession session = request.getSession();
GenericValue userLogin = (GenericValue)session.getAttribute("userLogin");
String destroyCart = request.getParameter("destroyCart");
-
+
ShoppingCart cart = getCartObject(request);
Map result = null;
String custRequestId = null;
try {
- result = dispatcher.runSync("createCustRequestFromCart",
- UtilMisc.toMap("cart", cart,
- "userLogin", userLogin));
- custRequestId = (String)result.get("custRequestId");
- } catch(Exception exc) {
+ result = dispatcher.runSync("createCustRequestFromCart",
+ UtilMisc.toMap("cart", cart,
+ "userLogin", userLogin));
+ custRequestId = (String) result.get("custRequestId");
+ } catch (GenericServiceException exc) {
request.setAttribute("_ERROR_MESSAGE_", exc.getMessage());
return "error";
}
@@ -1009,14 +1009,14 @@
GenericValue userLogin = (GenericValue)session.getAttribute("userLogin");
String finalizeMode = (String)session.getAttribute("finalizeMode");
Locale locale = UtilHttp.getLocale(request);
-
+
String productStoreId = request.getParameter("productStoreId");
-
+
if (UtilValidate.isNotEmpty(productStoreId)) {
session.setAttribute("productStoreId", productStoreId);
}
ShoppingCart cart = getCartObject(request);
-
+
// TODO: re-factor and move this inside the ShoppingCart constructor
String orderMode = request.getParameter("orderMode");
if (orderMode != null) {
@@ -1026,13 +1026,13 @@
request.setAttribute("_ERROR_MESSAGE_", UtilProperties.getMessage(resource_error,"OrderPleaseSelectEitherSaleOrPurchaseOrder", locale));
return "error";
}
-
+
// check the selected product store
GenericValue productStore = null;
if (UtilValidate.isNotEmpty(productStoreId)) {
productStore = ProductStoreWorker.getProductStore(productStoreId, delegator);
if (productStore != null) {
-
+
// check permission for taking the order
boolean hasPermission = false;
if ((cart.getOrderType().equals("PURCHASE_ORDER")) && (security.hasEntityPermission("ORDERMGR", "_PURCHASE_CREATE", session))) {
@@ -1055,7 +1055,7 @@
}
}
}
-
+
if (hasPermission) {
cart = ShoppingCartEvents.getCartObject(request, null, productStore.getString("defaultCurrencyUomId"));
} else {
@@ -1069,19 +1069,19 @@
cart.setProductStoreId(null);
}
}
-
+
if ("SALES_ORDER".equals(cart.getOrderType()) && UtilValidate.isEmpty(cart.getProductStoreId())) {
request.setAttribute("_ERROR_MESSAGE_", UtilProperties.getMessage(resource_error,"OrderAProductStoreMustBeSelectedForASalesOrder", locale));
cart.clear();
session.removeAttribute("orderMode");
return "error";
}
-
+
String salesChannelEnumId = request.getParameter("salesChannelEnumId");
if (UtilValidate.isNotEmpty(salesChannelEnumId)) {
cart.setChannelType(salesChannelEnumId);
}
-
+
// set party info
String partyId = request.getParameter("supplierPartyId");
if (!UtilValidate.isEmpty(request.getParameter("partyId"))) {
@@ -1123,17 +1123,17 @@
partyId = cart.getPartyId();
if (partyId != null && partyId.equals("_NA_")) partyId = null;
}
-
+
return "success";
}
-
+
/** Route order entry **/
public static String routeOrderEntry(HttpServletRequest request, HttpServletResponse response) {
HttpSession session = request.getSession();
-
+
String orderMode = (String)session.getAttribute("orderMode");
String orderModePar = request.getParameter("orderMode"); // orderModePar != null when this request is coming from the init page
-
+
if (orderMode == null) {
return "init";
}
@@ -1172,4 +1172,109 @@
return "success";
}
+
+ public static String bulkAddProducts(HttpServletRequest request, HttpServletResponse response) {
+ GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
+ ShoppingCart cart = ShoppingCartEvents.getCartObject(request);
+ ShoppingCartHelper cartHelper = new ShoppingCartHelper(delegator, dispatcher, cart);
+ String controlDirective = null;
+ Map result = null;
+ String productId = null;
+ String productCategoryId = null;
+ String quantityStr = null;
+ String itemDesiredDeliveryDateStr = null;
+ double quantity = 0;
+ String catalogId = CatalogWorker.getCurrentCatalogId(request);
+
+ String rowCountField = null;
+ int rowCount = 0; // number of rows of products to add
+ String DELIMITER = "_o_"; // delimiter, separating field from row number
+
+ // Get the parameters as a MAP, remove the productId and quantity params.
+ Map paramMap = UtilHttp.getParameterMap(request);
+
+ // Get shoppingList info if passed. I think there can only be one shoppingList per request
+ String shoppingListId = request.getParameter("shoppingListId");
+ String shoppingListItemSeqId = request.getParameter("shoppingListItemSeqId");
+
+ // try to get the rowCount information passed in from request
+ if (paramMap.containsKey("_rowCount")) {
+ rowCountField = (String) paramMap.remove("_rowCount");
+ } else {
+ Debug.logWarning("No _rowCount was passed in", ShoppingCartEvents.module);
+ }
+ try {
+ rowCount = Integer.parseInt(rowCountField);
+ } catch (NumberFormatException e) {
+ Debug.logWarning("Invalid value for rowCount =" + rowCountField, module);
+ }
+
+ if (rowCount < 1) {
+ Debug.logWarning("No rows to process, as rowCount = " + rowCount, module);
+ } else {
+ for (int i = 0; i < rowCount; i++) {
+ controlDirective = null; // re-initialize each time
+ String thisSuffix = DELIMITER + i; // current suffix after each field id
+
+ // get the productId
+ if (paramMap.containsKey("productId" + thisSuffix)) {
+ productId = (String) paramMap.remove("productId" + thisSuffix);
+ }
+
+ if (paramMap.containsKey("quantity" + thisSuffix)) {
+ quantityStr = (String) paramMap.remove("quantity" + thisSuffix);
+ }
+ if ((quantityStr == null) || (quantityStr.equals(""))){ // otherwise, every empty value causes an exception and makes the log ugly
+ quantityStr = "0"; // default quantity is 0, so without a quantity input, this field will not be added
+ }
+
+ // parse the quantity
+ try {
+ quantity = NumberFormat.getNumberInstance().parse(quantityStr).doubleValue();
+ } catch (Exception e) {
+ Debug.logWarning(e, "Problems parsing quantity string: " + quantityStr, module);
+ quantity = 0;
+ }
+
+ // get the selected amount
+ String selectedAmountStr = "0.00";
+ if (paramMap.containsKey("amount" + thisSuffix)) {
+ selectedAmountStr = (String) paramMap.remove("amount" + thisSuffix);
+ }
+
+ // parse the amount
+ double amount = 0.00;
+ if (selectedAmountStr != null && selectedAmountStr.length() > 0) {
+ try {
+ amount = NumberFormat.getNumberInstance().parse(selectedAmountStr).doubleValue();
+ } catch (Exception e) {
+ Debug.logWarning(e, "Problem parsing amount string: " + selectedAmountStr, module);
+ amount = 0.00;
+ }
+ }
+
+ if (paramMap.containsKey("itemDesiredDeliveryDate" + thisSuffix)) {
+ itemDesiredDeliveryDateStr = (String) paramMap.remove("itemDesiredDeliveryDate" + thisSuffix);
+ }
+
+ Map itemAttributes = UtilMisc.toMap("itemDesiredDeliveryDate", itemDesiredDeliveryDateStr);
+
+ if (quantity > 0) {
+ Debug.logInfo("Attempting to add to cart with productId = " + productId + ", categoryId = " + productCategoryId +
+ " and quantity = " + quantity, module);
+ result = cartHelper.addToCart(catalogId, shoppingListId, shoppingListItemSeqId, productId, productCategoryId,
+ "", "", 0.00, amount, quantity, null, 0.00, 0.00, null, itemAttributes);
+ // no values for itemType, itemDescription, price, and paramMap (a context for adding attributes)
+ controlDirective = processResult(result, request);
+ if (controlDirective.equals(ERROR)){ // if the add to cart failed, then get out of this loop right away
+ return "error";
+ }
+ }
+ }
+ }
+
+ // Determine where to send the browser
+ return cart.viewCartOnAdd() ? "viewcart" : "success";
+ }
}
Added: trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddProducts.bsh
===================================================================
--- trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddProducts.bsh 2006-01-17 22:46:38 UTC (rev 6521)
+++ trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddProducts.bsh 2006-01-17 23:31:59 UTC (rev 6522)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2003-2005 The Open For Business Project - www.ofbiz.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
+ * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+import org.ofbiz.entity.condition.EntityExpr;
+import org.ofbiz.entity.condition.EntityFunction;
+import org.ofbiz.entity.condition.EntityOperator;
+import org.ofbiz.entity.condition.EntityFieldValue;
+import org.ofbiz.entity.condition.EntityConditionList;
+import org.ofbiz.base.util.UtilMisc;
+
+productId = request.getParameter("productId");
+
+conditionList = new LinkedList();
+//make sure the look up is case insensitive
+conditionList.add(new EntityExpr(new EntityFunction.UPPER(new EntityFieldValue("productId")),
+ EntityOperator.LIKE, "%" + productId.toUpperCase() + "%"));
+
+conditionList.add(new EntityExpr("productTypeId", EntityOperator.NOT_EQUAL, "AGGREGATED"));
+conditionList.add(new EntityExpr("isVirtual", EntityOperator.NOT_EQUAL, "Y"));
+conditions = new EntityConditionList(conditionList,EntityOperator.AND);
+
+productList = delegator.findByCondition("Product", conditions, UtilMisc.toList("productId", "brandName", "internalName"), UtilMisc.toList("productId"));
+context.put("productList",productList);
+
Property changes on: trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddProducts.bsh
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ "Date Rev Author URL Id"
Name: svn:eol-style
+ native
Modified: trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
===================================================================
--- trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml 2006-01-17 22:46:38 UTC (rev 6521)
+++ trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml 2006-01-17 23:31:59 UTC (rev 6522)
@@ -474,6 +474,13 @@
<response name="success" type="view" value="keywordsearch"/>
<response name="error" type="view" value="keywordsearch"/>
</request-map>
+
+ <request-map uri="BulkAddProducts">
+ <security https="true" auth="true"/>
+ <event type="java" path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="bulkAddProducts"/>
+ <response name="success" type="request" value="orderentry"/>
+ <response name="error" type="request" value="orderentry"/>
+ </request-map>
<request-map uri="category">
<security https="true" auth="true"/>
<response name="success" type="view" value="category"/>
@@ -1205,7 +1212,7 @@
<request-map uri="LookupOrderHeader"><security https="true" auth="true"/><response name="success" type="view" value="LookupOrderHeader"/></request-map>
<request-map uri="LookupWorkEffort"><security https="true" auth="true"/><response name="success" type="view" value="LookupWorkEffort"/></request-map>
-
+ <request-map uri="LookupBulkAddProducts"><security https="true" auth="true"/><response name="success" type="view" value="LookupBulkAddProducts"/></request-map>
<!-- PDFs -->
<request-map uri="order.pdf"><security https="true" auth="true"/><response name="success" type="view" value="OrderPDF"/></request-map>
<request-map uri="return.pdf"><security https="true" auth="true"/><response name="success" type="view" value="ReturnPDF"/></request-map>
@@ -1345,7 +1352,7 @@
<view-map name="LookupOrderHeader" type="screen" page="component://order/widget/ordermgr/LookupScreens.xml#LookupOrderHeader"/>
<view-map name="LookupWorkEffort" type="screen" page="component://workeffort/widget/LookupScreens.xml#LookupWorkEffort"/>
-
+ <view-map name="LookupBulkAddProducts" type="screen" page="component://order/widget/ordermgr/OrderEntryCartScreens.xml#LookupBulkAddProducts"/>
<!-- PDFs -->
<view-map name="OrderPDF" type="screenfop" page="component://order/widget/ordermgr/OrderPrintForms.xml#OrderPDF" content-type="application/pdf" encoding="none"/>
<view-map name="ReturnPDF" type="screenfop" page="component://order/widget/ordermgr/OrderPrintForms.xml#ReturnPDF" content-type="application/pdf" encoding="none"/>
Modified: trunk/applications/order/webapp/ordermgr/entry/cart/showcart.ftl
===================================================================
--- trunk/applications/order/webapp/ordermgr/entry/cart/showcart.ftl 2006-01-17 22:46:38 UTC (rev 6521)
+++ trunk/applications/order/webapp/ordermgr/entry/cart/showcart.ftl 2006-01-17 23:31:59 UTC (rev 6522)
@@ -105,6 +105,9 @@
obj_lookupwindow.opener = window;
obj_lookupwindow.focus();
}
+function quicklookup(element) {
+ window.location='LookupBulkAddProducts?productId='+element.value;
+}
</script>
<div class="screenlet">
@@ -118,7 +121,7 @@
<td align="right"><div class="tableheadtext">${uiLabelMap.ProductProductId} :</div></td>
<td><input type="text" class="inputBox" size="25" name="add_product_id" value="${requestParameters.add_product_id?if_exists}"/>
<span class='tabletext'>
- <a href="javascript:quicklookup_popup(document.quickaddform.add_product_id)" class="buttontext">${uiLabelMap.OrderQuickLookup}</a>
+ <a href="javascript:quicklookup(document.quickaddform.add_product_id)" class="buttontext">${uiLabelMap.OrderQuickLookup}</a>
<a href="javascript:call_fieldlookup2(document.quickaddform.add_product_id,'LookupProduct');">
<img src="/images/fieldlookup.gif" width="15" height="14" border="0" alt="Click here For Field Lookup"/>
</a>
Modified: trunk/applications/order/widget/ordermgr/OrderEntryCartScreens.xml
===================================================================
--- trunk/applications/order/widget/ordermgr/OrderEntryCartScreens.xml 2006-01-17 22:46:38 UTC (rev 6521)
+++ trunk/applications/order/widget/ordermgr/OrderEntryCartScreens.xml 2006-01-17 23:31:59 UTC (rev 6522)
@@ -147,4 +147,19 @@
</widgets>
</section>
</screen>
+ <screen name="LookupBulkAddProducts">
+ <section>
+ <actions>
+ <set field="title" value="Bulk Add Product"/>
+ <script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddProducts.bsh"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonOrderEntryDecorator" location="component://order/widget/ordermgr/OrderEntryCommonScreens.xml">
+ <decorator-section name="body">
+ <include-form name="LookupBulkAddProducts" location="component://order/widget/ordermgr/OrderEntryForms.xml"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
</screens>
Modified: trunk/applications/order/widget/ordermgr/OrderEntryForms.xml
===================================================================
--- trunk/applications/order/widget/ordermgr/OrderEntryForms.xml 2006-01-17 22:46:38 UTC (rev 6521)
+++ trunk/applications/order/widget/ordermgr/OrderEntryForms.xml 2006-01-17 23:31:59 UTC (rev 6522)
@@ -135,4 +135,26 @@
</field>
</form>
+ <form name="LookupBulkAddProducts" type="multi" use-row-submit="true" list-name="productList" title=""
+ target="BulkAddProducts" default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext"
+ separate-columns="true">
+ <field name="productId" title="${uiLabelMap.ProductProductId}" widget-style="buttontext">
+ <hyperlink description="${productId}" target="/catalog/control/EditProductInventoryItems?productId=${productId}" target-type="inter-app"/>
+ </field>
+ <field name="brandName" widget-style="tabletext"><display/></field>
+ <field name="internalName" widget-style="tabletext"><display/></field>
+ <field name="quantity" title="${uiLabelMap.OrderQuantity}">
+ <text size="5" maxlength="10"/>
+ </field>
+ <field name="amount" title="${uiLabelMap.OrderAmount}">
+ <text size="5" maxlength="10"/>
+ </field>
+ <field name="itemDesiredDeliveryDate" title="${uiLabelMap.OrderDesiredDeliveryDate}" separate-column="true">
+ <date-time/>
+ </field>
+ <field name="submitButton" title="${uiLabelMap.OrderAddToOrder}" widget-style="smallSubmit">
+ <submit/>
+ </field>
+ </form>
+
</forms>
More information about the Svn
mailing list