Author: ashish
Date: Mon Sep 21 13:25:36 2009
New Revision: 817243
URL: http://svn.apache.org/viewvc?rev=817243&view=rev
Log:
Applied patch from jira issue OFBIZ-2953 - Update EditBillingAddress.groovy and
EditShippingAddress.groovy and allow it to fetch data for FAX number as well.
Thanks Awdesh & Sumit for the contribution.
Modified:
ofbiz/trunk/applications/party/data/PartyTypeData.xml
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy
Modified: ofbiz/trunk/applications/party/data/PartyTypeData.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/data/PartyTypeData.xml?rev=817243&r1=817242&r2=817243&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/data/PartyTypeData.xml (original)
+++ ofbiz/trunk/applications/party/data/PartyTypeData.xml Mon Sep 21 13:25:36
2009
@@ -51,6 +51,8 @@
<ContactMechPurposeType contactMechPurposeTypeId="PHONE_WORK_SEC"
description="Secondary Work Phone Number"/>
<ContactMechPurposeType contactMechPurposeTypeId="FAX_NUMBER"
description="Main Fax Number"/>
<ContactMechPurposeType contactMechPurposeTypeId="FAX_NUMBER_SEC"
description="Secondary Fax Number"/>
+ <ContactMechPurposeType contactMechPurposeTypeId="FAX_SHIPPING"
description="Shipping Destination Fax Number"/>
+ <ContactMechPurposeType contactMechPurposeTypeId="FAX_BILLING"
description="Billing Destination Fax Number"/>
<ContactMechPurposeType contactMechPurposeTypeId="PHONE_MOBILE"
description="Main Mobile Phone Number"/>
<ContactMechPurposeType contactMechPurposeTypeId="PHONE_ASSISTANT"
description="Assistant's Phone Number"/>
<ContactMechPurposeType contactMechPurposeTypeId="PRIMARY_PHONE"
description="Primary Phone Number"/>
Modified:
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy?rev=817243&r1=817242&r2=817243&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
(original)
+++
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
Mon Sep 21 13:25:36 2009
@@ -71,4 +71,12 @@
context.billToTelecomNumber = billToTelecomNumber;
context.billToExtension = pcm.extension;
}
+
+ billToFaxNumberList = ContactHelper.getContactMech(party, "FAX_BILLING",
"TELECOM_NUMBER", false)
+ if (billToFaxNumberList) {
+ billToFaxNumber =
(EntityUtil.getFirst(billToFaxNumberList)).getRelatedOne("TelecomNumber");
+ faxPartyContactMech =
EntityUtil.getFirst(billToFaxNumber.getRelated("PartyContactMech"));
+ context.billToFaxNumber = billToFaxNumber;
+ context.billToFaxExtension = faxPartyContactMech.extension;
+ }
}
\ No newline at end of file
Modified:
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy?rev=817243&r1=817242&r2=817243&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy
(original)
+++
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy
Mon Sep 21 13:25:36 2009
@@ -60,4 +60,11 @@
context.shipToExtension = pcm.extension;
}
+ shipToFaxNumberList = ContactHelper.getContactMech(party, "FAX_SHIPPING",
"TELECOM_NUMBER", false)
+ if (shipToFaxNumberList) {
+ shipToFaxNumber =
(EntityUtil.getFirst(shipToFaxNumberList)).getRelatedOne("TelecomNumber");
+ faxPartyContactMech =
EntityUtil.getFirst(shipToFaxNumber.getRelated("PartyContactMech"));
+ context.shipToFaxNumber = shipToFaxNumber;
+ context.shipToFaxExtension = faxPartyContactMech.extension;
+ }
}
\ No newline at end of file