Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Improved service "createQuoteFromCart" so that it could take Purchase…
… order case too for the creation of Quote.

Also done formating in FTL file.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@930630 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ashishvijaywargiya committed Apr 4, 2010
1 parent 6dc0c95 commit 4fedd65
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
13 changes: 10 additions & 3 deletions applications/order/script/org/ofbiz/order/quote/QuoteServices.xml
Expand Up @@ -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"/>
Expand Down
16 changes: 9 additions & 7 deletions applications/order/webapp/ordermgr/entry/orderShortcuts.ftl
Expand Up @@ -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>
Expand Down

0 comments on commit 4fedd65

Please sign in to comment.