Author: surajk Date: Sat Apr 27 05:27:08 2019 New Revision: 1858237 URL: http://svn.apache.org/viewvc?rev=1858237&view=rev Log: Improved: Incorrect contact information displayed on purchase order view page. (OFBIZ-5401) It seems like the address information listed should relate to the party of the screen, so the supplier contact information should probably appear. Thanks Christian Carlow for reporting, Prakhar Kumar for the patch and everyone else for discussions and suggestions.
Modified: ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderContactInfo.ftl Modified: ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderContactInfo.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderContactInfo.ftl?rev=1858237&r1=1858236&r2=1858237&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderContactInfo.ftl (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderContactInfo.ftl Sat Apr 27 05:27:08 2019 @@ -101,11 +101,24 @@ under the License. </#if> </div> </td> + <#if orderHeader.orderTypeId == "PURCHASE_ORDER" && displayParty?has_content> + <#assign supplierContactMech = EntityQuery.use(delegator).from("PartyContactMechPurpose").where("partyId", displayParty.partyId, "contactMechPurposeTypeId", "BILLING_LOCATION").queryFirst()!> + <#if supplierContactMech?has_content> + <#assign supplierAddress = EntityQuery.use(delegator).from("PostalAddress").where("contactMechId", supplierContactMech.contactMechId).queryOne()!> + <td class="label"><span class="label"> ${uiLabelMap.OrderAddress}</span></td> + <td> + <div> + ${setContextField("postalAddress", supplierAddress)} + ${screens.render("component://party/widget/partymgr/PartyScreens.xml#postalAddressHtmlFormatter")} + </div> + </td> + </#if> + </#if> </tr> <#list orderContactMechValueMaps as orderContactMechValueMap> <#assign contactMech = orderContactMechValueMap.contactMech> <#assign contactMechPurpose = orderContactMechValueMap.contactMechPurposeType> - <tr><td colspan="3"><hr /></td></tr> + <tr><td colspan="4"><hr /></td></tr> <tr> <td class="label"> <span class="label"> ${contactMechPurpose.get("description",locale)}</span>