svn commit: r429697 - in /incubator/ofbiz/trunk/applications: accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java party/entitydef/entitymodel.xml

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

svn commit: r429697 - in /incubator/ofbiz/trunk/applications: accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java party/entitydef/entitymodel.xml

jonesde
Author: jonesde
Date: Tue Aug  8 08:49:13 2006
New Revision: 429697

URL: http://svn.apache.org/viewvc?rev=429697&view=rev
Log:
Added countyGeoId to PostalAddress, and changed the TaxAuthority rate calc code to use it if populated to support county level taxes; note that this commit does not include UI or background service to populate the countyGeoId

Modified:
    incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
    incubator/ofbiz/trunk/applications/party/entitydef/entitymodel.xml

Modified: incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java?rev=429697&r1=429696&r2=429697&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java (original)
+++ incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java Tue Aug  8 08:49:13 2006
@@ -200,6 +200,9 @@
             if (shippingAddress.getString("stateProvinceGeoId") != null) {
                 geoIdSet.add(shippingAddress.getString("stateProvinceGeoId"));
             }
+            if (shippingAddress.getString("countyGeoId") != null) {
+                geoIdSet.add(shippingAddress.getString("countyGeoId"));
+            }
         }
         // get the most granular, or all available, geoIds and then find parents by GeoAssoc with geoAssocTypeId="REGIONS" and geoIdTo=<granular geoId> and find the GeoAssoc.geoId
         geoIdSet = GeoWorker.expandGeoRegionDeep(geoIdSet, delegator);

Modified: incubator/ofbiz/trunk/applications/party/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?rev=429697&r1=429696&r2=429697&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/party/entitydef/entitymodel.xml (original)
+++ incubator/ofbiz/trunk/applications/party/entitydef/entitymodel.xml Tue Aug  8 08:49:13 2006
@@ -880,6 +880,7 @@
       <field name="postalCodeExt" type="short-varchar"></field>
       <field name="countryGeoId" type="id"></field>
       <field name="stateProvinceGeoId" type="id"></field>
+      <field name="countyGeoId" type="id"></field>
       <field name="postalCodeGeoId" type="id"></field>
       <prim-key field="contactMechId"/>
       <relation type="one" fk-name="POST_ADDR_CMECH" rel-entity-name="ContactMech">
@@ -893,6 +894,9 @@
       </relation>
       <relation type="one" fk-name="POST_ADDR_SPGEO" title="StateProvince" rel-entity-name="Geo">
         <key-map field-name="stateProvinceGeoId" rel-field-name="geoId"/>
+      </relation>
+      <relation type="one" fk-name="POST_ADDR_CNTG" title="County" rel-entity-name="Geo">
+        <key-map field-name="countyGeoId" rel-field-name="geoId"/>
       </relation>
       <relation type="one" fk-name="POST_ADDR_PCGEO" title="PostalCode" rel-entity-name="Geo">
         <key-map field-name="postalCodeGeoId" rel-field-name="geoId"/>