Author: jleroux
Date: Sat Jul 7 05:54:37 2007
New Revision: 554195
URL:
http://svn.apache.org/viewvc?view=rev&rev=554195Log:
Applied fix from trunk for revision: 552255
Modified:
ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/order/companyHeader.bsh
Modified: ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/order/companyHeader.bsh
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/order/companyHeader.bsh?view=diff&rev=554195&r1=554194&r2=554195==============================================================================
--- ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/order/companyHeader.bsh (original)
+++ ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/order/companyHeader.bsh Sat Jul 7 05:54:37 2007
@@ -35,6 +35,8 @@
shipmentId = parameters.get("shipmentId");
returnHeader = (GenericValue) parameters.get("returnHeader");
returnId = parameters.get("returnId");
+quote = null;
+quoteId = parameters.get("quoteId");
nowTimestamp = UtilDateTime.nowTimestamp();
fromPartyId = parameters.get("fromPartyId");
@@ -53,6 +55,10 @@
returnHeader = delegator.findByPrimaryKey("ReturnHeader", UtilMisc.toMap("returnId", returnId));
}
+if (quoteId != null) {
+ quote = delegator.findByPrimaryKey("Quote", UtilMisc.toMap("quoteId", quoteId));
+}
+
// defaults:
logoImageUrl = null; // "
http://localhost:8080/images/ofbiz_powered.gif";
partyId = null;
@@ -92,6 +98,11 @@
if (("CUSTOMER_RETURN".equals(returnHeader.getString("returnHeaderTypeId"))) &&
(returnHeader.get("toPartyId") != null)) {
partyId = returnHeader.getString("toPartyId");
+ }
+} else if (quote != null) {
+ productStore = quote.getRelatedOne("ProductStore");
+ if (productStore != null && productStore.get("payToPartyId") != null) {
+ partyId = productStore.getString("payToPartyId");
}
}