[OFBiz] SVN: r6110 - in trunk/applications: accounting/entitydef
ecommerce/data order/src/org/ofbiz/order/order
sichen at svn.ofbiz.org
sichen at svn.ofbiz.org
Fri Nov 11 16:54:13 EST 2005
Author: sichen
Date: 2005-11-11 15:54:01 -0600 (Fri, 11 Nov 2005)
New Revision: 6110
Modified:
trunk/applications/accounting/entitydef/entitymodel.xml
trunk/applications/ecommerce/data/DemoProduct.xml
trunk/applications/ecommerce/data/DemoRentalProduct.xml
trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
Log:
An extension of the old SimpleSalesTaxLookup model which allows tax authority and gl account information to be associated with SimpleSalesTaxLookup. This entity will eventually be phased with David's upcoming work on sales taxes, but in the meantime, it does help to allow returns to allow sales tax to be posted to the right GL accounts. OFBIZ-407
Modified: trunk/applications/accounting/entitydef/entitymodel.xml
===================================================================
--- trunk/applications/accounting/entitydef/entitymodel.xml 2005-11-11 20:16:55 UTC (rev 6109)
+++ trunk/applications/accounting/entitydef/entitymodel.xml 2005-11-11 21:54:01 UTC (rev 6110)
@@ -2379,6 +2379,8 @@
<field name="minPurchase" type="currency-amount"></field>
<field name="taxShipping" type="indicator"></field>
<field name="salesTaxPercentage" type="floating-point"></field>
+ <field name="taxAuthPartyId" type="id"></field>"
+ <field name="taxAuthGlAccountId" type="id"></field>"
<prim-key field="productStoreId"/>
<prim-key field="countryGeoId"/>
<prim-key field="stateProvinceGeoId"/>
Modified: trunk/applications/ecommerce/data/DemoProduct.xml
===================================================================
--- trunk/applications/ecommerce/data/DemoProduct.xml 2005-11-11 20:16:55 UTC (rev 6109)
+++ trunk/applications/ecommerce/data/DemoProduct.xml 2005-11-11 21:54:01 UTC (rev 6110)
@@ -68,14 +68,14 @@
<ProductStoreRole partyId="admin" roleTypeId="SALES_REP" productStoreId="9000" fromDate="2001-05-13 12:00:00.0"/>
<ProductStoreKeywordOvrd productStoreId="9000" keyword="gizmo" fromDate="2001-05-13 12:00:00.0" target="100" targetTypeEnumId="KOTT_PRODCAT"/>
- <SimpleSalesTaxLookup productStoreId="9000" countryGeoId="_NA_" stateProvinceGeoId="_NA_" taxCategory="_NA_" fromDate="2001-01-01 00:00:00.001" description="1% OFB Tax" minItemPrice="25.00" minPurchase="0.0" taxShipping="N" salesTaxPercentage="0.01"/>
+ <SimpleSalesTaxLookup productStoreId="9000" countryGeoId="_NA_" stateProvinceGeoId="_NA_" taxCategory="_NA_" fromDate="2001-01-01 00:00:00.001" description="1% OFB Tax" minItemPrice="25.00" minPurchase="0.0" taxShipping="N" salesTaxPercentage="0.01" taxAuthPartyId="OFBIZ_TAX" taxAuthGlAccountId="224000"/>
<!-- some interesting information at: http://www.taxadmin.org/fta/rate/tax_stru.html -->
<!-- note that these rates are for the given Geo only and do not include local taxes (county, city) -->
- <SimpleSalesTaxLookup productStoreId="9000" countryGeoId="USA" stateProvinceGeoId="CA" taxCategory="_NA_" fromDate="2001-01-01 00:00:00.001" description="California State Sales Tax" minItemPrice="0.0" minPurchase="0.0" taxShipping="N" salesTaxPercentage="0.0625"/>
- <SimpleSalesTaxLookup productStoreId="9000" countryGeoId="USA" stateProvinceGeoId="NY" taxCategory="_NA_" fromDate="2001-01-01 00:00:00.001" description="New York State Sales Tax" minItemPrice="0.0" minPurchase="0.0" taxShipping="N" salesTaxPercentage="0.0425"/>
- <SimpleSalesTaxLookup productStoreId="9000" countryGeoId="USA" stateProvinceGeoId="TX" taxCategory="_NA_" fromDate="2001-01-01 00:00:00.001" description="Texas State Sales Tax" minItemPrice="0.0" minPurchase="0.0" taxShipping="N" salesTaxPercentage="0.0625"/>
- <SimpleSalesTaxLookup productStoreId="9000" countryGeoId="USA" stateProvinceGeoId="UT" taxCategory="_NA_" fromDate="2001-01-01 00:00:00.001" description="Utah State Sales Tax" minItemPrice="0.0" minPurchase="0.0" taxShipping="N" salesTaxPercentage="0.0475"/>
+ <SimpleSalesTaxLookup productStoreId="9000" countryGeoId="USA" stateProvinceGeoId="CA" taxCategory="_NA_" fromDate="2001-01-01 00:00:00.001" description="California State Sales Tax" minItemPrice="0.0" minPurchase="0.0" taxShipping="N" salesTaxPercentage="0.0625" taxAuthPartyId="CA_BOE" taxAuthGlAccountId="224100"/>
+ <SimpleSalesTaxLookup productStoreId="9000" countryGeoId="USA" stateProvinceGeoId="NY" taxCategory="_NA_" fromDate="2001-01-01 00:00:00.001" description="New York State Sales Tax" minItemPrice="0.0" minPurchase="0.0" taxShipping="N" salesTaxPercentage="0.0425" taxAuthPartyId="NY_DTF" taxAuthGlAccountId="224200"/>
+ <SimpleSalesTaxLookup productStoreId="9000" countryGeoId="USA" stateProvinceGeoId="TX" taxCategory="_NA_" fromDate="2001-01-01 00:00:00.001" description="Texas State Sales Tax" minItemPrice="0.0" minPurchase="0.0" taxShipping="N" salesTaxPercentage="0.0625" taxAuthPartyId="TX_TAXMAN" taxAuthGlAccountId="224000"/>
+ <SimpleSalesTaxLookup productStoreId="9000" countryGeoId="USA" stateProvinceGeoId="UT" taxCategory="_NA_" fromDate="2001-01-01 00:00:00.001" description="Utah State Sales Tax" minItemPrice="0.0" minPurchase="0.0" taxShipping="N" salesTaxPercentage="0.0475" taxAuthPartyId="UT_TAXMAN" taxAuthGlAccountId="224000"/>
<WebSite webSiteId="WebStore" siteName="eCommerce Web Site" productStoreId="9000"/>
<WebSite webSiteId="OrderEntry" siteName="Order Entry Web Site" productStoreId="9000"/>
Modified: trunk/applications/ecommerce/data/DemoRentalProduct.xml
===================================================================
--- trunk/applications/ecommerce/data/DemoRentalProduct.xml 2005-11-11 20:16:55 UTC (rev 6109)
+++ trunk/applications/ecommerce/data/DemoRentalProduct.xml 2005-11-11 21:54:01 UTC (rev 6110)
@@ -42,7 +42,7 @@
<ProductStoreRole partyId="admin" roleTypeId="SALES_REP" productStoreId="RentalStore" fromDate="2001-05-13 12:00:00.0"/>
<ProductStoreKeywordOvrd productStoreId="RentalStore" keyword="gizmo" fromDate="2001-05-13 12:00:00.0" target="100" targetTypeEnumId="KOTT_PRODCAT"/>
- <SimpleSalesTaxLookup productStoreId="RentalStore" countryGeoId="_NA_" stateProvinceGeoId="_NA_" taxCategory="_NA_" fromDate="2001-01-01 00:00:00.001" description="10% OFB Tax" minItemPrice="0.0" minPurchase="0.0" taxShipping="N" salesTaxPercentage="0.1"/>
+ <SimpleSalesTaxLookup productStoreId="RentalStore" countryGeoId="_NA_" stateProvinceGeoId="_NA_" taxCategory="_NA_" fromDate="2001-01-01 00:00:00.001" description="10% OFB Tax" minItemPrice="0.0" minPurchase="0.0" taxShipping="N" salesTaxPercentage="0.1" taxAuthPartyId="OFBIZ_TAX" taxAuthGlAccountId="224000"/>
<WebSite webSiteId="OpenTravelSystem" siteName="The Open source Travel System" productStoreId="RentalStore"/>
Modified: trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
===================================================================
--- trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java 2005-11-11 20:16:55 UTC (rev 6109)
+++ trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java 2005-11-11 21:54:01 UTC (rev 6110)
@@ -2430,6 +2430,8 @@
String primaryGeoId = taxLookup.getString("stateProvinceGeoId");
String secondaryGeoId = taxLookup.getString("countryGeoId");
+ String taxAuthPartyId = taxLookup.getString("taxAuthPartyId");
+ String taxAuthGlAccountId = taxLookup.getString("taxAuthGlAccountId");
// if no state/province, the country is the primary
if (primaryGeoId == null || "_NA_".equals(primaryGeoId)) {
@@ -2445,6 +2447,9 @@
adjMap.put("primaryGeoId", primaryGeoId);
if (secondaryGeoId != null) adjMap.put("secondaryGeoId", secondaryGeoId);
adjMap.put("comments", taxLookup.getString("description"));
+ if (taxAuthPartyId != null) adjMap.put("taxAuthPartyId", taxAuthPartyId);
+ if (taxAuthGlAccountId != null) adjMap.put("overrideGlAccountId", taxAuthGlAccountId);
+ if (primaryGeoId != null) adjMap.put("taxAuthGeoId", primaryGeoId);
// check to see if this party has a tax ID for this, and if the party is tax exempt in the primary (most-local) jurisdiction
if (UtilValidate.isNotEmpty(billToPartyId) && primaryGeoId != null) {
More information about the Svn
mailing list