[OFBiz] SVN: r4991 - in trunk/applications/order: config entitydef
servicedef webapp/ordermgr/WEB-INF webapp/ordermgr/WEB-INF/actions
webapp/ordermgr/WEB-INF/actions/entry
webapp/ordermgr/WEB-INF/actions/quote webapp/ordermgr/quote
widget/ordermgr
jacopo at svn.ofbiz.org
jacopo at svn.ofbiz.org
Sat May 14 12:26:02 EDT 2005
Author: jacopo
Date: 2005-05-14 11:24:27 -0500 (Sat, 14 May 2005)
New Revision: 4991
Added:
trunk/applications/order/webapp/ordermgr/WEB-INF/actions/quote/
trunk/applications/order/webapp/ordermgr/WEB-INF/actions/quote/ManageQuotePrices.bsh
trunk/applications/order/webapp/ordermgr/quote/ManageQuotePrices.ftl
trunk/applications/order/webapp/ordermgr/quote/ManageQuotePricesTotals.ftl
Modified:
trunk/applications/order/config/OrderUiLabels.properties
trunk/applications/order/entitydef/entitygroup.xml
trunk/applications/order/entitydef/entitymodel.xml
trunk/applications/order/servicedef/services_quote.xml
trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetShoppingCart.bsh
trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml
trunk/applications/order/webapp/ordermgr/quote/QuoteTabBar.ftl
trunk/applications/order/widget/ordermgr/OrderEntryForms.xml
trunk/applications/order/widget/ordermgr/OrderEntryScreens.xml
trunk/applications/order/widget/ordermgr/QuoteScreens.xml
Log:
Improvements to the quote stuff (plus misc fixes):
- added new entity and services to manage coefficients for a quote: the coefficients are used to quickly calculate default prices for quote items based on product's averageCost
- added new screen to manage quote prices
- added some missing uilabels
Modified: trunk/applications/order/config/OrderUiLabels.properties
===================================================================
--- trunk/applications/order/config/OrderUiLabels.properties 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/config/OrderUiLabels.properties 2005-05-14 16:24:27 UTC (rev 4991)
@@ -168,7 +168,17 @@
OrderOrderNumber=Order Number
OrderOrderOptionSettings=Order Option Settings
OrderOrderPurchaseToBeScheduled=Order Purchase To Be Scheluded
+OrderOrderQuote=Quote
OrderOrderQuotes=Quotes
+OrderOrderQuoteItem=Quote Item
+OrderOrderQuoteItems=Quote Items
+OrderOrderQuotePrices=Quote Prices
+OrderOrderQuoteAttributes=Quote Attributes
+OrderOrderQuoteCoefficients=Quote Coefficients
+OrderCreateOrderQuote=Create New Quote
+OrderCreateOrderQuoteItem=Create New Quote Item
+OrderCreateOrderQuoteAttribute=Create New Quote Attribute
+OrderCreateOrderQuoteCoefficient=Create New Quote Coefficient
OrderOrderReturn=Return
OrderOrderReturns=Returns
OrderOrderShortcuts=Shortcuts
@@ -185,8 +195,6 @@
OrderQuantity=Quantity
OrderQuickRefundEntireOrder=Quick Refund Entire Order
OrderQuickShipEntireOrder=Quick Ship Entire Order
-OrderQuote=Order Quote
-OrderQuotes=Order Quote
OrderRecalculateOrder=Recalculate Order
OrderReceiveReturn=Receive Return
OrderRemaining=Remaining
Modified: trunk/applications/order/entitydef/entitygroup.xml
===================================================================
--- trunk/applications/order/entitydef/entitygroup.xml 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/entitydef/entitygroup.xml 2005-05-14 16:24:27 UTC (rev 4991)
@@ -105,6 +105,7 @@
<entity-group group="org.ofbiz" entity="QuoteTermAttribute" />
<entity-group group="org.ofbiz" entity="QuoteType" />
<entity-group group="org.ofbiz" entity="QuoteTypeAttr" />
+ <entity-group group="org.ofbiz" entity="QuoteCoefficient" />
<!-- ========================================================= -->
<!-- org.ofbiz.order.request -->
Modified: trunk/applications/order/entitydef/entitymodel.xml
===================================================================
--- trunk/applications/order/entitydef/entitymodel.xml 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/entitydef/entitymodel.xml 2005-05-14 16:24:27 UTC (rev 4991)
@@ -1424,6 +1424,18 @@
<key-map field-name="quoteTypeId"/>
</relation>
</entity>
+ <entity entity-name="QuoteCoefficient"
+ package-name="org.ofbiz.order.quote"
+ title="Quote Coefficient Entity">
+ <field name="quoteId" type="id-ne"></field>
+ <field name="coeffName" type="id-long-ne"></field>
+ <field name="coeffValue" type="floating-point"></field>
+ <prim-key field="quoteId"/>
+ <prim-key field="coeffName"/>
+ <relation type="one" fk-name="QUOTE_COEFF" rel-entity-name="Quote">
+ <key-map field-name="quoteId"/>
+ </relation>
+ </entity>
<!-- ========================================================= -->
<!-- org.ofbiz.order.request -->
Modified: trunk/applications/order/servicedef/services_quote.xml
===================================================================
--- trunk/applications/order/servicedef/services_quote.xml 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/servicedef/services_quote.xml 2005-05-14 16:24:27 UTC (rev 4991)
@@ -78,6 +78,25 @@
<auto-attributes include="pk" mode="IN" optional="true"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
+ <!-- QuoteCoefficient -->
+ <service name="createQuoteCoefficient" default-entity-name="QuoteCoefficient" engine="simple"
+ location="org/ofbiz/order/quote/QuoteServices.xml" invoke="createQuoteCoefficient" auth="true">
+ <description>Create a QuoteCoefficient</description>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
+ </service>
+ <service name="updateQuoteCoefficient" default-entity-name="QuoteCoefficient" engine="simple"
+ location="org/ofbiz/order/quote/QuoteServices.xml" invoke="updateQuoteCoefficient" auth="true">
+ <description>Update a QuoteCoefficient</description>
+ <auto-attributes include="pk" mode="IN" optional="true"/>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
+ </service>
+ <service name="removeQuoteCoefficient" engine="simple" default-entity-name="QuoteCoefficient"
+ location="org/ofbiz/order/quote/QuoteServices.xml" invoke="removeQuoteCoefficient" auth="true">
+ <description>Remove a QuoteCoefficient</description>
+ <auto-attributes include="pk" mode="IN" optional="true"/>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
+ </service>
<!-- Specialized Quote services -->
<service name="createQuoteAndQuoteItemForRequest" engine="simple" default-entity-name="QuoteItem"
location="org/ofbiz/order/quote/QuoteServices.xml" invoke="createQuoteAndQuoteItemForRequest" auth="true">
@@ -88,4 +107,13 @@
<attribute name="attrValue" type="String" mode="IN" optional="true"/>
<override name="custRequestId" optional="false"/>
</service>
+ <service name="autoUpdateQuotePrice" engine="simple" default-entity-name="QuoteItem"
+ location="org/ofbiz/order/quote/QuoteServices.xml" invoke="autoUpdateQuotePrice" auth="true">
+ <description>Update the QuoteItem price with the passed value (if present) or automatically from the averageCost</description>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ <attribute name="manualQuoteUnitPrice" type="Double" mode="IN" optional="true"/>
+ <attribute name="defaultQuoteUnitPrice" type="Double" mode="IN" optional="true"/>
+ <!--<attribute name="averageCost" type="Double" mode="IN" optional="true"/>
+ <attribute name="costToPriceMult" type="Double" mode="IN" optional="true"/>-->
+ </service>
</services>
Modified: trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetShoppingCart.bsh
===================================================================
--- trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetShoppingCart.bsh 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetShoppingCart.bsh 2005-05-14 16:24:27 UTC (rev 4991)
@@ -29,3 +29,6 @@
shoppingCart = ShoppingCartEvents.getCartObject(request);
context.put("shoppingCart", shoppingCart);
+context.put("currencyUomId", shoppingCart.getCurrency());
+context.put("partyId", shoppingCart.getPartyId());
+
Added: trunk/applications/order/webapp/ordermgr/WEB-INF/actions/quote/ManageQuotePrices.bsh
===================================================================
--- trunk/applications/order/webapp/ordermgr/WEB-INF/actions/quote/ManageQuotePrices.bsh 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/webapp/ordermgr/WEB-INF/actions/quote/ManageQuotePrices.bsh 2005-05-14 16:24:27 UTC (rev 4991)
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ *
+ *@author Jacopo Cappellato (tiz at sastau.it)
+*/
+
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.entity.util.EntityUtil;
+
+quoteCoefficientsIt = quoteCoefficients.iterator();
+costMult = 0.0;
+while (quoteCoefficientsIt.hasNext()) {
+ quoteCoefficient = quoteCoefficientsIt.next();
+ value = quoteCoefficient.getDouble("coeffValue");
+ if (value != null) {
+ costMult += value;
+ }
+}
+double costToPriceMult = 1.0;
+if (costMult != 100) {
+ costToPriceMult = 100 / (100 - costMult);
+}
+
+double totalCost = 0.0;
+double totalPrice = 0.0;
+double totalCostMult = 0.0;
+currency = quote.getString("currencyUomId");
+quoteItemAndCostInfos = new java.util.ArrayList();
+quoteItemsIt = quoteItems.iterator();
+while (quoteItemsIt.hasNext()) {
+ quoteItem = quoteItemsIt.next();
+ double defaultQuoteUnitPrice = 0.0;
+ double averageCost = 0.0;
+ double unitPrice = 0.0;
+ double quantity = 1.0;
+ if (quoteItem.get("quantity") != null) {
+ quantity = (quoteItem.getDouble("quantity")).doubleValue();
+ }
+ if (quoteItem.get("quoteUnitPrice") != null) {
+ unitPrice = (quoteItem.getDouble("quoteUnitPrice")).doubleValue();
+ }
+
+ try {
+ if (currency != null && quoteItem.get("productId") != null) {
+ productPrices = delegator.findByAnd("ProductPrice", UtilMisc.toMap("productId", quoteItem.getString("productId"),
+ "currencyUomId", currency,
+ "productPriceTypeId", "AVERAGE_COST"));
+ productPrices = EntityUtil.filterByDate(productPrices);
+ productPrice = EntityUtil.getFirst(productPrices);
+ if (productPrice != null && productPrice.get("price") != null) {
+ averageCost = (productPrice.getDouble("price")).doubleValue();
+ }
+ }
+ defaultQuoteUnitPrice = averageCost * costToPriceMult;
+ totalCost += (averageCost * quantity);
+ totalPrice += (unitPrice * quantity);
+ } catch(Exception exc) {
+ Debug.logError("Problems getting the averageCost for quoteItem: " + quoteItem);
+ }
+
+ quoteItemAndCostInfo = new java.util.HashMap(quoteItem);
+ quoteItemAndCostInfo.put("averageCost", averageCost);
+ quoteItemAndCostInfo.put("costToPriceMult", costToPriceMult);
+ quoteItemAndCostInfo.put("defaultQuoteUnitPrice", defaultQuoteUnitPrice);
+ quoteItemAndCostInfos.add(quoteItemAndCostInfo);
+}
+
+context.put("costMult", costMult);
+context.put("costToPriceMult", costToPriceMult);
+context.put("quoteItemAndCostInfos", quoteItemAndCostInfos);
+
+context.put("totalCost", totalCost);
+context.put("totalPrice", totalPrice);
+context.put("totalCostMult", (totalCost != 0? totalPrice / totalCost: 0));
+
Property changes on: trunk/applications/order/webapp/ordermgr/WEB-INF/actions/quote/ManageQuotePrices.bsh
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ "Id Rev Author"
Name: svn:eol-style
+ native
Modified: trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
===================================================================
--- trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml 2005-05-14 16:24:27 UTC (rev 4991)
@@ -693,6 +693,18 @@
<security https="true" auth="true"/>
<response name="success" type="view" value="EditQuoteAttribute"/>
</request-map>
+ <request-map uri="ListQuoteCoefficients">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="ListQuoteCoefficients"/>
+ </request-map>
+ <request-map uri="EditQuoteCoefficient">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="EditQuoteCoefficient"/>
+ </request-map>
+ <request-map uri="ManageQuotePrices">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="ManageQuotePrices"/>
+ </request-map>
<request-map uri="createQuote">
<security https="true" auth="true"/>
@@ -734,6 +746,27 @@
<event type="service" path="" invoke="removeQuoteAttribute"/>
<response name="success" type="view" value="ListQuoteAttributes"/>
</request-map>
+ <request-map uri="createQuoteCoefficient">
+ <security https="true" auth="true"/>
+ <event type="service" path="" invoke="createQuoteCoefficient"/>
+ <response name="success" type="view" value="EditQuoteCoefficient"/>
+ </request-map>
+ <request-map uri="updateQuoteCoefficient">
+ <security https="true" auth="true"/>
+ <event type="service" path="" invoke="updateQuoteCoefficient"/>
+ <response name="success" type="view" value="EditQuoteCoefficient"/>
+ </request-map>
+ <request-map uri="removeQuoteCoefficient">
+ <security https="true" auth="true"/>
+ <event type="service" path="" invoke="removeQuoteCoefficient"/>
+ <response name="success" type="view" value="ListQuoteCoefficients"/>
+ </request-map>
+ <request-map uri="autoUpdateQuotePrices">
+ <security https="true" auth="true"/>
+ <event type="service-multi" invoke="autoUpdateQuotePrice"/>
+ <response name="success" type="view" value="ManageQuotePrices"/>
+ <response name="error" type="view" value="ManageQuotePrices"/>
+ </request-map>
<!-- Lookup request mappings -->
<request-map uri="LookupPerson">
@@ -824,6 +857,9 @@
<view-map name="EditQuoteItem" type="screen" page="component://order/widget/ordermgr/QuoteScreens.xml#EditQuoteItem"/>
<view-map name="ListQuoteAttributes" type="screen" page="component://order/widget/ordermgr/QuoteScreens.xml#ListQuoteAttributes"/>
<view-map name="EditQuoteAttribute" type="screen" page="component://order/widget/ordermgr/QuoteScreens.xml#EditQuoteAttribute"/>
+ <view-map name="ListQuoteCoefficients" type="screen" page="component://order/widget/ordermgr/QuoteScreens.xml#ListQuoteCoefficients"/>
+ <view-map name="EditQuoteCoefficient" type="screen" page="component://order/widget/ordermgr/QuoteScreens.xml#EditQuoteCoefficient"/>
+ <view-map name="ManageQuotePrices" type="screen" page="component://order/widget/ordermgr/QuoteScreens.xml#ManageQuotePrices"/>
<view-map name="LookupPerson" page="component://party/widget/partymgr/LookupScreens.xml#LookupPerson" type="screen"/>
<view-map name="LookupPartyGroup" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyGroup" type="screen"/>
Added: trunk/applications/order/webapp/ordermgr/quote/ManageQuotePrices.ftl
===================================================================
--- trunk/applications/order/webapp/ordermgr/quote/ManageQuotePrices.ftl 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/webapp/ordermgr/quote/ManageQuotePrices.ftl 2005-05-14 16:24:27 UTC (rev 4991)
@@ -0,0 +1,32 @@
+<#--
+ * Copyright (c) 2003 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.
+ *
+ *@author Jacopo Cappellato (tiz at sastau.it)
+ *@version $Rev$
+-->
+
+<#list quoteCoefficients as quoteCoefficient>
+ <div class="tabletext">${quoteCoefficient.coeffName}: ${quoteCoefficient.coeffValue}</div>
+</#list>
+<br/>
+<div class="tabletext">${uiLabelMap.totCostMult}: ${costMult}</div>
+<div class="tabletext">${uiLabelMap.costToPriceMult}: ${costToPriceMult}</div>
+<br/>
Property changes on: trunk/applications/order/webapp/ordermgr/quote/ManageQuotePrices.ftl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ "Id Rev Author"
Name: svn:eol-style
+ native
Added: trunk/applications/order/webapp/ordermgr/quote/ManageQuotePricesTotals.ftl
===================================================================
--- trunk/applications/order/webapp/ordermgr/quote/ManageQuotePricesTotals.ftl 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/webapp/ordermgr/quote/ManageQuotePricesTotals.ftl 2005-05-14 16:24:27 UTC (rev 4991)
@@ -0,0 +1,32 @@
+<#--
+ * Copyright (c) 2003 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.
+ *
+ *@author Jacopo Cappellato (tiz at sastau.it)
+ *@version $Rev$
+-->
+
+<br/>
+<div class="tableheadtext">${uiLabelMap.totCost}:</div>
+<div class="tabletext">${totalCost}</div>
+<div class="tableheadtext">${uiLabelMap.totPrice}:</div>
+<div class="tabletext">${totalPrice}</div>
+<div class="tableheadtext">${uiLabelMap.totCostMult}:</div>
+<div class="tabletext">${totalCostMult}</div>
Property changes on: trunk/applications/order/webapp/ordermgr/quote/ManageQuotePricesTotals.ftl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ "Id Rev Author"
Name: svn:eol-style
+ native
Modified: trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml
===================================================================
--- trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml 2005-05-14 16:24:27 UTC (rev 4991)
@@ -44,6 +44,13 @@
</entity-options>
</drop-down>
</field>
+ <field name="currencyUomId">
+ <drop-down allow-empty="true">
+ <entity-options description="${uomId} - ${description}" entity-name="Uom" key-field-name="uomId">
+ <entity-constraint name="uomTypeId" operator="equals" value="CURRENCY_MEASURE"/>
+ </entity-options>
+ </drop-down>
+ </field>
<field name="validFromDate"><hidden/></field>
<field name="validThruDate"><hidden/></field>
<field name="description"><hidden/></field>
@@ -94,6 +101,13 @@
</entity-options>
</drop-down>
</field>
+ <field name="currencyUomId">
+ <drop-down allow-empty="true">
+ <entity-options description="${uomId} - ${description}" entity-name="Uom" key-field-name="uomId">
+ <entity-constraint name="uomTypeId" operator="equals" value="CURRENCY_MEASURE"/>
+ </entity-options>
+ </drop-down>
+ </field>
<field name="submitButton" title="Submit" widget-style="standardSubmit">
<submit button-type="button"/>
</field>
@@ -174,4 +188,49 @@
<submit button-type="button"/>
</field>
</form>
+
+ <form name="ListQuoteCoefficients" default-title-style="tableheadtext"
+ default-tooltip-style="tabletext" default-widget-style="tabletext" list-name="quoteCoefficients"
+ target="" paginate-target="ListQuoteCoefficients" title="" type="list">
+ <auto-fields-entity entity-name="QuoteCoefficient" default-field-type="display"/>
+ <field name="quoteId"><hidden/></field>
+ <field name="deleteLink" title="&nbsp;" widget-style="buttontext">
+ <hyperlink target="removeQuoteCoefficient?coeffName=${coeffName}&quoteId=${quoteId}" description="[${uiLabelMap.CommonRemove}]" also-hidden="false"/>
+ </field>
+ </form>
+ <form name="EditQuoteCoefficient" type="single"
+ target="updateQuoteCoefficient" title="" default-map-name="quoteCoefficient"
+ default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+ <alt-target use-when="quoteCoefficient==null" target="createQuoteCoefficient"/>
+ <auto-fields-entity entity-name="QuoteCoefficient" default-field-type="edit"/>
+ <field name="quoteId"><hidden/></field>
+ <field name="submitButton" title="Submit" widget-style="standardSubmit">
+ <submit button-type="button"/>
+ </field>
+ </form>
+
+ <form name="ManageQuotePrices" default-title-style="tableheadtext"
+ default-tooltip-style="tabletext" default-widget-style="tabletext" use-row-submit="true"
+ list-name="quoteItemAndCostInfos" target="autoUpdateQuotePrices?quoteId=${quoteId}" paginate-target="ManageQuotePrices" title="" type="multi">
+ <field name="custRequestId" title="View Request" widget-style="buttontext">
+ <hyperlink target-type="inter-app" also-hidden="false" description="${custRequestId}-${custRequestItemSeqId}" target="/workeffort/control/requestitem?custRequestId=${custRequestId}&custRequestItemSeqId=${custRequestItemSeqId}"/>
+ </field>
+ <field name="custRequestItemSeqId"><hidden/></field>
+ <field name="quoteId"><hidden/></field>
+ <field name="quoteItemSeqId" title="Edit" widget-style="buttontext">
+ <hyperlink also-hidden="true" description="${quoteItemSeqId}" target="EditQuoteItem?quoteId=${quoteId}&quoteItemSeqId=${quoteItemSeqId}"/>
+ </field>
+ <field name="productId"><display/></field>
+ <field name="quantity"><display/></field>
+ <field name="averageCost"><display/></field>
+ <field name="costToPriceMult"><display/></field>
+ <field name="defaultQuoteUnitPrice"><display/></field>
+ <field name="quoteUnitPrice"><display/></field>
+ <field name="manualQuoteUnitPrice"><text/></field>
+ <field name="_rowSubmit" title="${uiLabelMap.CommonSelect}"><check/></field>
+ <field name="submitButton" widget-style="smallSubmit">
+ <submit/>
+ </field>
+ </form>
+
</forms>
\ No newline at end of file
Modified: trunk/applications/order/webapp/ordermgr/quote/QuoteTabBar.ftl
===================================================================
--- trunk/applications/order/webapp/ordermgr/quote/QuoteTabBar.ftl 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/webapp/ordermgr/quote/QuoteTabBar.ftl 2005-05-14 16:24:27 UTC (rev 4991)
@@ -29,8 +29,10 @@
<#if quote?has_content>
<div class='tabContainer'>
- <a href="<@ofbizUrl>/EditQuote?quoteId=${quote.quoteId}</@ofbizUrl>" class="${selectedClassMap.EditQuote?default(unselectedClassName)}">${uiLabelMap.OrderQuote}</a>
- <a href="<@ofbizUrl>/ListQuoteItems?quoteId=${quote.quoteId}</@ofbizUrl>" class="${selectedClassMap.ListQuoteItems?default(unselectedClassName)}">${uiLabelMap.OrderQuoteItems}</a>
- <a href="<@ofbizUrl>/ListQuoteAttributes?quoteId=${quote.quoteId}</@ofbizUrl>" class="${selectedClassMap.ListQuoteAttributes?default(unselectedClassName)}">${uiLabelMap.OrderQuoteAttributes}</a>
+ <a href="<@ofbizUrl>/EditQuote?quoteId=${quote.quoteId}</@ofbizUrl>" class="${selectedClassMap.EditQuote?default(unselectedClassName)}">${uiLabelMap.OrderOrderQuote}</a>
+ <a href="<@ofbizUrl>/ListQuoteItems?quoteId=${quote.quoteId}</@ofbizUrl>" class="${selectedClassMap.ListQuoteItems?default(unselectedClassName)}">${uiLabelMap.OrderOrderQuoteItems}</a>
+ <a href="<@ofbizUrl>/ListQuoteCoefficients?quoteId=${quote.quoteId}</@ofbizUrl>" class="${selectedClassMap.ListQuoteCoefficients?default(unselectedClassName)}">${uiLabelMap.OrderOrderQuoteCoefficients}</a>
+ <a href="<@ofbizUrl>/ListQuoteAttributes?quoteId=${quote.quoteId}</@ofbizUrl>" class="${selectedClassMap.ListQuoteAttributes?default(unselectedClassName)}">${uiLabelMap.OrderOrderQuoteAttributes}</a>
+ <a href="<@ofbizUrl>/ManageQuotePrices?quoteId=${quote.quoteId}</@ofbizUrl>" class="${selectedClassMap.ManageQuotePrices?default(unselectedClassName)}">${uiLabelMap.OrderOrderQuotePrices}</a>
</div>
</#if>
Modified: trunk/applications/order/widget/ordermgr/OrderEntryForms.xml
===================================================================
--- trunk/applications/order/widget/ordermgr/OrderEntryForms.xml 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/widget/ordermgr/OrderEntryForms.xml 2005-05-14 16:24:27 UTC (rev 4991)
@@ -26,7 +26,7 @@
<field name="hideSearch"><hidden value="Y"/></field>
<field name="requirementId"><text-find default-value="equals"/></field>
<field name="productId" title="${uiLabelMap.ProductProductId}"><lookup target-form-name="LookupProduct"/></field>
- <field name="requirementByDate"><date-find type="date"/> </field>
+ <field name="requirementByDate"><date-find type="date"/></field>
<field name="submitButton" title="${uiLabelMap.CommonLookup}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="RequirementsList" type="multi" use-row-submit="true" target="addRequirementsToCart" title="" list-iterator-name="requirementsForSupplier"
@@ -63,6 +63,7 @@
<lookup target-form-name="LookupPartyName"/>
</field>
<field name="statusId"><hidden/></field>
+ <field name="currencyUomId"><hidden/></field>
<field name="validFromDate"><hidden/></field>
<field name="validThruDate"><hidden/></field>
<field name="description"><hidden/></field>
Modified: trunk/applications/order/widget/ordermgr/OrderEntryScreens.xml
===================================================================
--- trunk/applications/order/widget/ordermgr/OrderEntryScreens.xml 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/widget/ordermgr/OrderEntryScreens.xml 2005-05-14 16:24:27 UTC (rev 4991)
@@ -60,8 +60,11 @@
<actions>
<set field="title" value="Find Requirements For Supplier"/>
<set field="entityName" value="Requirement"/>
- <set field="requestParameters.requirementTypeId" to-scope="screen" default-value="MRP_PRO_PURCH_ORDER"/>
- <set field="requestParameters.statusId" to-scope="screen" default-value="REQ_APPROVED"/>
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
+ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="50"/>
+
+ <set field="parameters.requirementTypeId" to-scope="screen" default-value="MRP_PRO_PURCH_ORDER"/>
+ <set field="parameters.statusId" to-scope="screen" default-value="REQ_APPROVED"/>
</actions>
<widgets>
<decorator-screen name="CommonOrderCatalogDecorator" location="component://order/widget/ordermgr/OrderEntryCommonScreens.xml">
@@ -88,7 +91,12 @@
<section>
<actions>
<set field="title" value="Find Quotes"/>
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
+ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="50"/>
+
<set field="requestParameters.statusId" to-scope="screen" default-value="QUO_APPROVED"/>
+ <script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/SetShoppingCart.bsh"/>
+ <set field="requestParameters.currencyUomId" to-scope="screen" from-field="currencyUomId"/>
</actions>
<widgets>
<decorator-screen name="CommonOrderCatalogDecorator" location="component://order/widget/ordermgr/OrderEntryCommonScreens.xml">
Modified: trunk/applications/order/widget/ordermgr/QuoteScreens.xml
===================================================================
--- trunk/applications/order/widget/ordermgr/QuoteScreens.xml 2005-05-14 10:00:28 UTC (rev 4990)
+++ trunk/applications/order/widget/ordermgr/QuoteScreens.xml 2005-05-14 16:24:27 UTC (rev 4991)
@@ -61,15 +61,17 @@
<actions>
<set field="title" value="Find Quotes"/>
<set field="headerItem" value="quote"/>
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
+ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="50"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="component://order/widget/ordermgr/CommonScreens.xml">
<decorator-section name="body">
<container>
- <label style="head1">${uiLabelMap.OrderQuotes}</label>
+ <label style="head1">${uiLabelMap.OrderOrderQuotes}</label>
</container>
<container>
- <link target="EditQuote" text="[${uiLabelMap.OrderNewQuote}]" style="buttontext"/>
+ <link target="EditQuote" text="[${uiLabelMap.OrderCreateOrderQuote}]" style="buttontext"/>
</container>
<include-form name="FindQuotes" location="component://order/webapp/ordermgr/quote/QuoteForms.xml"/>
<include-form name="ListQuotes" location="component://order/webapp/ordermgr/quote/QuoteForms.xml"/>
@@ -93,7 +95,7 @@
<decorator-screen name="CommonQuoteDecorator">
<decorator-section name="body">
<container>
- <link target="EditQuote" text="[${uiLabelMap.OrderNewQuote}]" style="buttontext"/>
+ <link target="EditQuote" text="[${uiLabelMap.OrderCreateOrderQuote}]" style="buttontext"/>
</container>
<include-form name="EditQuote" location="component://order/webapp/ordermgr/quote/QuoteForms.xml"/>
</decorator-section>
@@ -119,7 +121,7 @@
<decorator-screen name="CommonQuoteDecorator">
<decorator-section name="body">
<container>
- <link target="EditQuoteItem?quoteId=${quote.quoteId}" text="[${uiLabelMap.OrderNewQuoteItem}]" style="buttontext"/>
+ <link target="EditQuoteItem?quoteId=${quote.quoteId}" text="[${uiLabelMap.OrderCreateOrderQuoteItem}]" style="buttontext"/>
</container>
<include-form name="ListQuoteItems" location="component://order/webapp/ordermgr/quote/QuoteForms.xml"/>
</decorator-section>
@@ -145,7 +147,7 @@
<decorator-screen name="CommonQuoteDecorator">
<decorator-section name="body">
<container>
- <link target="EditQuoteItem?quoteId=${quote.quoteId}" text="[${uiLabelMap.OrderNewQuoteItem}]" style="buttontext"/>
+ <link target="EditQuoteItem?quoteId=${quote.quoteId}" text="[${uiLabelMap.OrderCreateOrderQuoteItem}]" style="buttontext"/>
</container>
<include-form name="EditQuoteItem" location="component://order/webapp/ordermgr/quote/QuoteForms.xml"/>
</decorator-section>
@@ -170,7 +172,7 @@
<decorator-screen name="CommonQuoteDecorator">
<decorator-section name="body">
<container>
- <link target="EditQuoteAttribute?quoteId=${quote.quoteId}" text="[${uiLabelMap.OrderNewQuoteAttribute}]" style="buttontext"/>
+ <link target="EditQuoteAttribute?quoteId=${quote.quoteId}" text="[${uiLabelMap.OrderCreateOrderQuoteAttribute}]" style="buttontext"/>
</container>
<include-form name="ListQuoteAttributes" location="component://order/webapp/ordermgr/quote/QuoteForms.xml"/>
</decorator-section>
@@ -196,7 +198,7 @@
<decorator-screen name="CommonQuoteDecorator">
<decorator-section name="body">
<container>
- <link target="EditQuoteAttribute?quoteId=${quote.quoteId}" text="[${uiLabelMap.OrderNewQuoteAttribute}]" style="buttontext"/>
+ <link target="EditQuoteAttribute?quoteId=${quote.quoteId}" text="[${uiLabelMap.OrderCreateOrderQuoteAttribute}]" style="buttontext"/>
</container>
<include-form name="EditQuoteAttribute" location="component://order/webapp/ordermgr/quote/QuoteForms.xml"/>
</decorator-section>
@@ -204,5 +206,92 @@
</widgets>
</section>
</screen>
+ <screen name="ListQuoteCoefficients">
+ <section>
+ <actions>
+ <set field="title" value="List Quote Coefficients"/>
+ <set field="titleProperty" value="PageTitleListQuoteCoefficients"/>
+ <set field="headerItem" value="quote"/>
+ <set field="tabButtonItem" value="ListQuoteCoefficients"/>
+
+ <entity-one entity-name="Quote" value-name="quote" auto-field-map="true"/>
+ <entity-and entity-name="QuoteCoefficient" list-name="quoteCoefficients">
+ <field-map env-name="quote.quoteId" field-name="quoteId"/>
+ </entity-and>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonQuoteDecorator">
+ <decorator-section name="body">
+ <container>
+ <link target="EditQuoteCoefficient?quoteId=${quote.quoteId}" text="[${uiLabelMap.OrderCreateOrderQuoteCoefficient}]" style="buttontext"/>
+ </container>
+ <include-form name="ListQuoteCoefficients" location="component://order/webapp/ordermgr/quote/QuoteForms.xml"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+ <screen name="EditQuoteCoefficient">
+ <section>
+ <actions>
+ <set field="title" value="Edit Quote Coefficient"/>
+ <set field="titleProperty" value="PageTitleEditQuoteCoefficient"/>
+ <set field="headerItem" value="quote"/>
+ <set field="tabButtonItem" value="ListQuoteCoefficients"/>
+
+ <set field="quoteId" from-field="parameters.quoteId"/>
+ <set field="attrName" from-field="parameters.coeffName"/>
+
+ <entity-one entity-name="Quote" value-name="quote" auto-field-map="true"/>
+ <entity-one entity-name="QuoteCoefficient" value-name="quoteCoefficient"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonQuoteDecorator">
+ <decorator-section name="body">
+ <container>
+ <link target="EditQuoteCoefficient?quoteId=${quote.quoteId}" text="[${uiLabelMap.OrderCreateOrderQuoteCoefficient}]" style="buttontext"/>
+ </container>
+ <include-form name="EditQuoteCoefficient" location="component://order/webapp/ordermgr/quote/QuoteForms.xml"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+ <screen name="ManageQuotePrices">
+ <section>
+ <actions>
+ <set field="title" value="Manage Quote Prices"/>
+ <set field="titleProperty" value="PageTitleManageQuotePrices"/>
+ <set field="headerItem" value="quote"/>
+ <set field="tabButtonItem" value="ManageQuotePrices"/>
+
+ <entity-one entity-name="Quote" value-name="quote" auto-field-map="true"/>
+ <entity-and entity-name="QuoteItem" list-name="quoteItems">
+ <field-map env-name="quote.quoteId" field-name="quoteId"/>
+ <order-by field-name="custRequestId"/>
+ <order-by field-name="custRequestItemSeqId"/>
+ </entity-and>
+ <entity-and entity-name="QuoteCoefficient" list-name="quoteCoefficients">
+ <field-map env-name="quote.quoteId" field-name="quoteId"/>
+ </entity-and>
+ <set from-field="quote.quoteId" field="quoteId"/>
+
+ <script location="component://order/webapp/ordermgr/WEB-INF/actions/quote/ManageQuotePrices.bsh"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonQuoteDecorator">
+ <decorator-section name="body">
+ <platform-specific>
+ <html><html-template location="component://order/webapp/ordermgr/quote/ManageQuotePrices.ftl"/></html>
+ </platform-specific>
+ <include-form name="ManageQuotePrices" location="component://order/webapp/ordermgr/quote/QuoteForms.xml"/>
+ <platform-specific>
+ <html><html-template location="component://order/webapp/ordermgr/quote/ManageQuotePricesTotals.ftl"/></html>
+ </platform-specific>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
</screens>
More information about the Svn
mailing list