Taxes

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
robgrigg
Lieutenant (LT)
Lieutenant (LT)
Posts: 76
Joined: Fri Jun 12, 2009 2:22 am

Taxes

Post by robgrigg » Sat May 22, 2010 4:05 am

Hi,

I am trying to write a custom report which lists products and the associated sales by product for a period.

I know there is a report for this but I need a couple of additional columns which have presented me with a question.

What I am looking to do is to show a row for all products and list out the price before vat(tax) (including any discount) and the amount of tax.

So let's say I sell 3 ABC widgets in a given time and they are £110 each including a 10% tax. I want to show...

Product Total (ex tax) Total tax
ABC Widget £300 £30

Simple right....wrong.

In the DB the OrderItems table records an entry for each product as ex tax, the shipping as ex tax and any discount. However it records one tax line item as an aggrigate of all the tax for the Order.

Is there a way for me to get the tax line for each of the products and shipping etc?

Thanks in advance for your help.

Cheers.

Rob.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Taxes

Post by mazhar » Mon May 24, 2010 5:48 am

One possibility may be is to create a copy of Top Products report and then add one more column to it for taxes, write a custom method that takes product id and then calculates total tax for that product sales and returns back. Finally call that method from newly added column and list the returned tax.

Post Reply