Author: lektran
Date: Sat Jun 30 23:10:14 2007
New Revision: 552250
URL: http://svn.apache.org/viewvc?view=rev&rev=552250
Log:
Fixed bug reported by Nam Nguyen, OFBIZ-1087: Order Ship to Another Address
does not take in that address
It looks like the problem was a lack of support for ship groups
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/shipsettings.bsh
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
ofbiz/trunk/applications/order/webapp/ordermgr/entry/shipsettings.ftl
ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/shipsettings.bsh
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/shipsettings.bsh?view=diff&rev=552250&r1=552249&r2=552250
==============================================================================
---
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/shipsettings.bsh
(original)
+++
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/shipsettings.bsh
Sat Jun 30 23:10:14 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/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml?view=diff&rev=552250&r1=552249&r2=552250
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml Sat
Jun 30 23:10:14 2007
@@ -624,11 +624,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">
@@ -1549,7 +1544,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/trunk/applications/order/webapp/ordermgr/entry/shipsettings.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/shipsettings.ftl?view=diff&rev=552250&r1=552249&r2=552250
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/shipsettings.ftl
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/shipsettings.ftl Sat
Jun 30 23:10:14 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> ${shippingAddress.toName}<br/></#if>
+ <#if
shippingAddress.attnName?has_content><b>${uiLabelMap.CommonAttn}:</b> ${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> </td>
+ </tr>
+ <#if shippingContactMech_has_next>
+ <tr><td colspan="3"><hr class='sepbar'/></td></tr>
+ </#if>
+ </#list>
+ </#if>
</table>
</#list>
</td>
@@ -195,7 +224,7 @@
<#-- select a party id to ship to instead -->
<br/>
- <form method="post" action="chooseOrderPartyAddress" name="partyshipform">
+ <form method="post" action="setShipping" name="partyshipform">
<div class="screenlet">
<div class="screenlet-title-bar">
<ul>
@@ -204,7 +233,6 @@
<br class="clear" />
</div>
<div class="screenlet-body">
- <input type="hidden" name="contactMechPurposeTypeId"
value="SHIPPING_LOCATION"/>
<table width="100%" border='0' cellspacing='0' cellpadding='0'
class='boxbottom'>
<tr><td colspan="4"> </td></tr>
<tr>
@@ -213,8 +241,8 @@
<td> </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');">
+ <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>
Modified:
ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml?view=diff&rev=552250&r1=552249&r2=552250
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml
(original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml
Sat Jun 30 23:10:14 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>