svn commit: r554540 - in /ofbiz/branches/release4.0/applications/order: webapp/ordermgr/WEB-INF/actions/entry/shipsettings.bsh webapp/ordermgr/WEB-INF/controller.xml webapp/ordermgr/entry/shipsettings.ftl widget/ordermgr/OrderEntryOrderScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r554540 - in /ofbiz/branches/release4.0/applications/order: webapp/ordermgr/WEB-INF/actions/entry/shipsettings.bsh webapp/ordermgr/WEB-INF/controller.xml webapp/ordermgr/entry/shipsettings.ftl widget/ordermgr/OrderEntryOrderScreens.xml

lektran
Author: lektran
Date: Sun Jul  8 23:49:23 2007
New Revision: 554540

URL: http://svn.apache.org/viewvc?view=rev&rev=554540
Log:
Applied fix from trunk for revision: 552250

Modified:
    ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/entry/shipsettings.bsh
    ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/controller.xml
    ofbiz/branches/release4.0/applications/order/webapp/ordermgr/entry/shipsettings.ftl
    ofbiz/branches/release4.0/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml

Modified: ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/entry/shipsettings.bsh
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/entry/shipsettings.bsh?view=diff&rev=554540&r1=554539&r2=554540
==============================================================================
--- ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/entry/shipsettings.bsh (original)
+++ ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/entry/shipsettings.bsh Sun Jul  8 23:49:23 2007
@@ -35,6 +35,7 @@
 }
 
 orderPartyId = cart.getPartyId();
+shipToPartyId = parameters.get("shipToPartyId");
 context.put("cart", cart);
 
 // nuke the event messages
@@ -49,6 +50,15 @@
             context.put("orderParty", orderParty);
             context.put("orderPerson", orderPerson);
             context.put("shippingContactMechList", shippingContactMechList);
+        }
+    }
+    // Ship to another party
+    if (shipToPartyId != null) {
+        shipToParty = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", shipToPartyId));
+        if (shipToParty != null) {    
+            context.put("shipToParty", shipToParty);            
+            shipToPartyShippingContactMechList = ContactHelper.getContactMech(shipToParty, "SHIPPING_LOCATION", "POSTAL_ADDRESS", false);
+            context.put("shipToPartyShippingContactMechList", shipToPartyShippingContactMechList);
         }
     }
     // suppliers for the drop-ship select box

Modified: ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/controller.xml?view=diff&rev=554540&r1=554539&r2=554540
==============================================================================
--- ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original)
+++ ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/controller.xml Sun Jul  8 23:49:23 2007
@@ -623,11 +623,6 @@
         <response name="error" type="request" value="orderentry"/>
     </request-map>
 
-    <request-map uri="chooseOrderPartyAddress">
-        <security https="true" auth="true"/>
-        <response name="success" type="view" value="addrsetting"/>
-    </request-map>
-
     <!-- For checkout steps that use finalizeOrder: This request chain is for calculating shipping & tax before getting to the payments page, so that the visitor
         will know the full shipping & tax charges when trying to split payments between various payment methods -->
     <request-map uri="calcShippingBeforePayment">
@@ -1547,7 +1542,6 @@
     <view-map name="custsetting" type="screen" page="component://order/widget/ordermgr/OrderEntryOrderScreens.xml#CustSettings"/>
     <view-map name="shipsetting" type="screen" page="component://order/widget/ordermgr/OrderEntryOrderScreens.xml#ShipSettings"/>
     <view-map name="EditShipAddress" type="screen" page="component://order/widget/ordermgr/OrderEntryOrderScreens.xml#EditShipAddress"/>
-    <view-map name="addrsetting" type="screen" page="component://order/widget/ordermgr/OrderEntryOrderScreens.xml#AddrSettings"/>
     <view-map name="SetItemShipGroups" type="screen" page="component://order/widget/ordermgr/OrderEntryOrderScreens.xml#SetItemShipGroups"/>
     <view-map name="optionsetting" type="screen" page="component://order/widget/ordermgr/OrderEntryOrderScreens.xml#OptionSettings"/>
     <view-map name="billsetting" type="screen" page="component://order/widget/ordermgr/OrderEntryOrderScreens.xml#BillSettings"/>

