svn commit: r738452 - in /ofbiz/trunk: applications/accounting/config/ applications/accounting/data/ applications/accounting/entitydef/ applications/accounting/webapp/accounting/WEB-INF/ applications/accounting/webapp/accounting/WEB-INF/actions/fixedas...

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

svn commit: r738452 - in /ofbiz/trunk: applications/accounting/config/ applications/accounting/data/ applications/accounting/entitydef/ applications/accounting/webapp/accounting/WEB-INF/ applications/accounting/webapp/accounting/WEB-INF/actions/fixedas...

jleroux@apache.org
Author: jleroux
Date: Wed Jan 28 11:03:20 2009
New Revision: 738452

URL: http://svn.apache.org/viewvc?rev=738452&view=rev
Log:
Add geolocation screens to Facility ContactMechs, FacilityLocation and FixedAsset + miscellaneous enhancements, also in data.
I have began to refactor toward putting as much as possible geolocation artifacts in framework/common with the idea of creating an applications/common component where all shared (transversal) features/artifacts would be. More explanations on dev ML soon...
There is also an unused taxAuthorityVATReport request/view-map in accounting controller (part of another task I slowly work on)

Added:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/fixedasset/FixedAssetGeoLocation.groovy
    ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetGeoLocation.ftl
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FacilityLocationGeoLocation.groovy
    ofbiz/trunk/applications/product/webapp/facility/facility/FacilityLocationGeoLocation.ftl
Modified:
    ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
    ofbiz/trunk/applications/accounting/data/DemoOrganizationData.xml
    ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml
    ofbiz/trunk/applications/accounting/widget/Menus.xml
    ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml
    ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml
    ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml
    ofbiz/trunk/applications/party/config/PartyUiLabels.xml
    ofbiz/trunk/applications/party/data/PartyGeoPointData.xml
    ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl
    ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
    ofbiz/trunk/applications/product/config/ProductUiLabels.xml
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/webapp/facility/facility/EditFacilityLocation.ftl
    ofbiz/trunk/applications/product/webapp/facility/facility/ViewContactMechs.ftl
    ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
    ofbiz/trunk/framework/common/config/CommonUiLabels.xml
    ofbiz/trunk/framework/common/src/org/ofbiz/common/geo/GeoWorker.java
    ofbiz/trunk/framework/common/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/assetmaint/data/AssetMaintDemoData.xml
    ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrDemoData.xml

Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Wed Jan 28 11:03:20 2009
@@ -10032,6 +10032,10 @@
         <value xml:lang="nl">Rapport afschrijvingen op vaste activa</value>
         <value xml:lang="th">รายงานคำอธิบายทรัพย์สินไม่หมุนเวียน</value>
     </property>
+    <property key="PageTitleFixedAssetGeoLocation">
+        <value xml:lang="en">Fixed Asset GeoLocation</value>
+        <value xml:lang="fr">Géolocalisation de l'actif immobilisé</value>
+    </property>
     <property key="PageTitleInventoryIssueSummary">
         <value xml:lang="en">Inventory Issue Summary</value>
         <value xml:lang="fr">Résumé des problèmes d'inventaire</value>

Modified: ofbiz/trunk/applications/accounting/data/DemoOrganizationData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/DemoOrganizationData.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/data/DemoOrganizationData.xml (original)
+++ ofbiz/trunk/applications/accounting/data/DemoOrganizationData.xml Wed Jan 28 11:03:20 2009
@@ -27,10 +27,12 @@
     <PartyRole partyId="Company" roleTypeId="_NA_"/>
     <ContactMech contactMechId="9000" contactMechTypeId="POSTAL_ADDRESS"/>
     <PartyContactMech partyId="Company" contactMechId="9000" fromDate="2000-01-01 00:00:00.000" allowSolicitation="Y"/>
-    <PostalAddress contactMechId="9000" toName="Company XYZ" address1="2003 Open Blvd" city="Open City" postalCode="999999" countryGeoId="USA" stateProvinceGeoId="CA"/>
+    <PostalAddress contactMechId="9000" toName="Company XYZ" address1="2003 Open Blvd" city="Open City" postalCode="999999" countryGeoId="USA" stateProvinceGeoId="CA" geoPointId="9000"/>
     <PartyContactMechPurpose partyId="Company" contactMechId="9000" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2000-01-01 00:00:00.000"/>
     <PartyContactMechPurpose partyId="Company" contactMechId="9000" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2000-01-01 00:00:00.000"/>
     <PartyContactMechPurpose partyId="Company" contactMechId="9000" contactMechPurposeTypeId="PAYMENT_LOCATION" fromDate="2000-01-01 00:00:00.000"/>
+    <PartyGeoPoint partyId="Company" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>    
+    
     
     <!-- Sub-Organizations -->
     <Party partyId="MARKETING" partyTypeId="PARTY_GROUP" createdDate="2004-03-27 09:37:40.989" createdByUserLogin="admin" lastModifiedDate="2004-03-27 09:37:40.989" lastModifiedByUserLogin="admin"/>

Modified: ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml Wed Jan 28 11:03:20 2009
@@ -717,6 +717,48 @@
         <key-map field-name="fixedAssetId"/>
       </relation>
     </entity>
+    <entity entity-name="FixedAssetGeoPoint" package-name="org.ofbiz.accounting.fixedasset" title="Fixed Asset Geo Location with history">
+      <field name="fixedAssetId" type="id-ne"></field>
+      <field name="geoPointId" type="id-ne"></field>
+      <field name="fromDate" type="date-time"></field>
+      <field name="thruDate" type="date-time"></field>
+      <prim-key field="fixedAssetId"/>
+      <prim-key field="geoPointId"/>
+      <prim-key field="fromDate"/>
+      <relation type="one" fk-name="FXDASTGEOPT_FXDAST" rel-entity-name="FixedAsset">
+        <key-map field-name="fixedAssetId"/>
+      </relation>
+      <relation type="one" fk-name="FXDASTGEOPT_GEOPT" rel-entity-name="GeoPoint">
+        <key-map field-name="geoPointId"/>
+      </relation>
+    </entity>
+    
+    <view-entity entity-name="FixedAssetAndGeoPoint" package-name="org.ofbiz.accounting.fixedasset" title="Fixed Asset and Geo Point View Entity">
+      <member-entity entity-alias="FA" entity-name="FixedAsset"/>
+      <member-entity entity-alias="FAGPT" entity-name="FixedAssetGeoPoint"/>
+      <member-entity entity-alias="GPT" entity-name="GeoPoint"/>
+      <alias-all entity-alias="GPT"/>    
+      <alias entity-alias="FA" name="fixedAssetId"/>
+      <alias entity-alias="FAGPT" name="fromDate"/>
+      <alias entity-alias="FAGPT" name="thruDate"/>
+      <view-link entity-alias="FA" rel-entity-alias="FAGPT">
+        <key-map field-name="fixedAssetId"/>
+      </view-link>
+      <view-link entity-alias="FAGPT" rel-entity-alias="GPT">
+        <key-map field-name="geoPointId"/>
+      </view-link>
+      <relation type="many" rel-entity-name="FixedAssetGeoPoint">
+        <key-map field-name="fixedAssetId"/>
+        <key-map field-name="geoPointId"/>
+      </relation>
+      <relation type="one-nofk" rel-entity-name="FixedAsset">
+        <key-map field-name="fixedAssetId"/>
+      </relation>
+      <relation type="one-nofk" rel-entity-name="GeoPoint">
+        <key-map field-name="geoPointId"/>
+      </relation>
+    </view-entity>  
+  
     <entity entity-name="FixedAssetIdent"
         package-name="org.ofbiz.accounting.fixedasset"
         title="Fixed Asset Identification Entity">
