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
This commit is contained in:
@@ -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"/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user