Taxes Help Again!

2 years 7 months ago #326171 by bizguy
Taxes Help Again! was created by bizguy
Further to topic #324485 - Taxes Help!

I now need to create a report of quarterly sales. I am able to collect the data and produce a report using some custom MySQL and PHP. Where I am stuck is how to determine the tax calculation used in the purchase, as there are a number of different rules and rates. Is this information captured in the basket or payment details, or elsewhere?

Thanks,
Ed

Please Log in to join the conversation.

2 years 7 months ago #326177 by krileon
Replied by krileon on topic Taxes Help Again!
If you're building a report of payments from _cbsubs_payments database table the tax amount should just be in the `tax` column. If building a report based off baskets from _cbsubs_payment_baskets database table it should also be in the `tax` column.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

2 years 7 months ago #326205 by bizguy
Replied by bizguy on topic Taxes Help Again!
Thanks, Kyle.

Unfortunately, these are total tax amounts, and in some provinces, this has been calculated using federal and provincial percentage rates. But this isn't the same in all provinces.

Can you provide a breakdown of the item_number field in cbsubs_payments. I've determined that the last number after the second hyphen is the plan id, which I can use to determine the tax amount charged. I'm just wondering if there is any other information I can use from this field.

Thanks for all your help.

Ed

Please Log in to join the conversation.

2 years 7 months ago #326206 by krileon
Replied by krileon on topic Taxes Help Again!
You'll probably need to query against _cbsubs_payment_totalizers then if you need the tax lines. I assume you've 2 different tax rules 1 for federal and 1 for provincial so there should be 2 tax rate lines per payment in that table keeping track of that.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: bizguy

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.291 seconds