@@ -999,48 +1041,6 @@
         </relation>
     </entity>
 
-    <entity entity-name="FixedAssetGeoPoint" package-name="org.ofbiz.accounting.fixedasset" title="Fixed Asset Geo Location with history">
-        <field name="fixedAssetId" type="id-ne"></field>
-        <field name="geoPointId" type="id-ne"></field>
-        <field name="fromDate" type="date-time"></field>
-        <field name="thruDate" type="date-time"></field>
-        <prim-key field="fixedAssetId"/>
-        <prim-key field="geoPointId"/>
-        <prim-key field="fromDate"/>
-        <relation type="one" fk-name="FXDASTGEOPT_FXDAST" rel-entity-name="FixedAsset">
-            <key-map field-name="fixedAssetId"/>
-        </relation>
-        <relation type="one" fk-name="FXDASTGEOPT_GEOPT" rel-entity-name="GeoPoint">
-            <key-map field-name="geoPointId"/>
-        </relation>
-    </entity>
-  
-    <view-entity entity-name="FixedAssetAndGeoPoint" package-name="org.ofbiz.accounting.fixedasset" title="Fixed Asset and Geo Point View Entity">
-      <member-entity entity-alias="FA" entity-name="FixedAsset"/>
-      <member-entity entity-alias="FAGPT" entity-name="FixedAssetGeoPoint"/>
-      <member-entity entity-alias="GPT" entity-name="GeoPoint"/>
-      <alias-all entity-alias="GPT"/>    
-      <alias entity-alias="FA" name="fixedAssetId"/>
-      <alias entity-alias="FAGPT" name="fromDate"/>
-      <alias entity-alias="FAGPT" name="thruDate"/>
-      <view-link entity-alias="FA" rel-entity-alias="FAGPT">
-        <key-map field-name="fixedAssetId"/>
-      </view-link>
-      <view-link entity-alias="FAGPT" rel-entity-alias="GPT">
-          <key-map field-name="geoPointId"/>
-      </view-link>
-      <relation type="many" rel-entity-name="FixedAssetGeoPoint">
-        <key-map field-name="fixedAssetId"/>
-        <key-map field-name="geoPointId"/>
-      </relation>
-      <relation type="one-nofk" rel-entity-name="FixedAsset">
-        <key-map field-name="fixedAssetId"/>
-      </relation>
-      <relation type="one-nofk" rel-entity-name="GeoPoint">
-        <key-map field-name="geoPointId"/>
-      </relation>
-    </view-entity>  
-  
   <entity entity-name="AccommodationClass"
     package-name="org.ofbiz.accounting.fixedasset"
     title="Accommodation Class">

Added: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/fixedasset/FixedAssetGeoLocation.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/fixedasset/FixedAssetGeoLocation.groovy?rev=738452&view=auto
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/fixedasset/FixedAssetGeoLocation.groovy (added)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/fixedasset/FixedAssetGeoLocation.groovy Wed Jan 28 11:03:20 2009
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import org.ofbiz.common.geo.GeoWorker;
+
+fixedAssetId = parameters.fixedAssetId
+
+if (fixedAssetId) {
+    latestGeoPoint = GeoWorker.findLatestGeoPoint(delegator, "FixedAssetAndGeoPoint", "fixedAssetId", fixedAssetId, null, null);
+    context.latestGeoPoint = latestGeoPoint;
+    context.fixedAssetId = fixedAssetId;
+    
+    if (latestGeoPoint) {
+        elevationUom = delegator.findOne("Uom", [uomId : latestGeoPoint.elevationUomId], false);
+        context.elevationUomAbbr = elevationUom.abbreviation;
+    }
+}
+    
\ No newline at end of file

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Wed Jan 28 11:03:20 2009
@@ -657,8 +657,8 @@
         <event type="service" invoke="deletePartyGlAccount"/>
         <response name="success" type="view" value="EditPartyGlAccount"/>
         <response name="error" type="view" value="EditPartyGlAccount"/>
-    </request-map>
-
+    </request-map>    
+    
     <!-- =============== Fixed Asset mapping =================-->
     <request-map uri="ListFixedAssets"><security https="true" auth="true"/><response name="success" type="view" value="ListFixedAssets"/></request-map>
     <request-map uri="FixedAssetSearchResults"><security https="true" auth="false"/><response name="success" type="view" value="FixedAssetSearchResults"/></request-map>
@@ -1896,6 +1896,19 @@
         <response name="error" type="view" value="ShowFixedAssetDepreciation"/>
     </request-map>
 
+    <request-map uri="taxAuthorityVATReport">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="taxAuthorityVATReport"/>
+    </request-map>
+
+    <!-- GeoLocation-->
+    <request-map uri="FixedAssetGeolocation">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="FixedAssetGeolocation"/>
+        <response name="error" type="view" value="EditFacility"/>
+    </request-map>
+    
+
     <!-- end of request mappings -->
 
     <!-- View Mappings -->
@@ -1965,7 +1978,7 @@
     <view-map name="ListGlAccountEntries" type="screen" page="component://accounting/widget/GlobalGlAccountsScreens.xml#ListGlAccountEntries"/>
     <view-map name="ListAcctgTransEntries" type="screen" page="component://accounting/widget/GlobalGlAccountsScreens.xml#ListAcctgTransEntries"/>
     <view-map name="EditPartyGlAccount" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditPartyGlAccount"/>
-
+    
     <!-- FinAccount -->
     <view-map name="FindFinAccount" type="screen" page="component://accounting/widget/FinAccountScreens.xml#FindFinAccount"/>
     
@@ -2128,6 +2141,12 @@
 
     <!-- Agreements Views   -->
     <view-map name="EditAgreementRoles" type="screen" page="component://accounting/widget/AgreementScreens.xml#EditAgreementRoles"/>
-    
+
+
+    <view-map name="findTaxAuthorityVATReport" type="screen" page="component://accounting/widget/TaxAuthorityFroms.xml#FindTaxAuthorityVATReport"/>
+    <view-map name="taxAuthorityVATReport" type="screen" page="component://accounting/widget/TaxAuthorityFroms.xml#TaxAuthorityVATReport"/>
+
+    <view-map name="FixedAssetGeolocation" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#FixedAssetGeolocation"/>    
+
     <!-- end of view mappings -->
 </site-conf>

