svn commit: r477453 - in /incubator/ofbiz/trunk/applications/order: entitydef/entitymodel.xml webapp/ordermgr/request/requestContactMech.ftl widget/ordermgr/RequestScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r477453 - in /incubator/ofbiz/trunk/applications/order: entitydef/entitymodel.xml webapp/ordermgr/request/requestContactMech.ftl widget/ordermgr/RequestScreens.xml

sichen
Author: sichen
Date: Mon Nov 20 17:20:06 2006
New Revision: 477453

URL: http://svn.apache.org/viewvc?view=rev&rev=477453
Log:
OFBIZ-468: Added CustRequest.fulfillContactMech and a screen to view the related address/phone/email.

Added:
    incubator/ofbiz/trunk/applications/order/webapp/ordermgr/request/requestContactMech.ftl
Modified:
    incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml
    incubator/ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml

Modified: incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml?view=diff&rev=477453&r1=477452&r2=477453
==============================================================================
--- incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml (original)
+++ incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml Mon Nov 20 17:20:06 2006
@@ -1499,6 +1499,11 @@
       <field name="maximumAmountUomId" type="id"></field>
       <field name="productStoreId" type="id"></field>
       <field name="salesChannelEnumId" type="id"></field>
+      <field name="fulfillContactMechId" type="id">
+          <description>
+              Field to support a location of a cust request--ie, product literature sent to an address, service call at a localtion, etc.
+          </description>
+      </field>
       <field name="createdDate" type="date-time"></field>
       <field name="createdByUserLogin" type="id-vlong"></field>
       <field name="lastModifiedDate" type="date-time"></field>
@@ -1527,6 +1532,9 @@
       </relation>
       <relation type="many" rel-entity-name="CustRequestTypeAttr">
         <key-map field-name="custRequestTypeId"/>
+      </relation>
+      <relation type="one" fk-name="CUST_REQ_FULCM" title="Fulfill" rel-entity-name="ContactMech">
+          <key-map field-name="fulfillContactMechId" rel-field-name="contactMechId"/>
       </relation>
     </entity>
     <entity entity-name="CustRequestAttribute"

