Author: jleroux
Date: Fri Nov 20 11:46:21 2009
New Revision: 882516

URL: http://svn.apache.org/viewvc?rev=882516&view=rev
Log:
Should fix an issue reported by Albert Mayo at "not able to add item to created 
order with 1 ship group" (https://issues.apache.org/jira/browse/OFBIZ-3214) - 
OFBIZ-3214
If there is only 1 ship group, there is a missing parameter named 
"shipGroupSeqId" in the appendorderitem.ftl form. The service this form calls, 
appendOrderItem, requires a shipGroupSeqId parameter.

The trunk version has it fixed by adding the following code at the top, but 
version 4.0 does not have a fix. The trunk version was fixed on revision 658036.

I added the suggsted snippet by hand, because r658036 s doing much more.

Modified:
    
ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/appendorderitem.ftl

Modified: 
ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/appendorderitem.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/appendorderitem.ftl?rev=882516&r1=882515&r2=882516&view=diff
==============================================================================
--- 
ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/appendorderitem.ftl
 (original)
+++ 
ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/appendorderitem.ftl
 Fri Nov 20 11:46:21 2009
@@ -37,6 +37,9 @@
             <td>
               <form method="post" 
action="<@ofbizUrl>appendItemToOrder?${paramString}</@ofbizUrl>" 
name="appendItemForm" style="margin: 0;">
               <#-- TODO: Presently, this is the ofbiz way of getting the 
prodCatalog, which is not generic. Replace with a selecatble list defaulting to 
this instead -->
+              <#if shipGroups?size == 1>
+                <input type="hidden" name="shipGroupSeqId" 
value="${shipGroups.first.shipGroupSeqId}"/>
+              </#if>
               <input type="hidden" name="prodCatalogId" 
value="${Static["org.ofbiz.product.catalog.CatalogWorker"].getCurrentCatalogId(request)?if_exists}"/>
               <table border="0">
                 <tr>


Reply via email to