Added: ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetGeoLocation.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetGeoLocation.ftl?rev=738452&view=auto
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetGeoLocation.ftl (added)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetGeoLocation.ftl Wed Jan 28 11:03:20 2009
@@ -0,0 +1,50 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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 latestGeoPoint?has_content>
+  <#if latestGeoPoint.latitude?has_content && latestGeoPoint.longitude?has_content>
+    ${uiLabelMap.CommonLatitude}${latestGeoPoint.latitude}<br>
+    ${uiLabelMap.CommonLongitude}${latestGeoPoint.longitude}
+    <#if latestGeoPoint.elevation?has_content>
+      <br>${uiLabelMap.CommonElevation}${latestGeoPoint.elevation} ${elevationUomAbbr}
+    </#if>  
+    <#if latestGeoPoint.dataSourceId?has_content>        
+      <#if latestGeoPoint.dataSourceId == "GEOPT_GOOGLE">
+        <div id="map" style="border:1px solid #979797; background-color:#e5e3df; width:400px; height:300px; margin:2em auto;">
+          <div style="padding:1em; color:gray;">${uiLabelMap.CommonLoading}</div>
+        </div>
+        <#assign defaultUrl = "https." + request.getServerName()>
+        <#assign defaultGogleMapKey = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", defaultUrl)>
+        <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=${defaultGogleMapKey}"
+            type="text/javascript">
+        </script>
+        <script type="text/javascript">
+          loadGoogleMap("${latestGeoPoint.latitude}",
+                        "${latestGeoPoint.longitude}",                        
+                        "<@ofbizUrl>EditFixedAsset?fixedAssetId=${fixedAssetId}</@ofbizUrl>",
+                        "${uiLabelMap.AccountingFixedAsset} ${uiLabelMap.CommonOf} ${fixedAssetId}")
+        </script>          
+      <#elseif  latestGeoPoint.dataSourceId == "GEOPT_YAHOO">            
+      <#elseif  latestGeoPoint.dataSourceId == "GEOPT_MICROSOFT">      
+      <#elseif  latestGeoPoint.dataSourceId == "GEOPT_MAPTP">      
+      </#if>  
+    </#if>  
+  </#if>
+<#else>
+  <h2>${uiLabelMap.CommonNoGeolocationAvailable}</h2>      
+</#if>

Modified: ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml Wed Jan 28 11:03:20 2009
@@ -556,4 +556,23 @@
             </widgets>
         </section>
     </screen>
+    
+    <screen name="FixedAssetGeolocation">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleFixedAssetGeoLocation"/>
+                <script location="component://accounting/webapp/accounting/WEB-INF/actions/fixedasset//FixedAssetGeolocation.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonFixedAssetDecorator" location="${parameters.fixedAssetDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://accounting/webapp/accounting/fixedasset/FixedAssetGeolocation.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>    
+    
 </screens>

Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/Menus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/Menus.xml Wed Jan 28 11:03:20 2009
@@ -420,6 +420,9 @@
         <menu-item name="FixedAssetDepreciation" title="${uiLabelMap.AccountingFixedAssetDepreciation}">
             <link target="showFixedAssetDepreciation?fixedAssetId=${fixedAssetId}"/>
         </menu-item>
+        <menu-item name="FixedAssetGeolocation" title="${uiLabelMap.CommonGeoLocation}">
+            <link target="FixedAssetGeolocation?fixedAssetId=${fixedAssetId}"/>
+        </menu-item>
     </menu>
     
     <menu name="FixedAssetCalendarTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"

Modified: ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml Wed Jan 28 11:03:20 2009
@@ -122,7 +122,7 @@
     <PartyGeoPoint partyId="DemoCustomer" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>    
     
     <ContactMech contactMechId="9015" contactMechTypeId="POSTAL_ADDRESS"/>
-    <PostalAddress contactMechId="9015" toName="Demo Customer" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA" geoPointId="9000" geoPointId="9000"/>    
+    <PostalAddress contactMechId="9015" toName="Demo Customer" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA" geoPointId="9000"/>    
     <PartyContactMech partyId="DemoCustomer" contactMechId="9015" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
     <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="9015" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
     <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="9015" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
@@ -143,29 +143,56 @@
     <PaymentMethod paymentMethodId="9015" paymentMethodTypeId="CREDIT_CARD" partyId="DemoCustomer" fromDate="2001-05-13 00:00:00.000"/>
     <CreditCard paymentMethodId="9015" cardType="Visa" cardNumber="4111111111111111" expireDate="02/2011" companyNameOnCard=""
         titleOnCard="" firstNameOnCard="DEMO" middleNameOnCard="" lastNameOnCard="CUSTOMER" suffixOnCard="" contactMechId="9015"/>
-    <!-- EuroCustomer want invoices in euro -->
+
+    <!-- EuroCustomer want invoices in euro and be located in Amsterdam -->
     <Party partyId="EuroCustomer" partyTypeId="PERSON" statusId="PARTY_ENABLED" preferredCurrencyUomId="EUR"/>
-    <Person partyId="EuroCustomer" firstName="Demo" lastName="Customer"/>
+    <Person partyId="EuroCustomer" firstName="Euro" lastName="Customer"/>
     <UserLogin partyId="EuroCustomer" userLoginId="EuroCustomer"/>
     <PartyRole partyId="EuroCustomer" roleTypeId="CUSTOMER"/>
     <PartyRole partyId="EuroCustomer" roleTypeId="BILL_TO_CUSTOMER"/>
+    <PartyGeoPoint partyId="EuroCustomer" geoPointId="9001" fromDate="2009-01-09 00:00:00.000"/>
     
     <ContactMech contactMechId="EUROCUSTOMER" contactMechTypeId="POSTAL_ADDRESS"/>
-    <PostalAddress contactMechId="EUROCUSTOMER" toName="Euro Customer" address1="Prinsengracht 3" city="Amsterdam" postalCode="1000BD" countryGeoId="NLD"/>
-    <PartyContactMech partyId="DemoCustomer" contactMechId="EUROCUSTOMER" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
-    <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
-    <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
-    <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
-    <PostalAddress contactMechId="EUROCUSTOMER" toName="Demo Customer" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA" geoPointId="9000"/>
+    <PostalAddress contactMechId="EUROCUSTOMER" toName="Euro Customer" address1="Prinsengracht 3" city="Amsterdam" postalCode="1000BD" countryGeoId="NLD" geoPointId="9001"/>
+    <PartyContactMech partyId="EuroCustomer" contactMechId="EUROCUSTOMER" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
+    <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
     <PartyContactMech partyId="EuroCustomer" contactMechId="EUROCUSTOMER" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
     <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
     <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
     <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
     <ContactMech contactMechId="EURO01" contactMechTypeId="EMAIL_ADDRESS" infoString="[hidden email]"/>
-    <PartyContactMech partyId="DemoCustomer" contactMechId="EURO01" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
-    <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="EURO01" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2001-05-13 00:00:00.000"/>
+    <PartyContactMech partyId="EuroCustomer" contactMechId="EURO01" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
+    <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EURO01" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2001-05-13 00:00:00.000"/>
     
     <PaymentMethod paymentMethodId="EUROCUSTOMER" paymentMethodTypeId="CREDIT_CARD" partyId="EuroCustomer" fromDate="2001-05-13 00:00:00.000"/>
     <CreditCard paymentMethodId="EUROCUSTOMER" cardType="Visa" cardNumber="4111111111111111" expireDate="02/2011" companyNameOnCard=""
