Page 1 of 1

TaxModul and TaxService

Posted: Tue Oct 29, 2013 7:04 am
by cartesium
Hi,

i have see, that TaxModul was deprecated.
We habe put this in our applicationContext.xml to solution this problem:

Code: Select all

   <bean id="blTaxModule"
      class="org.broadleafcommerce.core.pricing.service.module.SimpleTaxModule">
        <property name="factor" value="0.19"/>
   </bean>
    <bean p:order="7000" id="blTaxActivity" class="org.broadleafcommerce.core.pricing.service.workflow.TaxActivity">
        <property name="taxModule" ref="blTaxModule"/>
    </bean>


I haven't find infomation about ModuleConfiguration and TaxProvider. Have anyone a idea, how can i user a TaxProvider?

Best regardas

Re: TaxModul and TaxService

Posted: Mon Dec 02, 2013 2:05 pm
by ktisdell
We have refactored the way that we handle tax modules, to allow for multiple tax (or other modules) to be used. We have an Avalara Tax Module available if you are willing to pay the fees to Avalara for tax calculations. If you wish to implement your own tax module, you must do the following:

1. Implement TaxProvider (org.broadleafcommerce.core.pricing.service.tax.provider.TaxProvider). The methods commitTaxForOrder and cancelTax can be empty implementations. They are for situations where you need to send tax information to another system, or cancel tax in another system.

2. Extend AbstractModuleConfiguration (org.broadleafcommerce.common.config.domain.AbstractModuleConfiguration). This is an entity and must have an associated DB table. This is used for things like integrations with external tax systems. As such, you can provide any additional properties such as username, password, URL, etc... Or, you can provide additional information such as tax rate. If you don't have any additional properties, then you can simply create a blank implementation, which will require a table with a primary key that is a foreign key to the BLC_MODULE_CONFIGURATION table. Your entry in the BLC_MODULE_CONFIGURATION must have a corresponding entry in your new module config table. You must provide:
- MODULE_NAME
- ACTIVE_START_DATE (date in the past)
- IS_DEFAULT to true (especially if this is your only tax module)
- CONFIG_TYPE to 'TAX_CALCULATION'
- MODULE_PRIORITY to some number (this can be any number, but if you have multiple tax modules, this will be the order that they are evaluated. It's best to set this number to 1 if you only have one tax module.)

When you implement the "canRespond(ModuleConfiguration config)" method as part of the implementation of TaxProvider, you should do the following:

public boolean canRespond(ModuleConfiguration config) {
if (config instanceof MyTaxModuleConfig) {
return true;
}
return false;
}

The rest is up to you to provide the implementation. Please remember that taxes are calculated and stored at the FulfillmentGroup and FulfillemntGroupItem level.

Re: TaxModul and TaxService

Posted: Sun Mar 30, 2014 2:33 am
by sunita
I am trying to integrate broadleaf with avalara tax, can you please provide me the steps to do?

Re: TaxModul and TaxService

Posted: Tue May 13, 2014 4:49 am
by kendrascott
There are still a lot of people who doesn't want to pay their taxes correctly that's why later on they encounter a lot of problems. The government should do something about this so that all the people will pay their taxes on time. Nobody likes taxes, but do like to have the benefits they provide. There's been a continuing tug of war over whether state taxes are better than sales taxes, with a mixed bag of things for and against both ways of getting the public to pony up. With a payday loan, you can get your taxes paid for this year. Availing a payday loan right away will help you a lot with your finances. You will be able to pay your taxes on time too.