Author: jacopoc
Date: Mon Jul 31 05:25:24 2006 New Revision: 427099 URL: http://svn.apache.org/viewvc?rev=427099&view=rev Log: Added new quote header field to store the quote's sales channel (Quote.salesChannelEnumId). The quote's sales channel is propagated to the order and when a cart is used to create a quote, the sales channel of the cart is used to populate the sales channel of the quote. Modified: incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java incubator/ofbiz/trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml incubator/ofbiz/trunk/applications/order/webapp/ordermgr/quote/quoteInfo.ftl incubator/ofbiz/trunk/applications/order/widget/ordermgr/QuoteScreens.xml Modified: incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml?rev=427099&r1=427098&r2=427099&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml (original) +++ incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml Mon Jul 31 05:25:24 2006 @@ -1159,6 +1159,7 @@ <field name="statusId" type="id"></field> <field name="currencyUomId" type="id"></field> <field name="productStoreId" type="id"></field> + <field name="salesChannelEnumId" type="id"></field> <field name="validFromDate" type="date-time"></field> <field name="validThruDate" type="date-time"></field> <field name="quoteName" type="name"></field> @@ -1181,6 +1182,9 @@ </relation> <relation type="one" fk-name="QUOTE_PRDS" rel-entity-name="ProductStore"> <key-map field-name="productStoreId"/> + </relation> + <relation type="one" fk-name="QUOTE_CHANNEL" title="SalesChannel" rel-entity-name="Enumeration"> + <key-map field-name="salesChannelEnumId" rel-field-name="enumId"/> </relation> </entity> <entity entity-name="QuoteAttribute" Modified: incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml?rev=427099&r1=427098&r2=427099&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml (original) +++ incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml Mon Jul 31 05:25:24 2006 @@ -648,6 +648,7 @@ <call-object-method obj-field-name="parameters.cart" method-name="getCurrency" ret-field-name="createQuoteInMap.currencyUomId"/> <call-object-method obj-field-name="parameters.cart" method-name="getProductStoreId" ret-field-name="createQuoteInMap.productStoreId"/> + <call-object-method obj-field-name="parameters.cart" method-name="getChannelType" ret-field-name="createQuoteInMap.salesChannelEnumId"/> <set value="PRODUCT_QUOTE" field="createQuoteInMap.quoteTypeId"/> <set value="QUO_CREATED" field="createQuoteInMap.statusId"/> <call-service service-name="createQuote" in-map-name="createQuoteInMap"> Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=427099&r1=427098&r2=427099&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java (original) +++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Mon Jul 31 05:25:24 2006 @@ -404,6 +404,7 @@ cart.setQuoteId(quoteId); cart.setOrderName(quote.getString("quoteName")); + cart.setChannelType(quote.getString("salesChannelEnumId")); List quoteItems = null; List quoteAdjs = null; Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml?rev=427099&r1=427098&r2=427099&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml (original) +++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml Mon Jul 31 05:25:24 2006 @@ -28,6 +28,14 @@ <entity-options description="${description}" entity-name="QuoteType" key-field-name="quoteTypeId"/> </drop-down> </field> + <field name="salesChannelEnumId" title="${uiLabelMap.OrderSalesChannel}" widget-style="selectBox"> + <drop-down allow-empty="true"> + <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId"> + <entity-constraint name="enumTypeId" value="ORDER_SALES_CHANNEL"/> + <entity-order-by field-name="sequenceId"/> + </entity-options> + </drop-down> + </field> <field name="partyId" title="${uiLabelMap.PartyPartyId}"> <lookup target-form-name="LookupPartyName"/> </field> @@ -85,7 +93,7 @@ <field name="currencyUomId" title="${uiLabelMap.CommonCurrency}"></field> <field name="validFromDate" title="${uiLabelMap.CommonValidFromDate}"></field> <field name="validThruDate" title="${uiLabelMap.CommonValidThruDate}"></field> - </form> + </form> <form name="EditQuote" type="single" target="updateQuote" title="" default-map-name="quote" default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext"> <alt-target use-when="quote==null" target="createQuote"/> @@ -95,6 +103,14 @@ <drop-down allow-empty="true"> <entity-options description="${description}" entity-name="QuoteType" key-field-name="quoteTypeId"> <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="salesChannelEnumId" title="${uiLabelMap.OrderSalesChannel}" widget-style="selectBox"> + <drop-down allow-empty="true"> + <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId"> + <entity-constraint name="enumTypeId" value="ORDER_SALES_CHANNEL"/> + <entity-order-by field-name="sequenceId"/> </entity-options> </drop-down> </field> Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/quote/quoteInfo.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/quote/quoteInfo.ftl?rev=427099&r1=427098&r2=427099&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/quote/quoteInfo.ftl (original) +++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/quote/quoteInfo.ftl Mon Jul 31 05:25:24 2006 @@ -31,6 +31,19 @@ </td> </tr> <tr><td colspan="7"><hr class="sepbar"/></td></tr> + + <#-- quote Channel information --> + <tr> + <td align="right" valign="top" width="15%"> + <div class="tabletext"> <b>${uiLabelMap.OrderSalesChannel}</b></div> + </td> + <td width="5"> </td> + <td align="left" valign="top" width="80%"> + <div class="tabletext">${(salesChannel.get("description",locale))?default(quote.salesChannelEnumId?if_exists)}</div> + </td> + </tr> + <tr><td colspan="7"><hr class="sepbar"/></td></tr> + <#-- quote status information --> <tr> <td align="right" valign="top" width="15%"> Modified: incubator/ofbiz/trunk/applications/order/widget/ordermgr/QuoteScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/widget/ordermgr/QuoteScreens.xml?rev=427099&r1=427098&r2=427099&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/order/widget/ordermgr/QuoteScreens.xml (original) +++ incubator/ofbiz/trunk/applications/order/widget/ordermgr/QuoteScreens.xml Mon Jul 31 05:25:24 2006 @@ -55,6 +55,7 @@ <entity-one entity-name="Quote" value-name="quote"/> <get-related-one value-name="quote" relation-name="QuoteType" to-value-name="quoteType"/> <get-related-one value-name="quote" relation-name="StatusItem" to-value-name="statusItem"/> + <get-related-one value-name="quote" relation-name="SalesChannelEnumeration" to-value-name="salesChannel"/> <get-related-one value-name="quote" relation-name="Uom" to-value-name="currency"/> <get-related-one value-name="quote" relation-name="ProductStore" to-value-name="store"/> |
Free forum by Nabble | Edit this page |