-        titleOnCard="" firstNameOnCard="DEMO" middleNameOnCard="" lastNameOnCard="CUSTOMER" suffixOnCard="" contactMechId="EUROCUSTOMER"/>
+    titleOnCard="" firstNameOnCard="EURO" middleNameOnCard="" lastNameOnCard="CUSTOMER" suffixOnCard="" contactMechId="EUROCUSTOMER"/>
+    
+    <!-- FrenchCustomer want invoices in euro and be located in Poussan -->
+    <Party partyId="FrenchCustomer" partyTypeId="PERSON" statusId="PARTY_ENABLED" preferredCurrencyUomId="EUR"/>
+    <Person partyId="FrenchCustomer" firstName="French" lastName="Customer"/>
+    <UserLogin partyId="FrenchCustomer" userLoginId="FrenchCustomer"/>
+    <PartyRole partyId="FrenchCustomer" roleTypeId="CUSTOMER"/>
+    <PartyRole partyId="FrenchCustomer" roleTypeId="BILL_TO_CUSTOMER"/>
+    <PartyGeoPoint partyId="FrenchCustomer" geoPointId="9002" fromDate="2009-01-09 00:00:00.000"/>
+    
+    <ContactMech contactMechId="FRENCHCUSTOMER" contactMechTypeId="POSTAL_ADDRESS"/>
+    <PostalAddress contactMechId="FRENCHCUSTOMER" toName="French Customer" address1="400 E Chemin de la Mouline" city="Poussan" postalCode="34560" countryGeoId="FRA" geoPointId="9002"/>
+    <PartyContactMech partyId="FrenchCustomer" contactMechId="FRENCHCUSTOMER" fromDate="2009-01-09 00:00:00.000" allowSolicitation="Y"/>
+    <PartyContactMechPurpose partyId="FrenchCustomer" contactMechId="FRENCHCUSTOMER" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2009-01-09 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="FrenchCustomer" contactMechId="FRENCHCUSTOMER" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2009-01-09 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="FrenchCustomer" contactMechId="FRENCHCUSTOMER" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2009-01-09 00:00:00.000"/>
+    <PartyContactMech partyId="FrenchCustomer" contactMechId="FRENCHCUSTOMER" fromDate="2009-01-09 00:00:00.000" allowSolicitation="Y"/>
+    <PartyContactMechPurpose partyId="FrenchCustomer" contactMechId="FRENCHCUSTOMER" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2009-01-09 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="FrenchCustomer" contactMechId="FRENCHCUSTOMER" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2009-01-09 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="FrenchCustomer" contactMechId="FRENCHCUSTOMER" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2009-01-09 00:00:00.000"/>
+    <ContactMech contactMechId="FRA01" contactMechTypeId="EMAIL_ADDRESS" infoString="[hidden email]"/>
+    <PartyContactMech partyId="FrenchCustomer" contactMechId="FRA01" fromDate="2009-01-09 00:00:00.000" allowSolicitation="Y"/>
+    <PartyContactMechPurpose partyId="FrenchCustomer" contactMechId="FRA01" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2009-01-09 00:00:00.000"/>
+    
+    <PaymentMethod paymentMethodId="FRENCHCUSTOMER" paymentMethodTypeId="CREDIT_CARD" partyId="FrenchCustomer" fromDate="2009-01-09 00:00:00.000"/>
+    <CreditCard paymentMethodId="FRENCHCUSTOMER" cardType="Visa" cardNumber="4111111111111111" expireDate="02/2020" companyNameOnCard=""
+        titleOnCard="" firstNameOnCard="FRENCH" middleNameOnCard="" lastNameOnCard="CUSTOMER" suffixOnCard="" contactMechId="FRENCHCUSTOMER"/>
 </entity-engine-xml>

Modified: ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml Wed Jan 28 11:03:20 2009
@@ -19,11 +19,12 @@
 -->
 
 <entity-engine-xml>
-    <Facility facilityId="WebStoreWarehouse" facilityTypeId="WAREHOUSE" facilityName="Web Store Warehouse" description="Warehouse exclusively for the Web Store " ownerPartyId="Company" defaultInventoryItemTypeId="NON_SERIAL_INV_ITEM" defaultWeightUomId="WT_lb" defaultDaysToShip="25"/>
+    <Facility facilityId="WebStoreWarehouse" facilityTypeId="WAREHOUSE" facilityName="Web Store Warehouse" description="Warehouse exclusively for the Web Store " ownerPartyId="Company" defaultInventoryItemTypeId="NON_SERIAL_INV_ITEM" defaultWeightUomId="WT_lb" defaultDaysToShip="25" geoPointId="9000"/>
+    
     <ContactMech contactMechId="9200" contactMechTypeId="POSTAL_ADDRESS"/>
     <ContactMech contactMechId="9201" contactMechTypeId="TELECOM_NUMBER"/>
     <ContactMech contactMechId="9202" contactMechTypeId="EMAIL_ADDRESS" infoString="[hidden email]"/>
-    <PostalAddress contactMechId="9200" toName="Company XYZ" attnName="ZJAA" address1="2003 Open Blvd" city="Orem" postalCode="84058" countryGeoId="USA" stateProvinceGeoId="UT"/>
+    <PostalAddress contactMechId="9200" toName="Company XYZ" attnName="ZJAA" address1="2003 Open Blvd" city="Orem" postalCode="84058" countryGeoId="USA" stateProvinceGeoId="UT" geoPointId="9000"/>
     <TelecomNumber contactMechId="9201" areaCode="801" contactNumber="555-5555"/>
     <FacilityContactMech facilityId="WebStoreWarehouse" contactMechId="9200" fromDate="2001-05-13 12:00:00.0"/>
     <FacilityContactMech facilityId="WebStoreWarehouse" contactMechId="9201" fromDate="2001-05-13 12:00:00.0"/>
@@ -41,7 +42,11 @@
     <FacilityLocation facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL03" locationTypeEnumId="FLT_BULK" areaId="TL" aisleId="TL" sectionId="TL" levelId="UL" positionId="03"/>
     <FacilityLocation facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL04" locationTypeEnumId="FLT_PICKLOC" areaId="TL" aisleId="TL" sectionId="TL" levelId="LL" positionId="04"/>
     <FacilityLocation facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL04" locationTypeEnumId="FLT_BULK" areaId="TL" aisleId="TL" sectionId="TL" levelId="UL" positionId="04"/>
