Author: ashish
Date: Sun Apr 4 06:29:17 2010
New Revision: 930630
URL: http://svn.apache.org/viewvc?rev=930630&view=rev
Log:
Improved service "createQuoteFromCart" so that it could take Purchase order
case too for the creation of Quote.
Also done formating in FTL file.
Modified:
ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml
ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderShortcuts.ftl
Modified:
ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml?rev=930630&r1=930629&r2=930630&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml
(original)
+++
ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml
Sun Apr 4 06:29:17 2010
@@ -705,11 +705,18 @@ under the License.
</then>
</if>
<check-errors/>
-
<call-object-method obj-field="parameters.cart"
method-name="getCurrency" ret-field="createQuoteInMap.currencyUomId"/>
- <call-object-method obj-field="parameters.cart"
method-name="getProductStoreId" ret-field="createQuoteInMap.productStoreId"/>
<call-object-method obj-field="parameters.cart"
method-name="getChannelType" ret-field="createQuoteInMap.salesChannelEnumId"/>
- <set value="PRODUCT_QUOTE" field="createQuoteInMap.quoteTypeId"/>
+
+ <call-object-method obj-field="parameters.cart"
method-name="getOrderType" ret-field="orderType"/>
+ <if-compare field="orderType" operator="equals" value="SALES_ORDER">
+ <call-object-method obj-field="parameters.cart"
method-name="getProductStoreId" ret-field="createQuoteInMap.productStoreId"/>
+ <set field="createQuoteInMap.quoteTypeId" value="PRODUCT_QUOTE"/>
+ </if-compare>
+ <if-compare field="orderType" operator="equals"
value="PURCHASE_ORDER">
+ <set field="createQuoteInMap.quoteTypeId" value="PURCHASE_QUOTE"
/>
+ </if-compare>
+
<set value="QUO_CREATED" field="createQuoteInMap.statusId"/>
<call-service service-name="createQuote"
in-map-name="createQuoteInMap">
<result-to-field result-name="quoteId" field="quoteId"/>
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderShortcuts.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderShortcuts.ftl?rev=930630&r1=930629&r2=930630&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderShortcuts.ftl
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderShortcuts.ftl Sun
Apr 4 06:29:17 2010
@@ -26,24 +26,26 @@ under the License.
<div class="screenlet-body">
<ul>
<#if shoppingCart.getOrderType() == "PURCHASE_ORDER">
- <li><a href="<@ofbizUrl>RequirementsForSupplier</@ofbizUrl>"
class="buttontext">${uiLabelMap.OrderRequirements}</a></li>
+ <li><a href="<@ofbizUrl>RequirementsForSupplier</@ofbizUrl>"
class="buttontext">${uiLabelMap.OrderRequirements}</a></li>
+ </#if>
+ <#if shoppingCart.getOrderType()?has_content &&
shoppingCart.items()?has_content>
+ <li><a
href="<@ofbizUrl>createQuoteFromCart?destroyCart=Y</@ofbizUrl>"
class="buttontext">${uiLabelMap.OrderCreateQuoteFromCart}</a></li>
+ <li><a href="<@ofbizUrl>FindQuoteForCart</@ofbizUrl>"
class="buttontext">${uiLabelMap.OrderOrderQuotes}</a></li>
</#if>
<#if shoppingCart.getOrderType() == "SALES_ORDER">
- <li><a href="<@ofbizUrl>FindQuoteForCart</@ofbizUrl>"
class="buttontext">${uiLabelMap.OrderOrderQuotes}</a></li>
- <li><a
href="<@ofbizUrl>createQuoteFromCart?destroyCart=Y</@ofbizUrl>"
class="buttontext">${uiLabelMap.OrderCreateQuoteFromCart}</a></li>
- <li><a
href="<@ofbizUrl>createCustRequestFromCart?destroyCart=Y</@ofbizUrl>"
class="buttontext">${uiLabelMap.OrderCreateCustRequestFromCart}</a></li>
+ <li><a
href="<@ofbizUrl>createCustRequestFromCart?destroyCart=Y</@ofbizUrl>"
class="buttontext">${uiLabelMap.OrderCreateCustRequestFromCart}</a></li>
</#if>
<li><a
href="/partymgr/control/findparty?${externalKeyParam?if_exists}"
class="buttontext">${uiLabelMap.PartyFindParty}</a></li>
<#if shoppingCart.getOrderType() == "SALES_ORDER">
- <li><a href="<@ofbizUrl>setCustomer</@ofbizUrl>"
class="buttontext">${uiLabelMap.PartyCreateNewCustomer}</a></li>
+ <li><a href="<@ofbizUrl>setCustomer</@ofbizUrl>"
class="buttontext">${uiLabelMap.PartyCreateNewCustomer}</a></li>
</#if>
<li><a href="<@ofbizUrl>checkinits</@ofbizUrl>"
class="buttontext">${uiLabelMap.PartyChangeParty}</a></li>
<#if security.hasEntityPermission("CATALOG", "_CREATE", session)>
- <li><a
href="/catalog/control/EditProduct?${externalKeyParam?if_exists}"
target="catalog"
class="buttontext">${uiLabelMap.ProductCreateNewProduct}</a></li>
+ <li><a
href="/catalog/control/EditProduct?${externalKeyParam?if_exists}"
target="catalog"
class="buttontext">${uiLabelMap.ProductCreateNewProduct}</a></li>
</#if>
<li><a href="<@ofbizUrl>quickadd</@ofbizUrl>"
class="buttontext">${uiLabelMap.OrderQuickAdd}</a></li>
<#if shoppingLists?exists>
- <li><a
href="<@ofbizUrl>viewPartyShoppingLists?partyId=${partyId}</@ofbizUrl>"
class="buttontext">${uiLabelMap.PageTitleShoppingList}</a></li>
+ <li><a
href="<@ofbizUrl>viewPartyShoppingLists?partyId=${partyId}</@ofbizUrl>"
class="buttontext">${uiLabelMap.PageTitleShoppingList}</a></li>
</#if>
</ul>
</div>