You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Si Chen (JIRA)" <ji...@apache.org> on 2008/05/28 02:53:45 UTC

[jira] Created: (OFBIZ-1806) automatically set countyGeoId from postalCode and countryGeoId?

automatically set countyGeoId from postalCode and countryGeoId?
---------------------------------------------------------------

                 Key: OFBIZ-1806
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1806
             Project: OFBiz
          Issue Type: Bug
            Reporter: Si Chen


Is there anything which automatically sets countyGeoId from postal code + countryGeoId?  If not, how does one calculate county level taxes?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1806) automatically set countyGeoId from postalCode and countryGeoId?

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Si Chen updated OFBIZ-1806:
---------------------------

    Attachment: orderview.PNG

screenshot of order in ZIP code 84057 but no Utah county sales tax was assessed

> automatically set countyGeoId from postalCode and countryGeoId?
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-1806
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1806
>             Project: OFBiz
>          Issue Type: Bug
>            Reporter: Si Chen
>         Attachments: orderview.PNG
>
>
> Is there anything which automatically sets countyGeoId from postal code + countryGeoId?  If not, how does one calculate county level taxes?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1806) automatically set countyGeoId from postalCode and countryGeoId?

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600395#action_12600395 ] 

David E. Jones commented on OFBIZ-1806:
---------------------------------------

Would this question be better asked on the user mailing list?

Whatever the case, there is support for this already implemented with the TaxAuthority and Geo rollup (through GeoAssoc). There is even some demo data for a few zip codes in Utah (only because I happen to know a few here). Anyway, this stuff is years old and fairly stable with a few options for figuring out the County, etc based on the zip code and state, or any other rollup just depending on how you setup your Geo rollup and TaxAuthority records.

> automatically set countyGeoId from postalCode and countryGeoId?
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-1806
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1806
>             Project: OFBiz
>          Issue Type: Bug
>            Reporter: Si Chen
>
> Is there anything which automatically sets countyGeoId from postal code + countryGeoId?  If not, how does one calculate county level taxes?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1806) automatically set countyGeoId from postalCode and countryGeoId?

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600856#action_12600856 ] 

Si Chen commented on OFBIZ-1806:
--------------------------------

I'm sorry David, but this does not work for me.  I could not access the trunk demo at http://demo.hotwaxmedia.com/ecommerce/control/main but I was able to use your release 4.0 demo, and since this code is really not changed, I think it should be more or less the same.  I loaded the additional setup for ZIP code 84057 and for the Utah county sales tax in Web tools, and then I created an order for a new customer in the 84057 zip code.  However, as you can see from the screenshot, no Utah county sales tax was charged.  You can also look at this order here:
https://demo40.hotwaxmedia.com/ordermgr/control/orderview?orderId=WS10000

Does anybody get a Utah county sales tax added to orders for DemoCustomer?  

Also, looking at the code, TaxAuthorityServices.java seems to be calling:
        geoIdSet = GeoWorker.expandGeoRegionDeep(geoIdSet, delegator);

 which in turn:
 Set geoIdSetTemp = FastSet.newInstance();
        Iterator geoIdIter = geoIdSet.iterator();
        while (geoIdIter.hasNext()) {
            String curGeoId = (String) geoIdIter.next();
            List geoAssocList = delegator.findByAndCache("GeoAssoc", UtilMisc.toMap("geoIdTo", curGeoId, "geoAssocTypeId", "REGIONS"));
            Iterator geoAssocIter = geoAssocList.iterator();
            while (geoAssocIter.hasNext()) {
                GenericValue geoAssoc = (GenericValue) geoAssocIter.next();
                geoIdSetTemp.add(geoAssoc.get("geoId"));
            }
        }
        geoIdSetTemp = expandGeoRegionDeep(geoIdSetTemp, delegator);

I can see that it is traversing down GeoAssoc recursively, but I don't see anything that looks for the ST_ZIPCO format here or anywhere else.  If you could just enlighten me as to where this code might be, I'd be happy to go root around for it.

> automatically set countyGeoId from postalCode and countryGeoId?
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-1806
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1806
>             Project: OFBiz
>          Issue Type: Bug
>            Reporter: Si Chen
>         Attachments: orderview.PNG
>
>
> Is there anything which automatically sets countyGeoId from postal code + countryGeoId?  If not, how does one calculate county level taxes?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1806) automatically set countyGeoId from postalCode and countryGeoId?

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600418#action_12600418 ] 

Jacques Le Roux commented on OFBIZ-1806:
----------------------------------------

Then whould we not close ? :o)

> automatically set countyGeoId from postalCode and countryGeoId?
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-1806
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1806
>             Project: OFBiz
>          Issue Type: Bug
>            Reporter: Si Chen
>
> Is there anything which automatically sets countyGeoId from postal code + countryGeoId?  If not, how does one calculate county level taxes?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1806) automatically set countyGeoId from postalCode and countryGeoId?

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600568#action_12600568 ] 

David E. Jones commented on OFBIZ-1806:
---------------------------------------

You don't need to explicitly specify the county. As long as you have the zip code Geo setup with the ID in the ST_ZIPCO format it will find it, and then as long as you have the rollup between the zip code and the county defined it will find it when it expands the Geo records to include all parent records.

> automatically set countyGeoId from postalCode and countryGeoId?
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-1806
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1806
>             Project: OFBiz
>          Issue Type: Bug
>            Reporter: Si Chen
>
> Is there anything which automatically sets countyGeoId from postal code + countryGeoId?  If not, how does one calculate county level taxes?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1806) automatically set countyGeoId from postalCode and countryGeoId?

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600470#action_12600470 ] 

Si Chen commented on OFBIZ-1806:
--------------------------------

TaxAuthorityServices will consider countyGeoId in tax calculations, and there is the Geo rollup you describe.  However, I can find no code for populating countyGeoId from postal code or anything else, unless users are supposed to enter their county?

> automatically set countyGeoId from postalCode and countryGeoId?
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-1806
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1806
>             Project: OFBiz
>          Issue Type: Bug
>            Reporter: Si Chen
>
> Is there anything which automatically sets countyGeoId from postal code + countryGeoId?  If not, how does one calculate county level taxes?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1806) automatically set countyGeoId from postalCode and countryGeoId?

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600394#action_12600394 ] 

Chris Howe commented on OFBIZ-1806:
-----------------------------------

Postal code is an unreliable indicator of taxing jurisdiction, in general but specifically in the case of county taxes.  A postal code often times crosses county lines (zip+4 may offer increased reliability, but I don't believe that is even perfect).  The only certain way to determine county without prompting the customer would be to geocode the address and then compare that result within a geospatial database.  

This is perhaps overkill of a solution and would probably be better accommodated by assuming county if postal code is fully within a county and then returning to prompt the user if there are multiple county options.  Or even easier prompt the user if/when the state he chooses requires county specification to determine taxes.

> automatically set countyGeoId from postalCode and countryGeoId?
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-1806
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1806
>             Project: OFBiz
>          Issue Type: Bug
>            Reporter: Si Chen
>
> Is there anything which automatically sets countyGeoId from postal code + countryGeoId?  If not, how does one calculate county level taxes?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.