Author: jleroux
Date: Fri Jul 23 16:18:14 2010
New Revision: 967155

URL: http://svn.apache.org/viewvc?rev=967155&view=rev
Log:
A patch from David Cervera "Create Product in Category" doesn't allow non USD 
prices (https://issues.apache.org/jira/browse/OFBIZ-3865) - OFBIZ-3865

The screen "EditProductStorePaySetup" in 
"OFBIZ_HOME/applications/product/widget/catalog/StoreScreens.xml" (that is, 
section "PaymentsIn the page "Create Product in Category" (for example: 
https://demo-trunk.ofbiz.apache.org/catalog/control/createProductInCategoryStart?productCategoryId=100),
 the process that creates new product always creates it with USD price. It 
doesn't allow non USD prices.

It can be solved adding an input to set the currency in the form (because the 
service is ready to support it)

Modified:
    
ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryCheckExisting.ftl
    
ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryStart.ftl

Modified: 
ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryCheckExisting.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryCheckExisting.ftl?rev=967155&r1=967154&r2=967155&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryCheckExisting.ftl
 (original)
+++ 
ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryCheckExisting.ftl
 Fri Jul 23 16:18:14 2010
@@ -106,7 +106,8 @@ under the License.
                     <td width="15%">${uiLabelMap.ProductDefaultPrice}:</td>
                     <td>
                         <input type="hidden" name="defaultPrice" 
value="${requestParameters.defaultPrice?if_exists}"/>
-                        
<div>&nbsp;${requestParameters.defaultPrice?default("&nbsp;")}</div>
+                        <input type="hidden" name="currencyUomId" 
value="${requestParameters.currencyUomId?if_exists}"/>
+                        
<div>&nbsp;${requestParameters.defaultPrice?default("&nbsp;")}&nbsp;${requestParameters.currencyUomId?default("&nbsp;")}</div>
                     </td>
                 </tr>
                 <tr>

Modified: 
ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryStart.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryStart.ftl?rev=967155&r1=967154&r2=967155&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryStart.ftl
 (original)
+++ 
ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryStart.ftl
 Fri Jul 23 16:18:14 2010
@@ -63,7 +63,18 @@ under the License.
                 </tr>
                 <tr>
                     <td width="15%">${uiLabelMap.ProductDefaultPrice}:</td>
-                    <td><input type="text" name="defaultPrice" size="8"/></td>
+                    <td><input type="text" name="defaultPrice" size="8"/>
+                    <#assign findCurrenciesMap = 
Static["org.ofbiz.base.util.UtilMisc"].toMap("uomTypeId", "CURRENCY_MEASURE")>
+                    <#assign currencies = delegator.findByAndCache('Uom', 
findCurrenciesMap) />
+                    <#if currencies?has_content && (currencies?size > 0)>
+                        <select name="currencyUomId">
+                            <option value=""></option>
+                            <#list currencies as currency>
+                                <option 
value="${currency.uomId}">${currency.get("description",locale)} 
[${currency.uomId}]</option>
+                            </#list>
+                        </select>
+                    </#if>
+                    </td>
                 </tr>
                 <tr>
                     <td width="15%">${uiLabelMap.ProductAverageCost}:</td>


Reply via email to