Taxes not being calculated. CommerceBuilder.AbleCommerceTax

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
kvij
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Mon Dec 03, 2012 6:46 pm

Taxes not being calculated. CommerceBuilder.AbleCommerceTax

Post by kvij » Tue Apr 23, 2013 4:32 pm

Taxes are not being calculated. This doesn't happen for every order, only some.

Error log shows this error:
Could not calculate with the configured tax provider: CommerceBuilder.Taxes.Providers.AbleCommerce.AbleCommerceTax, CommerceBuilder.AbleCommerceTax Object reference not set to an instance of an object.

We have tried debugging by viewing the result of the TaxCalculator.Recalculate(_Order) statement. And it shows 0.

We don't have any customized tax providers. Only simple Tax rules. Ablecommerce version is 7.0.5.

kvij
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Mon Dec 03, 2012 6:46 pm

Re: Taxes not being calculated. CommerceBuilder.AbleCommerceTax

Post by kvij » Tue Apr 23, 2013 6:10 pm

ERROR 2013-04-23 14:02:50,768 1756292ms Object a - Could not calculate with the configured tax provider: CommerceBuilder.Taxes.Providers.AbleCommerce.AbleCommerceTax, CommerceBuilder.AbleCommerceTax
System.NullReferenceException: Object reference not set to an instance of an object.
at CommerceBuilder.Taxes.Providers.AbleCommerce.TaxRuleHelper.GetPotentialTaxRules(Int32[] taxCodeIds, TaxAddress billingAddress, List`1 shippingAddresses, User user)
at CommerceBuilder.Taxes.Providers.AbleCommerce.AbleCommerceTax.Recalculate(Order order)
at CommerceBuilder.Taxes.TaxCalculator.Recalculate(Order order)
ERROR 2013-04-23 14:10:39,180 2224705ms Object a - Could not calculate with the configured tax provider: CommerceBuilder.Taxes.Providers.AbleCommerce.AbleCommerceTax, CommerceBuilder.AbleCommerceTax
System.NullReferenceException: Object reference not set to an instance of an object.
at CommerceBuilder.Taxes.Providers.AbleCommerce.TaxRuleHelper.GetPotentialTaxRules(Int32[] taxCodeIds, TaxAddress billingAddress, List`1 shippingAddresses, User user)
at CommerceBuilder.Taxes.Providers.AbleCommerce.AbleCommerceTax.Recalculate(Order order)
at CommerceBuilder.Taxes.TaxCalculator.Recalculate(Order order)

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Taxes not being calculated. CommerceBuilder.AbleCommerceTax

Post by ForumsAdmin » Wed Apr 24, 2013 4:52 am

Is this by any chance happening for orders placed by anonymous users?

kvij
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Mon Dec 03, 2012 6:46 pm

Re: Taxes not being calculated. CommerceBuilder.AbleCommerceTax

Post by kvij » Wed Apr 24, 2013 1:23 pm

Yes, I have looked at some orders that are affected by this and that seems to be the case. So what's the fix?

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Taxes not being calculated. CommerceBuilder.AbleCommerceTax

Post by ForumsAdmin » Thu Apr 25, 2013 1:54 am

My guess is that anonymous user get deleted by the maintenance routine, and at some later stage, re-calculation of taxes is invoked on the order, may be as a result of some action in merchant admin. When this happens the exception occurs.

In Configure -> Maintenance : Anonymous User Maintenance section, try to increase the number of days anonymous users are retained.

kvij
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Mon Dec 03, 2012 6:46 pm

Re: Taxes not being calculated. CommerceBuilder.AbleCommerceTax

Post by kvij » Thu Apr 25, 2013 2:14 pm

well, sometimes the order needs to be edited or an order is placed through admin. So I guess that if the anonymous user does not exist, it will revert the taxes to 0. Just wondering what's the relation between taxes and anonymous users. I mean what could have been going through the developer's mind, that he programmed such a glitch?

So is there a workaround or do we have to turn off anonymous user checkout?

kvij
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Mon Dec 03, 2012 6:46 pm

Re: Taxes not being calculated. CommerceBuilder.AbleCommerceTax

Post by kvij » Thu Apr 25, 2013 2:56 pm

Another thing I am noticing is that the orders that were placed today have their user ids changed to 0 after 15 minutes of order placed. Why would that be? We have our anonymous user setting at 30 days.

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Taxes not being calculated. CommerceBuilder.AbleCommerceTax

Post by ForumsAdmin » Tue Apr 30, 2013 6:33 am

Another thing I am noticing is that the orders that were placed today have their user ids changed to 0 after 15 minutes of order placed. Why would that be? We have our anonymous user setting at 30 days.
This is strange. AC doesn't do that even in the maintenance routine. It will delete the old anonymous users but it will not reset the ids to 0. Do you have any customizations on your site that could cause this?

kvij
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Mon Dec 03, 2012 6:46 pm

Re: Taxes not being calculated. CommerceBuilder.AbleCommerceTax

Post by kvij » Tue Apr 30, 2013 1:42 pm

ForumsAdmin wrote:
Another thing I am noticing is that the orders that were placed today have their user ids changed to 0 after 15 minutes of order placed. Why would that be? We have our anonymous user setting at 30 days.
This is strange. AC doesn't do that even in the maintenance routine. It will delete the old anonymous users but it will not reset the ids to 0. Do you have any customizations on your site that could cause this?

Well, I mean it's not changing the ids in the user table. But in the Order Table. It's setting userid in the Order Table to NULL.

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Taxes not being calculated. CommerceBuilder.AbleCommerceTax

Post by ForumsAdmin » Wed May 01, 2013 2:29 am

I have rechecked maintenance routines. No where in the maintenance code user id is updated for orders table. It must be something else. Some code at some other place.

Post Reply