Added: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/request/requestContactMech.ftl
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/request/requestContactMech.ftl?view=auto&rev=477453
==============================================================================
--- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/request/requestContactMech.ftl (added)
+++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/request/requestContactMech.ftl Mon Nov 20 17:20:06 2006
@@ -0,0 +1,80 @@
+<#--
+
+Copyright 2001-2006 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations
+under the License.
+-->
+
+<#if fulfillContactMech?has_content>
+
+<#if "POSTAL_ADDRESS" == fulfillContactMech.contactMechTypeId>
+  <#assign label = uiLabelMap.PartyAddressMailingShipping>
+  <#assign postalAddress = fulfillContactMech.getRelatedOneCache("PostalAddress")?if_exists>
+<#elseif "EMAIL_ADDRESS" == fulfillContactMech.contactMechTypeId>
+  <#assign label = uiLabelMap.PartyToEmailAddress>
+  <#assign emailAddress = fulfillContactMech.infoString?if_exists>
+<#elseif "TELECOM_NUMBER" == fulfillContactMech.contactMechTypeId>
+  <#assign label = uiLabelMap.PartyPhoneNumber>
+  <#assign telecomNumber = fulfillContactMech.getRelatedOneCache("TelecomNumber")?if_exists>
+</#if>
+
+<div class="screenlet">
+    <div class="screenlet-header">
+        <div class="boxhead">&nbsp;${uiLabelMap.PartyContactInformation}</div>
+    </div>
+    <div class="screenlet-body">
+        <table width="100%" border="0" cellpadding="1">
+            <tr>
+                <td align="right" valign="top" width="25%">
+                  <div class="tabletext">&nbsp;<b>${label?default(uiLabelMap.PartyUnknown)}</b></div>
+                </td>
+                <td width="5">&nbsp;</td>
+                <td align="left" valign="top" width="70%">
+                    <div class="tabletext">
+
+                      <#if emailAddress?has_content>${emailAddress}</#if>
+
+                      <#if postalAddress?has_content>
+                        <#if postalAddress.toName?has_content><b>${uiLabelMap.PartyAddrToName}:</b> ${postalAddress.toName}<br/></#if>
+                        <#if postalAddress.attnName?has_content><b>${uiLabelMap.PartyAddrAttnName}:</b> ${postalAddress.attnName}<br/></#if>
+                        ${postalAddress.address1?if_exists}<br/>
+                        <#if postalAddress.address2?has_content>${postalAddress.address2}<br/></#if>
+                        ${postalAddress.city?if_exists},
+                        <#if postalAddress.stateProvinceGeoId?has_content>
+                            <#assign stateProvince = postalAddress.getRelatedOneCache("StateProvinceGeo")>
+                            ${stateProvince.abbreviation?default(stateProvince.geoId)}
+                        </#if>
+                        ${postalAddress.postalCode?if_exists}
+                        <#if postalAddress.countryGeoId?has_content><br/>
+                             <#assign country = postalAddress.getRelatedOneCache("CountryGeo")>
+                             ${country.geoName?default(country.geoId)}
+                        </#if>
+                      </#if>
+
+                      <#if telecomNumber?has_content>
+                        ${telecomNumber.countryCode?if_exists}
+                        <#if telecomNumber.areaCode?has_content>${telecomNumber.areaCode?default("000")}-</#if>${telecomNumber.contactNumber?default("000-0000")}
+                        <#if (telecomNumber?has_content && !telecomNumber.countryCode?has_content) || telecomNumber.countryCode = "011">
+                          <a target="_blank" href="http://www.anywho.com/qry/wp_rl?npa=${telecomNumber.areaCode?if_exists}&telephone=${telecomNumber.contactNumber?if_exists}&btnsubmit.x=20&btnsubmit.y=8" class="linktext">(lookup:anywho.com)</a>
+                          <a target="_blank" href="http://whitepages.com/find_person_results.pl?fid=p&ac=${telecomNumber.areaCode?if_exists}&s=&p=${telecomNumber.contactNumber?if_exists}&pt=b&x=40&y=9" class="linktext">(lookup:whitepages.com)</a>
+                        </#if>
+                      </#if>
+
+                    </div>
+                </td>
+            </tr>
+        </table>
+    </div>
+</div>
+
+</#if>

Modified: incubator/ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml?view=diff&rev=477453&r1=477452&r2=477453
==============================================================================
--- incubator/ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml (original)
+++ incubator/ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml Mon Nov 20 17:20:06 2006
@@ -89,6 +89,7 @@
                 <get-related-one value-name="custRequest" relation-name="StatusItem" to-value-name="statusItem"/>
                 <get-related-one value-name="custRequest" relation-name="Uom" to-value-name="currency"/>
                 <get-related-one value-name="custRequest" relation-name="ProductStore" to-value-name="store"/>
+                <get-related-one value-name="custRequest" relation-name="FulfillContactMech" to-value-name="fulfillContactMech"/>
                 <set field="orderBy[]" value="sequenceNum"/>
                 <get-related value-name="custRequest" relation-name="CustRequestRole" list-name="requestRoles"/>
                 <get-related value-name="custRequest" relation-name="CustRequestItem" list-name="requestItems" order-by-list-name="orderBy"/>
@@ -419,6 +420,7 @@
                 </container>
                 <container style="righthalf">
                     <include-screen name="requestDate"/>
+                    <include-screen name="requestContactMech"/>
                     <include-screen name="requestRoles"/>
                 </container>
             </widgets>
@@ -438,6 +440,15 @@
             <widgets>
                 <platform-specific>
                     <html><html-template location="component://order/webapp/ordermgr/request/requestDate.ftl"/></html>
+                </platform-specific>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="requestContactMech">
+        <section>
+            <widgets>
+                <platform-specific>
+                    <html><html-template location="component://order/webapp/ordermgr/request/requestContactMech.ftl"/></html>
                 </platform-specific>
             </widgets>
         </section>