Modified: ofbiz/branches/release4.0/applications/order/webapp/ordermgr/entry/shipsettings.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/webapp/ordermgr/entry/shipsettings.ftl?view=diff&rev=554540&r1=554539&r2=554540
==============================================================================
--- ofbiz/branches/release4.0/applications/order/webapp/ordermgr/entry/shipsettings.ftl (original)
+++ ofbiz/branches/release4.0/applications/order/webapp/ordermgr/entry/shipsettings.ftl Sun Jul  8 23:49:23 2007
@@ -181,6 +181,35 @@
                   <#assign i = i + 1>
                 </#list>
             </#if>
+            <#if shipToPartyShippingContactMechList?has_content>
+                <tr><td colspan="3"><hr class='sepbar'/></td></tr>
+                <tr><td colspan="3">${uiLabelMap.OrderShipToAnotherParty}: <b>${Static["org.ofbiz.party.party.PartyHelper"].getPartyName(shipToParty)}</b></td></tr>
+                <tr><td colspan="3"><hr class='sepbar'/></td></tr>
+                <#list shipToPartyShippingContactMechList as shippingContactMech>
+                  <#assign shippingAddress = shippingContactMech.getRelatedOne("PostalAddress")>
+                  <tr>
+                    <td align="left" valign="top" width="1%" nowrap>
+                      <input type="radio" name="${shipGroupIndex?default("0")}_shipping_contact_mech_id" value="${shippingAddress.contactMechId}" ${checkedValue} />
+                    </td>
+                    <td align="left" valign="top" width="99%" nowrap>
+                      <div class="tabletext">
+                        <#if shippingAddress.toName?has_content><b>${uiLabelMap.CommonTo}:</b>&nbsp;${shippingAddress.toName}<br/></#if>
+                        <#if shippingAddress.attnName?has_content><b>${uiLabelMap.CommonAttn}:</b>&nbsp;${shippingAddress.attnName}<br/></#if>
+                        <#if shippingAddress.address1?has_content>${shippingAddress.address1}<br/></#if>
+                        <#if shippingAddress.address2?has_content>${shippingAddress.address2}<br/></#if>
+                        <#if shippingAddress.city?has_content>${shippingAddress.city}</#if>
+                        <#if shippingAddress.stateProvinceGeoId?has_content><br/>${shippingAddress.stateProvinceGeoId}</#if>
+                        <#if shippingAddress.postalCode?has_content><br/>${shippingAddress.postalCode}</#if>
+                        <#if shippingAddress.countryGeoId?has_content><br/>${shippingAddress.countryGeoId}</#if>                                                                                    
+                      </div>
+                    </td>
+                    <td>&nbsp;</td>                      
+                  </tr>
+                  <#if shippingContactMech_has_next>
+                  <tr><td colspan="3"><hr class='sepbar'/></td></tr>
+                  </#if>
+                </#list>
+            </#if>
             </table>  
 </#list>
           </td>
@@ -194,42 +223,35 @@
 
       <#-- select a party id to ship to instead -->
 