-
+    <FacilityLocationGeoPoint facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL01" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>        
+    <FacilityLocationGeoPoint facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL02" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>        
+    <FacilityLocationGeoPoint facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL03" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>        
+    <FacilityLocationGeoPoint facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL04" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>        
+    
     <ProductStore productStoreId="9000" storeName="OFBiz E-Commerce Store" companyName="Open For Business" title="Open For Commerce"
         subtitle="Part of the Open For Business Family of Open Source Software" payToPartyId="Company" daysToCancelNonPay="30" prorateShipping="Y" prorateTaxes="Y"
         inventoryFacilityId="WebStoreWarehouse" oneInventoryFacility="Y" checkInventory="Y" reserveInventory="Y" balanceResOnOrderCreation="Y" reserveOrderEnumId="INVRO_FIFO_REC" requireInventory="N"
@@ -758,4 +763,5 @@
     <ProductFeatureAppl productId="GC-001-H50" productFeatureId="2004" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2003-11-20 13:52:45.336" sequenceNum="3"/>
     <ProductFeatureAppl productId="GC-001-HO" productFeatureId="2001" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2003-11-21 10:27:33.716" sequenceNum="2"/>
     <ProductFeatureAppl productId="GC-001-HO" productFeatureId="2006" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2003-11-21 10:27:33.633"/>
+
 </entity-engine-xml>

Modified: ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml (original)
+++ ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml Wed Jan 28 11:03:20 2009
@@ -31,13 +31,19 @@
     <TechDataCalendarExcDay calendarId="DEMO_CALENDAR" exceptionDateStartTime="2004-12-24 00:01:00.0" exceptionCapacity="0" description="Christmas Day"/>
     
     <FixedAsset fixedAssetId="DEMO_MACHINE_GROUP" fixedAssetTypeId="GROUP_EQUIPMENT" fixedAssetName="Demo Machine Group"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_MACHINE_GROUP" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     <FixedAsset fixedAssetId="DEMO_MACHINE" fixedAssetName="Demo Machine" fixedAssetTypeId="PRODUCTION_EQUIPMENT" parentFixedAssetId="DEMO_MACHINE_GROUP" calendarId="DEMO_CALENDAR"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_MACHINE" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     
     <FixedAsset fixedAssetId="DEMO_FOOD_GROUP" fixedAssetTypeId="GROUP_EQUIPMENT" fixedAssetName="Demo Food Group"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_FOOD_GROUP" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     <FixedAsset fixedAssetId="DEMO_FOOD" fixedAssetName="Demo Food" fixedAssetTypeId="PRODUCTION_EQUIPMENT" parentFixedAssetId="DEMO_FOOD_GROUP" calendarId="DEMO_CALENDAR"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_FOOD" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     
     <FixedAsset fixedAssetId="DEMO_PROD_EQUIPMT_1" fixedAssetName="Demo Production Equipment One" fixedAssetTypeId="PRODUCTION_EQUIPMENT" dateAcquired="2005-01-01 00:01:00.0" expectedEndOfLife="2010-1-1" calendarId="DEMO_CALENDAR" salvageValue="50" purchaseCost="1000"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_PROD_EQUIPMT_1" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     <FixedAsset fixedAssetId="DEMO_PROD_EQUIPMT_2" fixedAssetName="Demo Production Equipment Two" fixedAssetTypeId="PRODUCTION_EQUIPMENT" dateAcquired="2005-01-01 00:01:00.0" expectedEndOfLife="2010-1-1" calendarId="DEMO_CALENDAR" salvageValue="50" purchaseCost="1000"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_PROD_EQUIPMT_2" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     
     <FixedAssetDepMethod depreciationCustomMethodId="STR_LINE_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_1"/>
     <FixedAssetDepMethod depreciationCustomMethodId="DBL_DECL_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_2"/>

Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original)
+++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Wed Jan 28 11:03:20 2009
@@ -1743,6 +1743,10 @@
         <value xml:lang="nl">Vervoerder relatie wijzigen</value>
         <value xml:lang="th">แก้ไขกลุ่มผู้ใช้ในบัญชีผู้ส่ง</value>
     </property>
+    <property key="PageTitlePartyGeoLocation">
+        <value xml:lang="en">Party GeoLocation</value>
+        <value xml:lang="fr">Géolocalisation de l'acteur</value>
+    </property>
     <property key="PageTitlePartyInvitation">
         <value xml:lang="de">Akteur Einladung</value>
         <value xml:lang="en">Party Invitation</value>

Modified: ofbiz/trunk/applications/party/data/PartyGeoPointData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/data/PartyGeoPointData.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/data/PartyGeoPointData.xml (original)
+++ ofbiz/trunk/applications/party/data/PartyGeoPointData.xml Wed Jan 28 11:03:20 2009
@@ -19,7 +19,7 @@
 -->
 
 <entity-engine-xml>    
-    <GeoPoint comment="GeoPoint for DemoCustomer"
+    <GeoPoint comment="GeoPoint for DemoCustomer and other demonstrations (in Orem, Utah, USA)"
         geoPointId="9000"
         dataSourceId="GEOPT_GOOGLE"
         latitude="40.297264"
@@ -27,5 +27,23 @@
         elevation="4756"
         elevationUomId="LEN_ft"
         information="A testing GeoPoint for contactMechId=9015 (DemoCustomer)"
+    />        
+    <GeoPoint comment="GeoPoint for EuroCustomer (in Amsterdam,  Netherlands)"
+        geoPointId="9001"
+        dataSourceId="GEOPT_GOOGLE"
+        latitude="52.350"
+        longitude="4.917"
+        elevation="-4"
+        elevationUomId="LEN_m"
+        information="A testing GeoPoint for contactMechId=EUROCUSTOMER (EuroCustomer)"
+    />    
+    <GeoPoint comment="GeoPoint for FrenchCustomer (at Chemin de la Mouline, Poussan, France)"
+        geoPointId="9002"
+        dataSourceId="GEOPT_GOOGLE"
+        latitude="43.491661995004264"
+        longitude="3.6840248107910156"
+        elevation="40"
+        elevationUomId="LEN_m"
+        information="A testing GeoPoint for contactMechId=FRENCHCUSTOMER (FrenchCustomer)"
     />    
-</entity-engine-xml>
+</entity-engine-xml>
\ No newline at end of file

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java Wed Jan 28 11:03:20 2009
@@ -125,20 +125,6 @@
         }
     }
 
