Author: lektran
Date: Sun Jul 1 00:03:55 2007
New Revision: 552255
URL:
http://svn.apache.org/viewvc?view=rev&rev=552255Log:
Applied patch from Oleg Andreyev, OFBIZ-1058: Incorrect company info in quote report header
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/companyHeader.bsh
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/companyHeader.bsh
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/companyHeader.bsh?view=diff&rev=552255&r1=552254&r2=552255==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/companyHeader.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/companyHeader.bsh Sun Jul 1 00:03:55 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");
}
}