-      <br/>
-      <form method="post" action="chooseOrderPartyAddress" name="partyshipform">
-
-        <table width="100%" border='0' cellspacing='0' cellpadding='0' class='boxtop'>
-          <tr>
-           <td><div class="boxhead">${uiLabelMap.OrderShipToAnotherParty}</div></td>
-            <td valign="middle" align="right">
-              <a href="javascript:document.partyshipform.submit();" class="buttontext">${uiLabelMap.CommonContinue}</a>
-           </td>
-          </tr>
-        </table>
-
-        <table width="100%" border="0" align="center" cellspacing='0' cellpadding='0' class='boxoutside'>
-          <tr><td>
-              <input type="hidden" name="contactMechPurposeTypeId" value="SHIPPING_LOCATION"/>
-              <table width="100%" border='0' cellspacing='0' cellpadding='0' class='boxbottom'>
-                <tr><td colspan="4">&nbsp;</td></tr>
-                <tr>
-                <td>&nbsp;</td>
-                <td align='right' valign='middle' nowrap><div class='tableheadtext'>${uiLabelMap.PartyPartyId}</div></td>
-                <td>&nbsp;</td>
-                <td valign='middle'>
-                  <div class='tabletext'>
-                    <input type='text' class='inputBox' name='partyId' value='${thisPartyId?if_exists}'/>
-                    <a href="javascript:call_fieldlookup2(document.partyshipform.partyId,'LookupPartyName');">
-                    <img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click here For Field Lookup'/>
-                    </a>
-                  </div>
-                </td>
-              </tr>
-              <tr><td colspan="4">&nbsp;</td></tr>
-            </table>
-          </td></tr>
-        </table>
-      </form>
-
+    <br/>
+    <form method="post" action="setShipping" name="partyshipform">
+      <div class="screenlet">
+        <div class="screenlet-title-bar">
+          <ul>
+            <li class="head3">${uiLabelMap.OrderShipToAnotherParty}</li>
+          </ul>
+          <br class="clear" />
+        </div>
+        <div class="screenlet-body">
+          <table width="100%" border='0' cellspacing='0' cellpadding='0' class='boxbottom'>
+            <tr><td colspan="4">&nbsp;</td></tr>
+            <tr>
+              <td>&nbsp;</td>
+              <td align='right' valign='middle' nowrap><div class='tableheadtext'>${uiLabelMap.PartyPartyId}</div></td>
+              <td>&nbsp;</td>
+              <td valign='middle'>
+                <div class='tabletext'>
+                  <input type='text' class='inputBox' name='shipToPartyId' value='${thisPartyId?if_exists}'/>
+                  <a href="javascript:call_fieldlookup2(document.partyshipform.shipToPartyId,'LookupPartyName');">
+                  <img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click here For Field Lookup'/></a>
+                  <input type="submit" class="smallSubmit" value="Continue">
+                </div>
+              </td>
+            </tr>
+          </table>
+        </div>
+      </div>
+    </form>
 <#else>
   <h3>${uiLabelMap.OrderViewPermissionError}</h3>
 </#if>

Modified: ofbiz/branches/release4.0/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml?view=diff&rev=554540&r1=554539&r2=554540
==============================================================================
--- ofbiz/branches/release4.0/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml (original)
+++ ofbiz/branches/release4.0/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml Sun Jul  8 23:49:23 2007
@@ -119,31 +119,6 @@
             </widgets>
         </section>
     </screen>
-    <screen name="AddrSettings">
-        <section>
-            <actions>
-                <set field="stepTitleId" value="OrderOrderEntryShipToSettings"/>
-                <set field="stepLabelId" value="FacilityShipping"/>
-                <set field="partyId" from-field="parameters.partyId"/>
-                <set field="contactMechPurposeTypeId" value="SHIPPING_LOCATION"/>
-
-                <entity-and entity-name="PartyContactMechPurpose" list-name="partyContactMechPurposes">
-                  <field-map env-name="partyId" field-name="partyId"/>
-                  <field-map env-name="contactMechPurposeTypeId" field-name="contactMechPurposeTypeId"/>
-                  <order-by field-name="-fromDate"/>
-                </entity-and>
-            </actions>
-            <widgets>
-                <decorator-screen name="CommonOrderCheckoutDecorator">
-                    <decorator-section name="body">
-                        <platform-specific>
-                            <html><html-template location="component://order/webapp/ordermgr/entry/addrsettings.ftl"/></html>
-                        </platform-specific>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
     <screen name="SetItemShipGroups">
         <section>
             <actions>