-    public static GenericValue findPartyLatestGeoPoint(String partyId, GenericDelegator delegator) {
-        try {
-            List<GenericValue> gptList = delegator.findByAnd("PartyAndGeoPoint", UtilMisc.toMap("partyId", partyId), UtilMisc.toList("-fromDate"));
-            if (UtilValidate.isNotEmpty(gptList)) {
-                gptList = EntityUtil.filterByDate(gptList);
-                return EntityUtil.getFirst(gptList);
-            }
-            return null;
-        } catch (GenericEntityException e) {
-            Debug.logError(e, "Error while finding latest GeoPoint for party with ID [" + partyId + "] " + e.toString(), module);
-            return null;
-        }
-    }
-
     public static GenericValue findPartyLatestPostalAddress(String partyId, GenericDelegator delegator) {
         GenericValue pcm = findPartyLatestContactMech(partyId, "POSTAL_ADDRESS", delegator);
         if (pcm != null) {

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy Wed Jan 28 11:03:20 2009
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-import org.ofbiz.party.party.PartyWorker;
+import org.ofbiz.common.geo.GeoWorker;
 
 partyId = parameters.partyId ?: parameters.party_id;
 userLoginId = parameters.userlogin_id ?: parameters.userLoginId;
@@ -30,7 +30,7 @@
 }
 context.partyId = partyId;
 
-latestGeoPoint = PartyWorker.findPartyLatestGeoPoint(partyId, delegator);
+latestGeoPoint = GeoWorker.findLatestGeoPoint(delegator, "PartyAndGeoPoint", "partyId", partyId, null, null);
 context.latestGeoPoint = latestGeoPoint;
 
 if (latestGeoPoint) {

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl Wed Jan 28 11:03:20 2009
@@ -81,7 +81,7 @@
                     <#if addr1?has_content && (addr1.indexOf(" ") > 0)>
                       <#assign addressNum = addr1.substring(0, addr1.indexOf(" "))>
                       <#assign addressOther = addr1.substring(addr1.indexOf(" ")+1)>
-                      <a target="_blank" href="http://www.whitepages.com/find_person_results.pl?fid=a&s_n=${addressNum}&s_a=${addressOther}&c=${postalAddress.city?if_exists}&s=${postalAddress.stateProvinceGeoId?if_exists}&x=29&y=18">(lookup:whitepages.com)</a>
+                      <a target="_blank" href="http://www.whitepages.com/find_person_results.pl?fid=a&s_n=${addressNum}&s_a=${addressOther}&c=${postalAddress.city?if_exists}&s=${postalAddress.stateProvinceGeoId?if_exists}&x=29&y=18" class="buttontext">lookup:whitepages.com</a>
                     </#if>
                   </#if>
                   <#if postalAddress.geoPointId?has_content>
@@ -95,21 +95,21 @@
                     <#if telecomNumber.areaCode?has_content>${telecomNumber.areaCode?default("000")}-</#if>${telecomNumber.contactNumber?default("000-0000")}
                     <#if partyContactMech.extension?has_content>${uiLabelMap.PartyContactExt}&nbsp;${partyContactMech.extension}</#if>
                     <#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">(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">(lookup:whitepages.com)</a>
+                      <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="buttontext">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="buttontext">lookup:whitepages.com</a>
                     </#if>
                   </div>
                 <#elseif "EMAIL_ADDRESS" = contactMech.contactMechTypeId>
                   <div>
                     ${contactMech.infoString?if_exists}
-                    <a href="<@ofbizUrl>EditCommunicationEvent?partyIdFrom=${userLogin.partyId}&partyIdTo=${party.partyId}&communicationEventTypeId=EMAIL_COMMUNICATION&contactMechIdTo=${contactMech.contactMechId}&contactMechTypeId=EMAIL_ADDRESS<#if thisUserPrimaryEmail?has_content>&contactMechIdFrom=${thisUserPrimaryEmail.contactMechId}</#if></@ofbizUrl>">(${uiLabelMap.CommonSendEmail})</a>
+                    <a href="<@ofbizUrl>EditCommunicationEvent?partyIdFrom=${userLogin.partyId}&partyIdTo=${party.partyId}&communicationEventTypeId=EMAIL_COMMUNICATION&contactMechIdTo=${contactMech.contactMechId}&contactMechTypeId=EMAIL_ADDRESS<#if thisUserPrimaryEmail?has_content>&contactMechIdFrom=${thisUserPrimaryEmail.contactMechId}</#if></@ofbizUrl>" class="buttontext">${uiLabelMap.CommonSendEmail}</a>
                   </div>
                 <#elseif "WEB_ADDRESS" = contactMech.contactMechTypeId>
                   <div>
                     ${contactMech.infoString?if_exists}
                     <#assign openAddress = contactMech.infoString?default("")>
                     <#if !openAddress?starts_with("http") && !openAddress?starts_with("HTTP")><#assign openAddress = "http://" + openAddress></#if>
-                    <a target="_blank" href="${openAddress}">(${uiLabelMap.CommonOpenPageNewWindow})</a>
+                    <a target="_blank" href="${openAddress}" class="buttontext">${uiLabelMap.CommonOpenPageNewWindow}</a>
                   </div>
                 <#else>
                   <div>${contactMech.infoString?if_exists}</div>

Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Wed Jan 28 11:03:20 2009
@@ -1166,8 +1166,7 @@
     <screen name="PartyGeoLocation">
         <section>
             <actions>
-                <set field="titleProperty" value="PageTitleViewPartyGeoLocation"/>
-                <set field="partyId"  from-field="parameters.partyId"/>
+                <set field="titleProperty" value="PageTitlePartyGeoLocation"/>                
                 <script location="component://party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy"/>
             </actions>
             <widgets>

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Wed Jan 28 11:03:20 2009
@@ -5009,6 +5009,10 @@
         <value xml:lang="it">Aggiorna Fornitore Prodotto</value>
         <value xml:lang="th">แก้ไขผู้จำหน่ายสินค้า</value>
     </property>
+    <property key="PageTitleFacilityLocationGeoLocation">
+        <value xml:lang="en">Facility Location GeoLocation</value>
+        <value xml:lang="fr">Géolocalisation de l'emplacement de stokage</value>
+    </property>
     <property key="PageTitleFindConfigItems">
         <value xml:lang="de">Konfigurationsposition suchen</value>
         <value xml:lang="en">Find Config Items</value>

Added: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FacilityLocationGeoLocation.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FacilityLocationGeoLocation.groovy?rev=738452&view=auto
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FacilityLocationGeoLocation.groovy (added)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FacilityLocationGeoLocation.groovy Wed Jan 28 11:03:20 2009
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import org.ofbiz.common.geo.GeoWorker;
+
+facilityId = parameters.facilityId
+locationSeqId = parameters.locationSeqId
+
+if (facilityId && locationSeqId) {
+    latestGeoPoint = GeoWorker.findLatestGeoPoint(delegator, "FacilityLocationAndGeoPoint", "facilityId", facilityId, "locationSeqId", locationSeqId)
+    context.latestGeoPoint = latestGeoPoint
+    context.facilityId = facilityId
+    context.locationSeqId = locationSeqId
+
+    if (latestGeoPoint) {
+        elevationUom = delegator.findOne("Uom", [uomId : latestGeoPoint.elevationUomId], false)
+        context.elevationUomAbbr = elevationUom.abbreviation
+    }
+}

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Wed Jan 28 11:03:20 2009
@@ -1107,6 +1107,14 @@
         <response name="success" type="view" value="InventoryItemTotalsExport"/>
     </request-map>
 
+    <!-- GeoLocation-->
+    <request-map uri="FacilityLocationGeoLocation">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="FacilityLocationGeoLocation"/>
+        <response name="error" type="view" value="EditFacility"/>
+    </request-map>
+    
+
     <!-- ================ Lookup Requests ================= -->
     <request-map uri="LookupOrderHeaderAndShipInfo"><security https="true" auth="true"/><response name="success" type="view" value="LookupOrderHeaderAndShipInfo"/></request-map>
     <request-map uri="LookupPurchaseOrderHeaderAndShipInfo"><security https="true" auth="true"/><response name="success" type="view" value="LookupPurchaseOrderHeaderAndShipInfo"/></request-map>
@@ -1194,6 +1202,8 @@
     <view-map name="InventoryItemGrandTotals" type="screen" page="component://product/widget/facility/FacilityScreens.xml#InventoryItemGrandTotals"/>
     <view-map name="InventoryItemTotalsExport" type="screentext" page="component://product/widget/facility/FacilityScreens.xml#InventoryItemTotalsExport" content-type="text/csv" encoding="none"/>
 
+    <view-map name="FacilityLocationGeoLocation" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FacilityLocationGeoLocation"/>
+    
     <view-map name="LookupOrderHeaderAndShipInfo" type="screen" page="component://order/widget/ordermgr/LookupScreens.xml#LookupOrderHeaderAndShipInfo"/>
     <view-map name="LookupPurchaseOrderHeaderAndShipInfo" type="screen" page="component://order/widget/ordermgr/LookupScreens.xml#LookupPurchaseOrderHeaderAndShipInfo"/>
     <view-map name="LookupOrderHeader" type="screen" page="component://order/widget/ordermgr/LookupScreens.xml#LookupOrderHeader"/>

Modified: ofbiz/trunk/applications/product/webapp/facility/facility/EditFacilityLocation.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/EditFacilityLocation.ftl?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/EditFacilityLocation.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/EditFacilityLocation.ftl Wed Jan 28 11:03:20 2009
@@ -22,6 +22,10 @@
     <a href="<@ofbizUrl>EditFacility</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductNewFacility}</a>
     <a href="<@ofbizUrl>EditFacilityLocation?facilityId=${facilityId?if_exists}</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductNewFacilityLocation}</a>
     <a href="<@ofbizUrl>EditInventoryItem?facilityId=${facilityId}&locationSeqId=${locationSeqId}</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductNewInventoryItem}</a>
+    <#assign latestGeoPoint= Static["org.ofbiz.common.geo.GeoWorker"].findLatestGeoPoint(delegator, "FacilityLocationAndGeoPoint", "facilityId", facilityId, "locationSeqId", locationSeqId)?if_exists/>
+    <#if latestGeoPoint?has_content>    
+      <a href="<@ofbizUrl>FacilityLocationGeoLocation?facilityId=${facilityId}&locationSeqId=${locationSeqId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonGeoLocation}</a>
+    </#if>
   </div>
 </#if>
 

Added: ofbiz/trunk/applications/product/webapp/facility/facility/FacilityLocationGeoLocation.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityLocationGeoLocation.ftl?rev=738452&view=auto
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/FacilityLocationGeoLocation.ftl (added)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/FacilityLocationGeoLocation.ftl Wed Jan 28 11:03:20 2009
@@ -0,0 +1,50 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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 latestGeoPoint?has_content>
+  <#if latestGeoPoint.latitude?has_content && latestGeoPoint.longitude?has_content>
+    ${uiLabelMap.CommonLatitude}${latestGeoPoint.latitude}<br>
+    ${uiLabelMap.CommonLongitude}${latestGeoPoint.longitude}
+    <#if latestGeoPoint.elevation?has_content>
+      <br>${uiLabelMap.CommonElevation}${latestGeoPoint.elevation} ${elevationUomAbbr}
+    </#if>  
+    <#if latestGeoPoint.dataSourceId?has_content>        
+      <#if latestGeoPoint.dataSourceId == "GEOPT_GOOGLE">
+        <div id="map" style="border:1px solid #979797; background-color:#e5e3df; width:400px; height:300px; margin:2em auto;">
+          <div style="padding:1em; color:gray;">${uiLabelMap.CommonLoading}</div>
+        </div>
+        <#assign defaultUrl = "https." + request.getServerName()>
+        <#assign defaultGogleMapKey = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", defaultUrl)>
+        <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=${defaultGogleMapKey}"
+            type="text/javascript">
+        </script>
+        <script type="text/javascript">
+          loadGoogleMap("${latestGeoPoint.latitude}",
+                        "${latestGeoPoint.longitude}",                        
+                        "<@ofbizUrl>EditFacilityLocation?facilityId=${facilityId}&locationSeqId=${locationSeqId}</@ofbizUrl>",
+                        "${uiLabelMap.ProductFacilityLocation} ${uiLabelMap.CommonOf} ${facilityId}/${locationSeqId}")
+        </script>          
+      <#elseif  latestGeoPoint.dataSourceId == "GEOPT_YAHOO">            
+      <#elseif  latestGeoPoint.dataSourceId == "GEOPT_MICROSOFT">      
+      <#elseif  latestGeoPoint.dataSourceId == "GEOPT_MAPTP">      
+      </#if>  
+    </#if>  
+  </#if>
+<#else>
+  <h2>${uiLabelMap.CommonNoGeolocationAvailable}</h2>      
+</#if>

Modified: ofbiz/trunk/applications/product/webapp/facility/facility/ViewContactMechs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/ViewContactMechs.ftl?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/ViewContactMechs.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/ViewContactMechs.ftl Wed Jan 28 11:03:20 2009
@@ -69,6 +69,10 @@
                         <br/><a target='_blank' href='http://www.whitepages.com/find_person_results.pl?fid=a&s_n=${addressNum}&s_a=${addressOther}&c=${postalAddress.city?if_exists}&s=${postalAddress.stateProvinceGeoId?if_exists}&x=29&y=18' class='buttontext'>lookup:whitepages.com</a>
                       </#if>
                   </#if>
+                  <#if postalAddress.geoPointId?has_content>
+                    <#assign popUptitle = contactMechPurposeType.get("description",locale) + uiLabelMap.CommonGeoLocation>
+                    <br/><a href="javascript:popUp('<@ofbizUrl>geoLocation?geoPointId=${postalAddress.geoPointId}</@ofbizUrl>', '${popUptitle}', '450', '550')" class="buttontext">${uiLabelMap.CommonGeoLocation}</a>
+                  </#if>                  
               <#elseif "TELECOM_NUMBER" = contactMech.contactMechTypeId>
                   <#assign telecomNumber = contactMechMap.telecomNumber>
                     ${telecomNumber.countryCode?if_exists}

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Wed Jan 28 11:03:20 2009
@@ -1378,4 +1378,22 @@
         </section>
     </screen>    
 
+    <screen name="FacilityLocationGeoLocation">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleFacilityLocationGeoLocation"/>
+                <script location="component://product/webapp/facility/WEB-INF/actions/facility/FacilityLocationGeoLocation.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://product/webapp/facility/facility/FacilityLocationGeoLocation.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>    
+    
 </screens>
\ No newline at end of file

Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/config/CommonUiLabels.xml (original)
+++ ofbiz/trunk/framework/common/config/CommonUiLabels.xml Wed Jan 28 11:03:20 2009
@@ -8186,6 +8186,10 @@
         <value xml:lang="zh">编辑数据源类型</value>
         <value xml:lang="zh_CN">编辑数据源类型</value>
     </property>
+    <property key="PageTitleCommonGeoLocation">
+        <value xml:lang="en">GeoLocation of requested element</value>
+        <value xml:lang="fr">Géolocalisation de l'élément demandé</value>
+    </property>
     <property key="PageTitleListDataSource">
         <value xml:lang="ar">قائمة مصادر المعلومات</value>
         <value xml:lang="de">Liste der Datenquellen</value>

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/geo/GeoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/geo/GeoWorker.java?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/geo/GeoWorker.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/geo/GeoWorker.java Wed Jan 28 11:03:20 2009
@@ -30,6 +30,7 @@
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.util.EntityUtil;
 
 /**
  * Worker methods for Geos
@@ -119,4 +120,26 @@
         //Debug.log("Contains Geo : " + geoList.contains(geo));
         return geoList.contains(geo);
     }
+    
+    public static GenericValue findLatestGeoPoint(GenericDelegator delegator, String Entity, String mainId, String mainValueId, String secondId, String secondValueId) {
+        List<GenericValue> gptList = null;
+        if (UtilValidate.isNotEmpty(secondId) && UtilValidate.isNotEmpty(secondValueId)) {
+            try {
+                gptList = delegator.findByAnd(Entity, UtilMisc.toMap(mainId, mainValueId, secondId, secondValueId), UtilMisc.toList("-fromDate"));
+            } catch (GenericEntityException e) {
+                Debug.logError(e, "Error while finding latest GeoPoint for " + mainId + " with Id [" + mainValueId + "] and " + secondId + " Id [" + secondValueId + "] " + e.toString(), module);
+            }
+        } else {
+            try {
+                gptList = delegator.findByAnd(Entity, UtilMisc.toMap(mainId, mainValueId), UtilMisc.toList("-fromDate"));
+            } catch (GenericEntityException e) {
+                Debug.logError(e, "Error while finding latest GeoPoint for " + mainId + " with Id [" + mainValueId + "] " + e.toString(), module);
+            }
+        }
+        if (UtilValidate.isNotEmpty(gptList)) {
+            gptList = EntityUtil.filterByDate(gptList);
+            return EntityUtil.getFirst(gptList);
+        }
+        return null;
+    }    
 }

Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Wed Jan 28 11:03:20 2009
@@ -476,7 +476,7 @@
     <screen name="geoLocation">
         <section>
             <actions>
-                <set field="titleProperty" value="CommonGeoLocation"/>
+                <set field="titleProperty" value="PageTitleCommonGeoLocation"/>
                 <entity-one entity-name="GeoPoint" value-field="geoPoint">
                     <field-map field-name="geoPointId" from-field="parameters.geoPointId"/>
                 </entity-one>

Modified: ofbiz/trunk/specialpurpose/assetmaint/data/AssetMaintDemoData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/data/AssetMaintDemoData.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/data/AssetMaintDemoData.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/data/AssetMaintDemoData.xml Wed Jan 28 11:03:20 2009
@@ -32,11 +32,17 @@
     <ProductMaintType description="Replace Air Filter" productMaintTypeId="HVAC_REPLACE_FILTER" parentTypeId="HVAC_MAINT"/>
     <ProductMaintType description="Check/Recharge Refrigerant" productMaintTypeId="HVAC_CHECK_REFR" parentTypeId="HVAC_MAINT"/>
     <FixedAsset fixedAssetId="DEMO_FORKLIFT_01" instanceOfProductId="FORKLIFT_PROPANE" fixedAssetName="Forklift #1" fixedAssetTypeId="EQUIPMENT"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_FORKLIFT_01" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     <FixedAsset fixedAssetId="DEMO_FORKLIFT_02" instanceOfProductId="FORKLIFT_BATTERY" fixedAssetName="Forklift #2" fixedAssetTypeId="EQUIPMENT"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_FORKLIFT_02" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     <FixedAsset fixedAssetId="DEMO_VEHICLE_01" instanceOfProductId="COMPANY_VEHICLE" fixedAssetName="Company Pickup Truck" fixedAssetTypeId="EQUIPMENT"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_VEHICLE_01" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     <FixedAsset fixedAssetId="DEMO_VEHICLE_02" instanceOfProductId="COMPANY_VEHICLE" fixedAssetName="Company Delivery Van" fixedAssetTypeId="EQUIPMENT"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_VEHICLE_02" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     <FixedAsset fixedAssetId="DEMO_HVAC_01" instanceOfProductId="HVAC_UNIT" fixedAssetName="HVAC Unit - First Floor" fixedAssetTypeId="EQUIPMENT"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_HVAC_01" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     <FixedAsset fixedAssetId="DEMO_HVAC_02" instanceOfProductId="HVAC_UNIT" fixedAssetName="HVAC Unit - Second Floor" fixedAssetTypeId="EQUIPMENT"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_HVAC_02" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     <ProductMeterType description="Odometer" productMeterTypeId="ODOMETER"/>
     <ProductMaint productId="FORKLIFT_PROPANE" productMaintSeqId="seq01" productMaintTypeId="TUNE_UP" maintName="Tune Up" intervalQuantity="1000" intervalMeterTypeId="ODOMETER"/>
     <ProductMaint productId="FORKLIFT_BATTERY" productMaintSeqId="seq01" productMaintTypeId="CHECK_BATTERY" maintName="Check Battery" intervalQuantity="1000" intervalMeterTypeId="ODOMETER"/>

Modified: ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrDemoData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrDemoData.xml?rev=738452&r1=738451&r2=738452&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrDemoData.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrDemoData.xml Wed Jan 28 11:03:20 2009
@@ -152,6 +152,7 @@
     <TemporalExpressionAssoc fromTempExprId="STAFF_MTG" toTempExprId="1ST_MONDAY_IN_MONTH"/>
     <TemporalExpressionAssoc fromTempExprId="STAFF_MTG" toTempExprId="10AM"/>
     <FixedAsset fixedAssetId="DEMO_PROJECTOR" fixedAssetName="Overhead Projector" fixedAssetTypeId="EQUIPMENT"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_PROJECTOR" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>    
     <WorkEffort workEffortId="STAFF_MTG" workEffortTypeId="MEETING" currentStatusId="CAL_TENTATIVE" lastStatusUpdate="2008-01-01 00:00:00.0" scopeEnumId="WES_PUBLIC" workEffortName="Staff Meeting" description="Staff Meeting" tempExprId="STAFF_MTG" estimatedStartDate="2008-01-01 00:00:00.0" estimatedMilliSeconds="3600000"/>
     <WorkEffortFixedAssetAssign workEffortId="STAFF_MTG" fixedAssetId="DEMO_PROJECTOR" statusId="FA_ASGN_REQUESTED" availabilityStatusId="WEFA_IN_USE" fromDate="2008-01-01 00:00:00.0"/>
     <WorkEffortPartyAssignment workEffortId="STAFF_MTG" partyId="DemoEmployee1" statusId="PRTYASGN_ASSIGNED" roleTypeId="CAL_OWNER" availabilityStatusId="WEPA_AV_BUSY" fromDate="2008-01-01 00:00:00.0"/>