CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • CiviCRM Tax Extensions - Common Core infrastructure planning
Pages: 1 2 [3]

Author Topic: CiviCRM Tax Extensions - Common Core infrastructure planning  (Read 9852 times)

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
February 11, 2014, 10:50:43 pm
Joe, it's getting late and I still have to finish updating my test site and code. I had hoped to have that done by now but I'm running behind. I'll continue with it tomorrow.

@Parvez: Have you done anything tangible that you can add to the conversation with?

Andrew
My CiviCRM Extension Workshop: https://github.com/awasson

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
February 13, 2014, 07:34:56 pm
Ok. My testbed is all updated and I'm digging into the code.

My extension has its own UI with fields to define tax types, rates and what contribution types are subject to being taxed. This will need to be changed to use the Tax Fields we have available in Accounts. There were some limitations to the Tax fields in accounts last time I looked so I'll have to check my notes and see if they have been improved upon since then. I'm pretty sure I commented on that in the Wiki somewhere.

So moving forward, I should be able to take the guts of what I've done with my extension and remove my UI and instead leverage the tax fields within the accounts framework. The tough part will still be adding our tax into the equation at checkout.

My earlier method for adding a tax was by modifying the public preProcess() function that is used in the confirm.php pages (ie: /sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php). I pulled the total amount out, calculated my tax (saved it to DB), added it to the total and sent it off for payment.   

Moving forward, I think I'd like to be able to add the tax as a line item if I can which is then added to the total without having to influence the preProcess() function.

@lolas: With your tax modifications, how did you add your tax to the total cost? Was it treated as a line item in the invoice or was it added behind the scenes. If it's worthwhile, I'd really like to not have to reinvent the wheel.

Cheers,
Andrew

PS: If anyone wants to help, by all means chip in.
My CiviCRM Extension Workshop: https://github.com/awasson

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
March 01, 2014, 11:06:03 am
Ok, I'm going to take one more kick at the can and ask where we are with regard to this working group. Is anyone currently working on an approach for a non-hack extension for applying taxes to contributions?

I've resurrected and modified my earlier attempts which didn't use the Financial Accounts infrastructure however, now that I'm digging into the hooks involved in making transactions happen I'm able to pull information like is_tax, tax_rate, accounting_code, etc... Then it's just a matter of applying the tax to the transaction, saving the related info (net, tax, gross).

Reporting will be another challenge but I'm working on that.

I don't want to reinvent the wheel and it would be nice to share the effort if anyone is working on this. If not, I'll just carry on but I thought I would check since every now and again there is activity on this front.

Andrew
My CiviCRM Extension Workshop: https://github.com/awasson

jamien-www.compucorp.co.uk

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 3.4 / 4.0
  • CMS version: Drupal 7.0
  • MySQL version: 5.5
  • PHP version: 5.3.7
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
March 11, 2014, 01:37:49 pm
Hi all,

We have a client with an immediate need and are planning to work with Webaccess to get this into core. We are working per the specification here:

http://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=83493410

Which I have been updating in the past 2-3 weeks to take into account producing legal VAT invoices/receipts (which I assume will be pretty close in nature to most countries requirements).

The current approach would cover taxes which are applied as a %, and multiple taxes applied based on the financial type but not levees or flat rate taxes.

I have some question marks about how we would interact with refunds, webforms and a few other points, but I'm hoping to work these through with Webaccess once we get clarification from the client that we are meeting their needs.

We are looking to get this signed off with the client in the next week or two so if anyone does have any feedback do let me know as soon as possible.

Best

J

 

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
March 11, 2014, 05:21:53 pm
Hi Jamie,

Glad to see some more activity on this front. As I mentioned in the email earlier today, the extension that I have been working on is now capable of defining taxes, applying them to contribution types and logging the results so that they can be pulled out and reported on.

The TODO's are:
  • Finish the detailed reporting code so that individual taxes are reported in separate columns.
  • Push the transaction's tax information into the receipt template so that the emailed receipt contains the net cost, tax and total amount.

I haven't integrated it with CiviCRM Accounts because I couldn't get past the 1 to 1 relationship issue yet. That said, I have been looking at the Accounts Tables so once this version is done, I'll be looking at integrating it with the Accounts infrastructure.

It's an extension with no modifications required to CiviCRM but I've only tested it with Drupal 7 and CiviCRM 4.4.x so it will need to be checked on Wordpress and Joomla.

For anyone who is interested it can be found on my github account https://github.com/awasson/civiTAX
My CiviCRM Extension Workshop: https://github.com/awasson

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
March 26, 2014, 04:56:37 pm
Hi All,

As a few of you know, my tax field extension is ready for testing (https://github.com/awasson/civiTAX). It still has a few rough edges but it does indeed allow for establishing taxes, applying them to contribution types and reporting tax information in the detailed transaction report. There are no mods required to CiviCRM.

I'm in the process of writing a "roadmap" for it starting where it is today, areas that need work, the next iteration (features and improvements) and where I would like it to be long-term.

This is separate from Jamie's project but I think it might still be handy to take it for a spin on a test site to help model user journeys and look at what works and what problems may crop up. I welcome any feedback you may have and if you see anything that will be helpful in your projects I'd be happy to explain what I did and why so you can adapt it. More than likely it will be more helpful conceptually.

Cheers,
Andrew
My CiviCRM Extension Workshop: https://github.com/awasson

Pages: 1 2 [3]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • CiviCRM Tax Extensions - Common Core infrastructure planning

This forum was archived on 2017-11-26.